GNUnet 0.21.1
gnu_name_system_protocols.h File Reference

Go to the source code of this file.

Data Structures

struct  GNUNET_GNS_Protocol
 WARNING: This header is generated! In order to add GNS service ports, you must register them in GANA, and then use the header generation script to create an update of this file. More...
 

Functions

uint16_t GNUNET_GNS_protocol_name_to_number (const char *name)
 
const char * GNUNET_GNS_protocol_number_to_name (uint16_t number)
 

Variables

struct GNUNET_GNS_Protocol GNUNET_GNS_Protocols []
 

Function Documentation

◆ GNUNET_GNS_protocol_name_to_number()

uint16_t GNUNET_GNS_protocol_name_to_number ( const char *  name)

Definition at line 62 of file gnu_name_system_protocols.h.

63{
64 int i = 0;
65 while (NULL != GNUNET_GNS_Protocols[i].name)
66 {
67 if (0 == strcmp (name, GNUNET_GNS_Protocols[i].name))
69 i++;
70 }
71 return 0;
72}
static char * name
Name (label) of the records to list.
struct GNUNET_GNS_Protocol GNUNET_GNS_Protocols[]

References GNUNET_GNS_Protocols, name, and GNUNET_GNS_Protocol::number.

Referenced by resolver_getprotobyname().

Here is the caller graph for this function:

◆ GNUNET_GNS_protocol_number_to_name()

const char * GNUNET_GNS_protocol_number_to_name ( uint16_t  number)

Definition at line 76 of file gnu_name_system_protocols.h.

77{
78 int i = 0;
79 while (NULL != GNUNET_GNS_Protocols[i].name)
80 {
82 return GNUNET_GNS_Protocols[i].name;
83 i++;
84 }
85 return NULL;
86}
uint32_t number

References GNUNET_GNS_Protocols, name, GNUNET_GNS_Protocol::name, and number.

Variable Documentation

◆ GNUNET_GNS_Protocols

struct GNUNET_GNS_Protocol GNUNET_GNS_Protocols[]
Initial value:
= {
{
.name = "trust",
.number = 49152
},
{
.name = NULL,
.number = 0
}
}

Definition at line 46 of file gnu_name_system_protocols.h.

Referenced by GNUNET_GNS_protocol_name_to_number(), and GNUNET_GNS_protocol_number_to_name().