ROHC compression/decompression library
|
Define list compression with its function. More...
Go to the source code of this file.
Classes | |
struct | item |
Define the 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... | |
Enumerations | |
enum | ext_header_version { HBH = 0, DEST = 60, RTHDR = 43, AH = 51 } |
Header version. More... | |
Functions | |
int | create_list (struct c_list *list) |
Create one compression_list. | |
int | add_elt (struct c_list *list, struct item *item, int index) |
Add an element at the begin of the list. | |
int | push_back (struct c_list *list, struct item *item, int index) |
Add an element at the end of the list. | |
void | delete_elt (struct c_list *list, struct item *item) |
Delete the specified element of the list. | |
struct list_elt * | get_elt (struct c_list *list, int index) |
Get the element at the specified index. | |
int | elt_index (struct c_list *list, struct item *item) |
Get the index of the specified element in the list. | |
int | type_is_present (struct c_list *list, struct item *item) |
Indicate if the type of the specified element is present. | |
void | destroy_list (struct c_list *list) |
Destroy the list. | |
int | insert_elt (struct c_list *list, struct item *item, int index, int index_table) |
Insert an element at the specified position. | |
int | size_list (struct c_list *list) |
Get the size of the list. | |
void | empty_list (struct c_list *list) |
Empty the list. |
Define list compression with its function.
enum ext_header_version |
Add an element at the begin 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, list_elt::prev_elt, and rohc_debugf.
Referenced by insert_elt(), and push_back().
int create_list | ( | struct c_list * | list | ) |
Create one compression_list.
Functions prototypes
References c_list::first_elt, c_list::gen_id, and rohc_debugf.
void delete_elt | ( | struct c_list * | list, |
struct 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.
Referenced by c_algo_list_compress(), and c_create_current_list().
void destroy_list | ( | struct c_list * | list | ) |
Destroy the list.
list | the list to destroy |
References c_list::first_elt, list_elt::next_elt, list_elt::prev_elt, and rohc_debugf.
Referenced by c_generic_destroy(), and d_generic_destroy().
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.
Referenced by c_create_current_list().
void empty_list | ( | struct c_list * | list | ) |
Empty the list.
list | the list to empty |
References c_list::first_elt, list_elt::next_elt, list_elt::prev_elt, and rohc_debugf.
Referenced by c_algo_list_compress(), decode_type_0(), decode_type_1(), decode_type_2(), and decode_type_3().
Get the element at the specified index.
list | the list where is the element |
index | the specified index |
References c_list::first_elt, list_elt::next_elt, and size_list().
Referenced by c_algo_list_compress(), c_create_current_list(), d_decode_dynamic_ip6(), decide_type(), decode_type_1(), decode_type_2(), decode_type_3(), encode_ip6_extension(), encode_list(), encode_type_0(), encode_type_1(), encode_type_2(), and encode_type_3().
int insert_elt | ( | struct c_list * | list, |
struct 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 add_elt(), c_list::first_elt, list_elt::index_table, list_elt::item, list_elt::next_elt, list_elt::prev_elt, rohc_debugf, and size_list().
Referenced by c_algo_list_compress(), c_create_current_list(), decode_type_0(), decode_type_1(), decode_type_2(), and decode_type_3().
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 add_elt(), c_list::first_elt, list_elt::index_table, list_elt::item, list_elt::next_elt, list_elt::prev_elt, and rohc_debugf.
Referenced by c_create_current_list().
Get the size of the list.
list | The list |
References c_list::first_elt, and list_elt::next_elt.
Referenced by build_uncompressed_ip6(), c_algo_list_compress(), code_ipv6_dynamic_part(), d_decode_dynamic_ip6(), decide_type(), decode_type_1(), decode_type_2(), decode_type_3(), do_decode_uo0_and_uo1(), do_decode_uor2(), encode_ip6_extension(), encode_type_0(), encode_type_1(), encode_type_2(), encode_type_3(), get_elt(), insert_elt(), and ip_get_plen().
int type_is_present | ( | struct c_list * | list, |
struct 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, rohc_debugf, and item::type.
Referenced by decide_type(), encode_type_1(), encode_type_2(), and encode_type_3().