DTNMA Reference Tools v2.2.0 - 14.ge930b04
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
Loading...
Searching...
No Matches
type.c File Reference
#include "type.h"
#include "cace/util/defs.h"
#include "cace/util/nocase.h"
#include <m-dict.h>
#include <pthread.h>
#include <stddef.h>
+ Include dependency graph for type.c:

Data Structures

struct  _ari_type_name_pair_t
 

Functions

const char * cace_ari_type_to_name (int32_t typenum)
 Lookup a type ID from its integer enumeration.
 
int cace_ari_type_from_name (int32_t *typenum, const char *name)
 Lookup a type ID from its text name.
 

Variables

static _ari_type_name_pair_t _ari_type_names []
 Map from non-negative literal type enumerations to names.
 

Function Documentation

◆ cace_ari_type_from_name()

int cace_ari_type_from_name ( int32_t *  typenum,
const char *  name 
)

Lookup a type ID from its text name.

Parameters
[out]typenumThe integer value to store the found result. A null value means just search but don't store.
[in]nameThe name to search for.
Returns
Zero upon success.

References _ari_type_names, CHKERR1, _ari_type_name_pair_t::name, and _ari_type_name_pair_t::type.

Referenced by cace_amm_type_set_name_aritype(), cace_ari_get_aritype_int(), and cace_ari_objpath_derive_type().

◆ cace_ari_type_to_name()

const char * cace_ari_type_to_name ( int32_t  typenum)

Variable Documentation

◆ _ari_type_names

_ari_type_name_pair_t _ari_type_names[]
static

Map from non-negative literal type enumerations to names.

These are from the IANA sub-registries "Literal Types" and "Managed Object Types" from [11].

Referenced by cace_ari_type_from_name(), and cace_ari_type_to_name().