GNUnet  0.11.x
Data Fields
LEGACY_SERVICE_Context Struct Reference

Context for "service_task". More...

Collaboration diagram for LEGACY_SERVICE_Context:
[legend]

Data Fields

const struct GNUNET_CONFIGURATION_Handlecfg
 Our configuration. More...
 
struct GNUNET_SERVER_Handleserver
 Handle for the server. More...
 
struct sockaddr ** addrs
 NULL-terminated array of addresses to bind to, NULL if we got pre-bound listen sockets. More...
 
const char * service_name
 Name of our service. More...
 
LEGACY_SERVICE_Main task
 Main service-specific task to run. 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...
 
struct GNUNET_SERVER_MessageHandlermy_handlers
 My (default) message handlers. More...
 
socklen_t * addrlens
 Array of the lengths of the entries in addrs. More...
 
struct GNUNET_NETWORK_Handle ** lsocks
 NULL-terminated array of listen sockets we should take over. More...
 
struct GNUNET_SCHEDULER_Taskshutdown_task
 Task ID of the shutdown task. More...
 
struct GNUNET_TIME_Relative timeout
 Idle timeout for server. More...
 
int ret
 Overall success/failure of the service start. More...
 
int ready_confirm_fd
 If we are daemonizing, this FD is set to the pipe to the parent. More...
 
int require_found
 Do we close connections if we receive messages for which we have no handler? 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 LEGACY_SERVICE_Options options
 Our options. More...
 

Detailed Description

Context for "service_task".

Definition at line 108 of file tcp_service_legacy.c.

Field Documentation

◆ cfg

const struct GNUNET_CONFIGURATION_Handle* LEGACY_SERVICE_Context::cfg

◆ server

struct GNUNET_SERVER_Handle* LEGACY_SERVICE_Context::server

◆ addrs

struct sockaddr** LEGACY_SERVICE_Context::addrs

NULL-terminated array of addresses to bind to, NULL if we got pre-bound listen sockets.

Definition at line 124 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_run(), LEGACY_SERVICE_start(), LEGACY_SERVICE_stop(), service_task(), and setup_service().

◆ service_name

const char* LEGACY_SERVICE_Context::service_name

◆ task

LEGACY_SERVICE_Main LEGACY_SERVICE_Context::task

Main service-specific task to run.

Definition at line 134 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_run(), and service_task().

◆ task_cls

void* LEGACY_SERVICE_Context::task_cls

Closure for task.

Definition at line 139 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_run(), and service_task().

◆ v4_denied

struct GNUNET_STRINGS_IPv4NetworkPolicy* LEGACY_SERVICE_Context::v4_denied

IPv4 addresses that are not allowed to connect.

Definition at line 144 of file tcp_service_legacy.c.

Referenced by check_access(), LEGACY_SERVICE_run(), LEGACY_SERVICE_stop(), and setup_service().

◆ v6_denied

struct GNUNET_STRINGS_IPv6NetworkPolicy* LEGACY_SERVICE_Context::v6_denied

IPv6 addresses that are not allowed to connect.

Definition at line 149 of file tcp_service_legacy.c.

Referenced by check_access(), LEGACY_SERVICE_run(), LEGACY_SERVICE_stop(), and setup_service().

◆ v4_allowed

struct GNUNET_STRINGS_IPv4NetworkPolicy* LEGACY_SERVICE_Context::v4_allowed

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

Definition at line 155 of file tcp_service_legacy.c.

Referenced by check_access(), LEGACY_SERVICE_run(), LEGACY_SERVICE_stop(), and setup_service().

◆ v6_allowed

struct GNUNET_STRINGS_IPv6NetworkPolicy* LEGACY_SERVICE_Context::v6_allowed

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

Definition at line 161 of file tcp_service_legacy.c.

Referenced by check_access(), LEGACY_SERVICE_run(), LEGACY_SERVICE_stop(), and setup_service().

◆ my_handlers

struct GNUNET_SERVER_MessageHandler* LEGACY_SERVICE_Context::my_handlers

My (default) message handlers.

Adjusted copy of "defhandlers".

Definition at line 167 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_run(), LEGACY_SERVICE_start(), LEGACY_SERVICE_stop(), and service_task().

◆ addrlens

socklen_t* LEGACY_SERVICE_Context::addrlens

Array of the lengths of the entries in addrs.

Definition at line 172 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_run(), LEGACY_SERVICE_start(), LEGACY_SERVICE_stop(), service_task(), and setup_service().

◆ lsocks

struct GNUNET_NETWORK_Handle** LEGACY_SERVICE_Context::lsocks

NULL-terminated array of listen sockets we should take over.

Definition at line 177 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_get_listen_sockets(), LEGACY_SERVICE_start(), service_task(), and setup_service().

◆ shutdown_task

struct GNUNET_SCHEDULER_Task* LEGACY_SERVICE_Context::shutdown_task

Task ID of the shutdown task.

Definition at line 182 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_stop(), service_task(), and shutdown_task().

◆ timeout

struct GNUNET_TIME_Relative LEGACY_SERVICE_Context::timeout

Idle timeout for server.

Definition at line 187 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_run(), LEGACY_SERVICE_start(), service_task(), and setup_service().

◆ ret

int LEGACY_SERVICE_Context::ret

Overall success/failure of the service start.

Definition at line 192 of file tcp_service_legacy.c.

Referenced by check_access(), LEGACY_SERVICE_get_server_addresses(), LEGACY_SERVICE_run(), LEGACY_SERVICE_start(), and service_task().

◆ ready_confirm_fd

int LEGACY_SERVICE_Context::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 199 of file tcp_service_legacy.c.

Referenced by detach_terminal(), LEGACY_SERVICE_run(), LEGACY_SERVICE_start(), and service_task().

◆ require_found

int LEGACY_SERVICE_Context::require_found

Do we close connections if we receive messages for which we have no handler?

Definition at line 205 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_start(), service_task(), and setup_service().

◆ match_uid

int LEGACY_SERVICE_Context::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 212 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_start(), service_task(), and setup_service().

◆ match_gid

int LEGACY_SERVICE_Context::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 221 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_start(), service_task(), and setup_service().

◆ options

enum LEGACY_SERVICE_Options LEGACY_SERVICE_Context::options

Our options.

Definition at line 226 of file tcp_service_legacy.c.

Referenced by LEGACY_SERVICE_run(), LEGACY_SERVICE_start(), service_task(), and shutdown_task().


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