OpenVPN
syshead.h File Reference
#include "compat.h"
#include <stdbool.h>
#include <windows.h>
#include <winsock2.h>
#include <tlhelp32.h>
#include <inttypes.h>
#include <time.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <signal.h>
#include <limits.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <naptypes.h>
#include <ntddndis.h>
#include <iphlpapi.h>
#include <wininet.h>
#include <shellapi.h>
#include <io.h>
#include <ws2tcpip.h>
Include dependency graph for syshead.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define likely(x)
#define unlikely(x)
#define sleep(x)
#define random   rand
#define srandom   srand
#define SIGHUP   1
#define SIGINT   2
#define SIGUSR1   10
#define SIGUSR2   12
#define SIGTERM   15
#define PASSTOS_CAPABILITY   0
#define ENABLE_IP_PKTINFO   0
#define SOL_IP   IPPROTO_IP
#define SYSLOG_CAPABILITY   0
#define O_BINARY   0
#define PATH_SEPARATOR   '\\'
#define PATH_SEPARATOR_STR   "\\"
#define SOCKET_UNDEFINED   (INVALID_SOCKET)
#define SOCKET_PRINTF   "%" PRIxPTR
#define PORT_SHARE   0
#define UNIX_SOCK_SUPPORT   0
#define PROXY_DIGEST_AUTH   1
#define ENABLE_CRYPTOAPI
#define POLL   0
#define EPOLL   0

Typedefs

typedef uint32_t in_addr_t
typedef uint16_t in_port_t
typedef unsigned short sa_family_t
typedef SOCKET socket_descriptor_t

Functions

static int socket_defined (const socket_descriptor_t sd)

Macro Definition Documentation

◆ ENABLE_CRYPTOAPI

#define ENABLE_CRYPTOAPI

Definition at line 495 of file syshead.h.

◆ ENABLE_IP_PKTINFO

#define ENABLE_IP_PKTINFO   0

Definition at line 394 of file syshead.h.

◆ EPOLL

#define EPOLL   0

Definition at line 515 of file syshead.h.

◆ likely

#define likely ( x)
Value:
(x)

Definition at line 34 of file syshead.h.

Referenced by buf_defined(), buf_size_valid(), buf_size_valid_signed(), buf_valid(), and get_tun_ip_ver().

◆ O_BINARY

#define O_BINARY   0

Definition at line 425 of file syshead.h.

Referenced by packet_id_persist_load().

◆ PASSTOS_CAPABILITY

#define PASSTOS_CAPABILITY   0

Definition at line 382 of file syshead.h.

◆ PATH_SEPARATOR

#define PATH_SEPARATOR   '\\'

Definition at line 432 of file syshead.h.

Referenced by platform_gen_path(), and verify_check_crl_dir().

◆ PATH_SEPARATOR_STR

#define PATH_SEPARATOR_STR   "\\"

Definition at line 433 of file syshead.h.

Referenced by prepend_dir().

◆ POLL

#define POLL   0

Definition at line 506 of file syshead.h.

◆ PORT_SHARE

#define PORT_SHARE   0

Definition at line 474 of file syshead.h.

◆ PROXY_DIGEST_AUTH

#define PROXY_DIGEST_AUTH   1

Definition at line 489 of file syshead.h.

◆ random

#define random   rand

Definition at line 43 of file syshead.h.

Referenced by schedule_set_pri(), test_list(), test_siphash_openssl(), and tv_randomize().

◆ SIGHUP

◆ SIGINT

◆ SIGTERM

◆ SIGUSR1

◆ SIGUSR2

◆ sleep

#define sleep ( x)
Value:
Sleep((x) * 1000)

Definition at line 42 of file syshead.h.

Referenced by add_option(), cc_handle_deferred_v1(), do_ifconfig_ipv6(), management_event_loop_n_seconds(), and management_sleep().

◆ SOCKET_PRINTF

#define SOCKET_PRINTF   "%" PRIxPTR

Definition at line 444 of file syshead.h.

Referenced by dco_new_peer(), and x_check_status().

◆ SOCKET_UNDEFINED

◆ SOL_IP

#define SOL_IP   IPPROTO_IP

Definition at line 402 of file syshead.h.

Referenced by create_socket_udp().

◆ srandom

#define srandom   srand

Definition at line 44 of file syshead.h.

Referenced by init_static().

◆ SYSLOG_CAPABILITY

#define SYSLOG_CAPABILITY   0

Definition at line 418 of file syshead.h.

◆ UNIX_SOCK_SUPPORT

#define UNIX_SOCK_SUPPORT   0

Definition at line 483 of file syshead.h.

◆ unlikely

#define unlikely ( x)
Value:
(x)

Definition at line 35 of file syshead.h.

Referenced by array_mult_safe(), packet_id_debug(), rand_bytes(), and token_decode().

Typedef Documentation

◆ in_addr_t

typedef uint32_t in_addr_t

Definition at line 52 of file syshead.h.

◆ in_port_t

typedef uint16_t in_port_t

Definition at line 53 of file syshead.h.

◆ sa_family_t

typedef unsigned short sa_family_t

Definition at line 409 of file syshead.h.

◆ socket_descriptor_t

typedef SOCKET socket_descriptor_t

Definition at line 445 of file syshead.h.

Function Documentation

◆ socket_defined()