rules/rule_config.h
¶
Rule configuration stub for libSCHC to allow for dynamic rule management
rules.h
¶
Dynamic memory manipulation of rule contexts
-
struct schc_coap_rule_t *schc_rules_create_coap_rule(void)¶
[source] Allocate an CoAP layer rule
- Returns:
A
struct schc_coap_rule_t
pointer.- Return values:
NULL – when the layer rule can not be allocated.
- Return type:
struct schc_coap_rule_t *
-
struct schc_compression_rule_t **schc_rules_create_compr_ctx(unsigned int rule_count)¶
[source] Allocates the array for the compression context of a device.
- Parameters:
rule_count (unsigned) – The number of rule entries to be added to the compression context.
- Returns:
An array of allocates
struct schc_compression_rule_t
pointers.- Return values:
NULL – when the context can not be allocated.
- Return type:
struct schc_compression_rule_t **
-
struct schc_fragmentation_rule_t **schc_rules_create_frag_ctx(unsigned int rule_count)¶
[source] Allocates the array for the fragmentation context of a device.
- Parameters:
rule_count (unsigned) – The number of rule entries to be added to the fragmentation context.
- Returns:
An array of allocates
struct schc_fragmentation_rule_t
pointers.- Return values:
NULL – When the context can not be allocated.
- Return type:
struct schc_fragmentation_rule_t **
-
struct schc_ipv6_rule_t *schc_rules_create_ipv6_rule(void)¶
[source] Allocate an IPv6 layer rule
- Returns:
A
struct schc_ipv6_rule_t
pointer.- Return values:
NULL – when the layer rule can not be allocated.
- Return type:
struct schc_ipv6_rule_t *
-
struct schc_udp_rule_t *schc_rules_create_udp_rule(void)¶
[source] Allocate an UDP layer rule
- Returns:
A
struct schc_udp_rule_t
pointer.- Return values:
NULL – when the layer rule can not be allocated.
- Return type:
struct schc_udp_rule_t *
-
void schc_rules_free_compr_ctx(struct schc_compression_rule_t **ctx, unsigned int rule_count)¶
[source] Frees the compression context allocated with
schc_rules_create_compr_ctx()
.- Parameters:
ctx (
struct schc_compression_rule_t **
) – The context to be free’d.rule_count (unsigned) – The number of rules that are contained in
ctx
.
-
void schc_rules_free_frag_ctx(struct schc_fragmentation_rule_t **ctx, unsigned int rule_count)¶
[source] Frees the fragmentation context allocated with
schc_rules_create_frag_ctx()
.- Parameters:
ctx (
struct schc_fragmentation_rule_t **
) – The context to be free’d.rule_count (unsigned) – The number of rules that are contained in
ctx
.