GNUnet 0.22.0
gnu_name_system_service_ports.h File Reference

Go to the source code of this file.

Data Structures

struct  GNUNET_GNS_ServicePort
 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_service_port_name_to_number (const char *name)
 
const char * GNUNET_GNS_service_port_number_to_name (uint16_t port)
 

Variables

struct GNUNET_GNS_ServicePort GNUNET_GNS_ServicePorts []
 

Function Documentation

◆ GNUNET_GNS_service_port_name_to_number()

uint16_t GNUNET_GNS_service_port_name_to_number ( const char *  name)

Definition at line 73 of file gnu_name_system_service_ports.h.

74{
75 int i = 0;
76 while (NULL != GNUNET_GNS_ServicePorts[i].name)
77 {
78 if (0 == strcmp (name, GNUNET_GNS_ServicePorts[i].name))
80 i++;
81 }
82 return 0;
83}
static char * name
Name (label) of the records to list.
struct GNUNET_GNS_ServicePort GNUNET_GNS_ServicePorts[]

References GNUNET_GNS_ServicePorts, name, and GNUNET_GNS_ServicePort::port.

Referenced by resolver_getservbyname().

Here is the caller graph for this function:

◆ GNUNET_GNS_service_port_number_to_name()

const char * GNUNET_GNS_service_port_number_to_name ( uint16_t  port)

Definition at line 89 of file gnu_name_system_service_ports.h.

90{
91 int i = 0;
92 while (NULL != GNUNET_GNS_ServicePorts[i].name)
93 {
96 i++;
97 }
98 return NULL;
99}
static uint16_t port
Port number.
Definition: gnunet-bcd.c:146

References GNUNET_GNS_ServicePorts, name, GNUNET_GNS_ServicePort::name, and port.

Variable Documentation

◆ GNUNET_GNS_ServicePorts

struct GNUNET_GNS_ServicePort GNUNET_GNS_ServicePorts[]
Initial value:
= {
{
.name = "scheme",
.port = 49152
},
{
.name = "translation",
.port = 49153
},
{
.name = NULL,
.port = 0
}
}

Definition at line 46 of file gnu_name_system_service_ports.h.

Referenced by GNUNET_GNS_service_port_name_to_number(), and GNUNET_GNS_service_port_number_to_name().