GNUnet 0.22.2
gnu_name_system_protocols.h File Reference
This graph shows which files directly or indirectly include this file:

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 65 of file gnu_name_system_protocols.h.

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

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 81 of file gnu_name_system_protocols.h.

82{
83 int i = 0;
84 while (NULL != GNUNET_GNS_Protocols[i].name)
85 {
87 return GNUNET_GNS_Protocols[i].name;
88 i++;
89 }
90 return NULL;
91}
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().