Tor  0.4.7.0-alpha-dev
Functions
dispatch_naming.h File Reference

Header for dispatch_naming.c. More...

#include "lib/dispatch/msgtypes.h"
#include <stddef.h>

Go to the source code of this file.

Functions

channel_id_t get_channel_id (const char *)
 
const char * get_channel_id_name (channel_id_t)
 
size_t get_num_channel_ids (void)
 
message_id_t get_message_id (const char *)
 
const char * get_message_id_name (message_id_t)
 
size_t get_num_message_ids (void)
 
subsys_id_t get_subsys_id (const char *)
 
const char * get_subsys_id_name (subsys_id_t)
 
size_t get_num_subsys_ids (void)
 
msg_type_id_t get_msg_type_id (const char *)
 
const char * get_msg_type_id_name (msg_type_id_t)
 
size_t get_num_msg_type_ids (void)
 
void dispatch_naming_init (void)
 

Detailed Description

Header for dispatch_naming.c.

Definition in file dispatch_naming.h.

Function Documentation

◆ get_channel_id()

channel_id_t get_channel_id ( const char *  )

Return an existing channel ID by name, allocating the channel ID if if necessary. Returns ERROR_ID if we have run out of channels

Referenced by tor_mainloop_set_delivery_strategy().

◆ get_channel_id_name()

const char* get_channel_id_name ( channel_id_t  )

Return the name corresponding to a given channel ID.

◆ get_num_channel_ids()

size_t get_num_channel_ids ( void  )

Return the total number of named channel IDs.

Referenced by tor_mainloop_connect_pubsub_events().