OpenVPN
dhcp.h File Reference
#include "common.h"
#include "buffer.h"
#include "proto.h"
#include "tun.h"
Include dependency graph for dhcp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dhcp
struct  dhcp_full

Macros

#define DHCP_PAD   0
#define DHCP_ROUTER   3
#define DHCP_DOMAIN_SERVER   6
#define DHCP_DOMAIN_NAME   15
#define DHCP_NTP_SERVER   42
#define DHCP_VENDOR   43
#define DHCP_NETBIOS_DOMAIN_SERVER   44
#define DHCP_NETBIOS_DIST_SERVER   45
#define DHCP_NETBIOS_NODE_TYPE   46
#define DHCP_NETBIOS_SCOPE   47
#define DHCP_MSG_TYPE   53
#define DHCP_DOMAIN_SEARCH   119
#define DHCP_END   255
#define DHCPDISCOVER   1
#define DHCPOFFER   2
#define DHCPREQUEST   3
#define DHCPDECLINE   4
#define DHCPACK   5
#define DHCPNAK   6
#define DHCPRELEASE   7
#define DHCPINFORM   8
#define BOOTPS_PORT   67
#define BOOTPC_PORT   68
#define BOOTREQUEST   1
#define BOOTREPLY   2
#define DHCP_OPTIONS_BUFFER_SIZE   256

Functions

in_addr_t dhcp_extract_router_msg (struct buffer *ipbuf)
bool build_dhcp_options_string (struct buffer *buf, const struct tuntap_options *o)

Macro Definition Documentation

◆ BOOTPC_PORT

#define BOOTPC_PORT   68

Definition at line 59 of file dhcp.h.

Referenced by dhcp_extract_router_msg().

◆ BOOTPS_PORT

#define BOOTPS_PORT   67

Definition at line 58 of file dhcp.h.

Referenced by dhcp_extract_router_msg().

◆ BOOTREPLY

#define BOOTREPLY   2

Definition at line 64 of file dhcp.h.

Referenced by dhcp_extract_router_msg().

◆ BOOTREQUEST

#define BOOTREQUEST   1

Definition at line 63 of file dhcp.h.

◆ DHCP_DOMAIN_NAME

#define DHCP_DOMAIN_NAME   15

Definition at line 36 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCP_DOMAIN_SEARCH

#define DHCP_DOMAIN_SEARCH   119

Definition at line 44 of file dhcp.h.

Referenced by build_dhcp_options_string(), and test_write_dhcp_search_str().

◆ DHCP_DOMAIN_SERVER

#define DHCP_DOMAIN_SERVER   6

Definition at line 35 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCP_END

#define DHCP_END   255

Definition at line 45 of file dhcp.h.

Referenced by do_extract(), and get_dhcp_message_type().

◆ DHCP_MSG_TYPE

#define DHCP_MSG_TYPE   53

Definition at line 43 of file dhcp.h.

Referenced by get_dhcp_message_type().

◆ DHCP_NETBIOS_DIST_SERVER

#define DHCP_NETBIOS_DIST_SERVER   45

Definition at line 40 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCP_NETBIOS_DOMAIN_SERVER

#define DHCP_NETBIOS_DOMAIN_SERVER   44

Definition at line 39 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCP_NETBIOS_NODE_TYPE

#define DHCP_NETBIOS_NODE_TYPE   46

Definition at line 41 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCP_NETBIOS_SCOPE

#define DHCP_NETBIOS_SCOPE   47

Definition at line 42 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCP_NTP_SERVER

#define DHCP_NTP_SERVER   42

Definition at line 37 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCP_OPTIONS_BUFFER_SIZE

#define DHCP_OPTIONS_BUFFER_SIZE   256

Definition at line 88 of file dhcp.h.

◆ DHCP_PAD

#define DHCP_PAD   0

Definition at line 33 of file dhcp.h.

Referenced by do_extract(), and get_dhcp_message_type().

◆ DHCP_ROUTER

#define DHCP_ROUTER   3

Definition at line 34 of file dhcp.h.

Referenced by do_extract().

◆ DHCP_VENDOR

#define DHCP_VENDOR   43

Definition at line 38 of file dhcp.h.

Referenced by build_dhcp_options_string().

◆ DHCPACK

#define DHCPACK   5

Definition at line 52 of file dhcp.h.

Referenced by dhcp_extract_router_msg().

◆ DHCPDECLINE

#define DHCPDECLINE   4

Definition at line 51 of file dhcp.h.

◆ DHCPDISCOVER

#define DHCPDISCOVER   1

Definition at line 48 of file dhcp.h.

◆ DHCPINFORM

#define DHCPINFORM   8

Definition at line 55 of file dhcp.h.

◆ DHCPNAK

#define DHCPNAK   6

Definition at line 53 of file dhcp.h.

◆ DHCPOFFER

#define DHCPOFFER   2

Definition at line 49 of file dhcp.h.

Referenced by dhcp_extract_router_msg().

◆ DHCPRELEASE

#define DHCPRELEASE   7

Definition at line 54 of file dhcp.h.

◆ DHCPREQUEST

#define DHCPREQUEST   3

Definition at line 50 of file dhcp.h.

Function Documentation

◆ build_dhcp_options_string()

◆ dhcp_extract_router_msg()