Data Structures | Functions

cr_map.h File Reference

Contains the functions to map domain and carrier names to ids. More...

#include "../../str.h"
Include dependency graph for cr_map.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

Functions


Detailed Description

Definition in file cr_map.h.


Function Documentation

int compare_name_map ( const void *  v1,
const void *  v2 
)
Returns:
-1 if v1 < v2, 0 if v1 == v2, 1 if v1 > v2

Definition at line 85 of file cr_map.c.

Referenced by load_config(), and map_id2name().

Here is the caller graph for this function:

str* map_id2name ( struct name_map_t map,
int  size,
int  id 
)
Parameters:
map the mapping list to search in
size the size of the list
id the id, we are looking for
Returns:
values: on succcess the name for this id, NULL on failure

Definition at line 69 of file cr_map.c.

References compare_name_map(), name_map_t::id, and name_map_t::name.

Referenced by get_domain_data_or_add().

Here is the call graph for this function:

Here is the caller graph for this function:

int map_name2id ( struct name_map_t map,
int  size,
const str name 
)
Parameters:
map the mapping list to search in
size the size of the list
name the name, we are looking for
Returns:
values: on succcess the id for this name, -1 on failure

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().

Here is the call graph for this function:

Here is the caller graph for this function: