GNUnet 0.22.2
GNUNET_SERVICE_Handle Struct Reference

Handle to a service. More...

Collaboration diagram for GNUNET_SERVICE_Handle:
[legend]

Data Fields

const struct GNUNET_CONFIGURATION_Handlecfg
 Our configuration. More...
 
const struct GNUNET_OS_ProjectDatapd
 Project data of this service. More...
 
const char * service_name
 Name of our service. More...
 
GNUNET_SERVICE_InitCallback service_init_cb
 Main service-specific task to run. More...
 
GNUNET_SERVICE_ConnectHandler connect_cb
 Function to call when clients connect. More...
 
GNUNET_SERVICE_DisconnectHandler disconnect_cb
 Function to call when clients disconnect / are disconnected. More...
 
void * cb_cls
 Closure for service_init_cb, connect_cb, disconnect_cb. More...
 
struct ServiceListenContextslc_head
 DLL of listen sockets used to accept new connections. More...
 
struct ServiceListenContextslc_tail
 DLL of listen sockets used to accept new connections. More...
 
struct GNUNET_SERVICE_Clientclients_head
 Our clients, kept in a DLL. More...
 
struct GNUNET_SERVICE_Clientclients_tail
 Our clients, kept in a DLL. More...
 
struct GNUNET_MQ_MessageHandlerhandlers
 Message handlers to use for all clients. More...
 
void * task_cls
 Closure for task. More...
 
struct GNUNET_STRINGS_IPv4NetworkPolicyv4_denied
 IPv4 addresses that are not allowed to connect. More...
 
struct GNUNET_STRINGS_IPv6NetworkPolicyv6_denied
 IPv6 addresses that are not allowed to connect. More...
 
struct GNUNET_STRINGS_IPv4NetworkPolicyv4_allowed
 IPv4 addresses that are allowed to connect (if not set, all are allowed). More...
 
struct GNUNET_STRINGS_IPv6NetworkPolicyv6_allowed
 IPv6 addresses that are allowed to connect (if not set, all are allowed). More...
 
int match_uid
 Do we require a matching UID for UNIX domain socket connections? GNUNET_NO means that the UID does not have to match (however, match_gid may still impose other access control checks). More...
 
int match_gid
 Do we require a matching GID for UNIX domain socket connections? Ignored if match_uid is GNUNET_YES. More...
 
enum SuspendReason suspend_state
 Are we suspended, and if so, why? More...
 
enum GNUNET_SERVICE_Options options
 Our options. More...
 
int ready_confirm_fd
 If we are daemonizing, this FD is set to the pipe to the parent. More...
 
bool require_found
 If true, consider unknown message types an error where the client is disconnected. More...
 

Detailed Description

Handle to a service.

Definition at line 115 of file service.c.

Field Documentation

◆ cfg

const struct GNUNET_CONFIGURATION_Handle* GNUNET_SERVICE_Handle::cfg

Our configuration.

Definition at line 120 of file service.c.

◆ pd

const struct GNUNET_OS_ProjectData* GNUNET_SERVICE_Handle::pd

Project data of this service.

Definition at line 125 of file service.c.

Referenced by GNUNET_SERVICE_register_(), GNUNET_SERVICE_start(), and return_agpl().

◆ service_name

const char* GNUNET_SERVICE_Handle::service_name

Name of our service.

Definition at line 130 of file service.c.

◆ service_init_cb

GNUNET_SERVICE_InitCallback GNUNET_SERVICE_Handle::service_init_cb

Main service-specific task to run.

Definition at line 135 of file service.c.

Referenced by GNUNET_SERVICE_register_().

◆ connect_cb

GNUNET_SERVICE_ConnectHandler GNUNET_SERVICE_Handle::connect_cb

Function to call when clients connect.

Definition at line 140 of file service.c.

◆ disconnect_cb

GNUNET_SERVICE_DisconnectHandler GNUNET_SERVICE_Handle::disconnect_cb

