|
ROHC compression/decompression library
|
Define list compression with its function. More...
#include "dllexport.h"#include "protocols/ipv6.h"#include "protocols/ip_numbers.h"#include <stdlib.h>

Go to the source code of this file.
Data Structures | |
| struct | rohc_list_item |
| A list item. More... | |
| struct | list_elt |
| Define a generic element in a compression list. More... | |
| struct | c_list |
| Define a list for compression. More... | |
| struct | c_translation |
| Define a compression translation table element. More... | |
| struct | d_translation |
| Define a decompression translation table element. More... | |
Defines | |
| #define | rc_list_debug(comp_list, format,...) |
| #define | rd_list_debug(decomp_list, format,...) |
Enumerations | |
| enum | ext_header_version { HBH = ROHC_IPPROTO_HOPOPTS, RTHDR = ROHC_IPPROTO_ROUTING, AH = ROHC_IPPROTO_AH, DEST = ROHC_IPPROTO_DSTOPTS } |
| Header version. More... | |
Functions | |
| struct c_list *ROHC_EXPORT | list_create (void) __attribute__((warn_unused_result)) |
| Create one compression_list. | |
| void ROHC_EXPORT | list_destroy (struct c_list *list) |
| Destroy the list. | |
| int ROHC_EXPORT | list_add_at_beginning (struct c_list *list, struct rohc_list_item *item, int index) |
| Add an element at the beginning of the list. | |
| int ROHC_EXPORT | list_add_at_end (struct c_list *list, struct rohc_list_item *item, int index) |
| Add an element at the end of the list. | |
| int ROHC_EXPORT | list_add_at_index (struct c_list *list, struct rohc_list_item *item, int index, int index_table) |
| Insert an element at the specified position. | |
| struct list_elt *ROHC_EXPORT | list_get_elt_by_index (struct c_list *list, int index) |
| Get the element at the specified index. | |
| int ROHC_EXPORT | list_get_index_by_elt (struct c_list *list, struct rohc_list_item *item) |
| Get the index of the specified element in the list. | |
| void ROHC_EXPORT | list_remove (struct c_list *list, struct rohc_list_item *item) |
| Delete the specified element of the list. | |
| void ROHC_EXPORT | rohc_list_empty (struct c_list *list) |
| Empty the list. | |
| int ROHC_EXPORT | list_type_is_present (struct c_list *list, struct rohc_list_item *item) |
| Indicate if the type of the specified element is present. | |
| size_t ROHC_EXPORT | list_get_size (const struct c_list *const list) |
| Get the size of the given list. | |
Define list compression with its function.
| #define rc_list_debug | ( | comp_list, | |
| format, | |||
| ... | |||
| ) |
rohc_debug(comp_list, ROHC_TRACE_COMP, (comp_list)->profile_id, \ format, ##__VA_ARGS__)
Print a debug trace for the given compression list
| #define rd_list_debug | ( | decomp_list, | |
| format, | |||
| ... | |||
| ) |
rohc_debug(decomp_list, ROHC_TRACE_DECOMP, (decomp_list)->profile_id, \ format, ##__VA_ARGS__)
Print a debug trace for the given decompression list
| enum ext_header_version |
| int ROHC_EXPORT list_add_at_beginning | ( | struct c_list * | list, |
| struct rohc_list_item * | item, | ||
| int | index | ||
| ) |
Add an element at the beginning of the list.
| list | the list where the element is added |
| item | the item of the new element |
| index | the index in based table |
References c_list::first_elt, list_elt::index_table, list_elt::item, list_elt::next_elt, and list_elt::prev_elt.
Referenced by list_add_at_end(), and list_add_at_index().
| int ROHC_EXPORT list_add_at_end | ( | struct c_list * | list, |
| struct rohc_list_item * | item, | ||
| int | index | ||
| ) |
Add an element at the end of the list.
| list | the list where the element is added |
| item | the item of the new element |
| index | the index in based table |
References c_list::first_elt, list_elt::index_table, list_elt::item, list_add_at_beginning(), list_elt::next_elt, and list_elt::prev_elt.
| int ROHC_EXPORT list_add_at_index | ( | struct c_list * | list, |
| struct rohc_list_item * | item, | ||
| int | index, | ||
| int | index_table | ||
| ) |
Insert an element at the specified position.
| list | The list in which the element is inserted |
| item | The element to insert |
| index | The position |
| index_table | The index in based_table |
References c_list::first_elt, list_elt::index_table, list_elt::item, list_add_at_beginning(), list_get_size(), list_elt::next_elt, and list_elt::prev_elt.
| struct c_list* ROHC_EXPORT list_create | ( | void | ) | [read] |
Create one compression_list.
Functions prototypes
References c_list::first_elt, and c_list::gen_id.
Referenced by c_init_header_info().
| void ROHC_EXPORT list_destroy | ( | struct c_list * | list | ) |
Destroy the list.
| list | the list to destroy |
References c_list::first_elt, and list_elt::next_elt.
Referenced by c_generic_destroy(), and d_generic_destroy().
| struct list_elt* ROHC_EXPORT list_get_elt_by_index | ( | struct c_list * | list, |
| int | index | ||
| ) | [read] |
Get the element at the specified index.
| list | the list where is the element |
| index | the specified index |
References c_list::first_elt, list_get_size(), and list_elt::next_elt.
| int ROHC_EXPORT list_get_index_by_elt | ( | struct c_list * | list, |
| struct rohc_list_item * | item | ||
| ) |
Get the index of the specified element in the list.
| list | the list where is the element |
| item | the specified element |
References c_list::first_elt, list_elt::item, and list_elt::next_elt.
| size_t ROHC_EXPORT list_get_size | ( | const struct c_list *const | list | ) |
Get the size of the given list.
| list | The list |
References c_list::first_elt, and list_elt::next_elt.
Referenced by code_ipv6_dynamic_part(), list_add_at_index(), and list_get_elt_by_index().
| void ROHC_EXPORT list_remove | ( | struct c_list * | list, |
| struct rohc_list_item * | item | ||
| ) |
Delete the specified element of the list.
| list | the list where the element is destroyed |
| item | the element to delete |
References c_list::first_elt, list_elt::item, list_elt::next_elt, and list_elt::prev_elt.
| int ROHC_EXPORT list_type_is_present | ( | struct c_list * | list, |
| struct rohc_list_item * | item | ||
| ) |
Indicate if the type of the specified element is present.
| list | the list where is the element |
| item | the specified element |
References c_list::first_elt, list_elt::item, list_elt::next_elt, and rohc_list_item::type.
| void ROHC_EXPORT rohc_list_empty | ( | struct c_list * | list | ) |
Empty the list.
| list | the list to empty |
References c_list::first_elt, list_elt::next_elt, and list_elt::prev_elt.
1.7.6.1