More...
#include <stdlib.h>
#include "cr_map.h"
#include "../../mem/shm_mem.h"
#include "../../ut.h"

Go to the source code of this file.
Functions | |
| int | compare_name_map (const void *v1, const void *v2) |
| str * | map_id2name (struct name_map_t *map, int size, int id) |
| int | map_name2id (struct name_map_t *map, int size, const str *name) |
Definition in file cr_map.c.
| int compare_name_map | ( | const void * | v1, | |
| const void * | v2 | |||
| ) |
Compares the IDs of two name_map_t structures.
Definition at line 85 of file cr_map.c.
Referenced by load_carrier_map(), load_config(), load_domain_map(), and map_id2name().
| str* map_id2name | ( | struct name_map_t * | map, | |
| int | size, | |||
| int | id | |||
| ) |
Searches for the name of an ID
| map | the mapping list to search in | |
| size | the size of the list | |
| id | the id, we are looking for |
Definition at line 69 of file cr_map.c.
References compare_name_map(), name_map_t::id, name_map_t::name, and NULL.
Referenced by get_domain_data_or_add().
| int map_name2id | ( | struct name_map_t * | map, | |
| int | size, | |||
| const str * | name | |||
| ) |
Searches for the ID of a name
| map | the mapping list to search in | |
| size | the size of the list | |
| name | the name, we are looking for |
Definition at line 46 of file cr_map.c.
References name_map_t::id, _str::len, and str_strcmp().
Referenced by carrier_name_2_id(), cr_gp2id(), domain_name_2_id(), load_config(), and update_route_data().
1.5.6