Function to call when clients disconnect / are disconnected.

Definition at line 145 of file service.c.

◆ cb_cls

void* GNUNET_SERVICE_Handle::cb_cls

Closure for service_init_cb, connect_cb, disconnect_cb.

Definition at line 150 of file service.c.

◆ slc_head

struct ServiceListenContext* GNUNET_SERVICE_Handle::slc_head

DLL of listen sockets used to accept new connections.

Definition at line 155 of file service.c.

◆ slc_tail

struct ServiceListenContext* GNUNET_SERVICE_Handle::slc_tail

DLL of listen sockets used to accept new connections.

Definition at line 160 of file service.c.

◆ clients_head

struct GNUNET_SERVICE_Client* GNUNET_SERVICE_Handle::clients_head

Our clients, kept in a DLL.

Definition at line 165 of file service.c.

Referenced by GNUNET_SERVICE_stop().

◆ clients_tail

struct GNUNET_SERVICE_Client* GNUNET_SERVICE_Handle::clients_tail

Our clients, kept in a DLL.

Definition at line 170 of file service.c.

◆ handlers

struct GNUNET_MQ_MessageHandler* GNUNET_SERVICE_Handle::handlers

Message handlers to use for all clients.

Definition at line 175 of file service.c.

Referenced by GNUNET_SERVICE_stop().

◆ task_cls

void* GNUNET_SERVICE_Handle::task_cls

Closure for task.

Definition at line 180 of file service.c.

◆ v4_denied

struct GNUNET_STRINGS_IPv4NetworkPolicy* GNUNET_SERVICE_Handle::v4_denied

IPv4 addresses that are not allowed to connect.

Definition at line 185 of file service.c.

◆ v6_denied

struct GNUNET_STRINGS_IPv6NetworkPolicy* GNUNET_SERVICE_Handle::v6_denied

IPv6 addresses that are not allowed to connect.

Definition at line 190 of file service.c.

◆ v4_allowed

struct GNUNET_STRINGS_IPv4NetworkPolicy* GNUNET_SERVICE_Handle::v4_allowed

IPv4 addresses that are allowed to connect (if not set, all are allowed).

Definition at line 196 of file service.c.

◆ v6_allowed

struct GNUNET_STRINGS_IPv6NetworkPolicy* GNUNET_SERVICE_Handle::v6_allowed

IPv6 addresses that are allowed to connect (if not set, all are allowed).

Definition at line 202 of file service.c.

◆ match_uid

int GNUNET_SERVICE_Handle::match_uid

Do we require a matching UID for UNIX domain socket connections? GNUNET_NO means that the UID does not have to match (however, match_gid may still impose other access control checks).

Definition at line 209 of file service.c.

◆ match_gid

int GNUNET_SERVICE_Handle::match_gid

Do we require a matching GID for UNIX domain socket connections? Ignored if match_uid is GNUNET_YES.

Note that this is about checking that the client's UID is in our group OR that the client's GID is our GID. If both "match_gid" and match_uid are GNUNET_NO, all users on the local system have access.

Definition at line 218 of file service.c.

◆ suspend_state

enum SuspendReason GNUNET_SERVICE_Handle::suspend_state

Are we suspended, and if so, why?

Definition at line 223 of file service.c.

Referenced by GNUNET_SERVICE_client_mark_monitor().

◆ options

enum GNUNET_SERVICE_Options GNUNET_SERVICE_Handle::options

Our options.

Definition at line 228 of file service.c.

◆ ready_confirm_fd

int GNUNET_SERVICE_Handle::ready_confirm_fd

If we are daemonizing, this FD is set to the pipe to the parent.

Send '.' if we started ok, '!' if not. -1 if we are not daemonizing.

Definition at line 235 of file service.c.

◆ require_found

bool GNUNET_SERVICE_Handle::require_found

If true, consider unknown message types an error where the client is disconnected.

Definition at line 241 of file service.c.


The documentation for this struct was generated from the following file: