Watt-32 tcp/ip  2.2 dev-rel.10
Data Structures | Enumerations | Functions
pcdhcp.h File Reference

Go to the source code of this file.

Data Structures

struct  DHCP_list
 
struct  dhcp
 

Enumerations

enum  DHCP_MsgTypes {
  DHCP_DISCOVER = 1,
  DHCP_OFFER,
  DHCP_REQUEST,
  DHCP_DECLINE,
  DHCP_ACK,
  DHCP_NAK,
  DHCP_RELEASE,
  DHCP_INFORM
}
 
enum  DHCP_Events {
  EVENT_OFFER = 1,
  EVENT_SEND_TIMEOUT,
  EVENT_T1_TIMEOUT,
  EVENT_T2_TIMEOUT,
  EVENT_ACK,
  EVENT_NAK
}
 
enum  DHCP_Options {
  DHCP_OPT_PAD = 0,
  DHCP_OPT_SUBNET_MASK = 1,
  DHCP_OPT_TIME_OFFSET = 2,
  DHCP_OPT_ROUTERS_ON_SNET = 3,
  DHCP_OPT_TIME_SRV = 4,
  DHCP_OPT_NAME_SRV = 5,
  DHCP_OPT_DNS_SRV = 6,
  DHCP_OPT_LOG_SRV = 7,
  DHCP_OPT_COOKIE_SRV = 8,
  DHCP_OPT_LPR_SRV = 9,
  DHCP_OPT_IMPRESS_SRV = 10,
  DHCP_OPT_RES_LOCATION_SRV = 11,
  DHCP_OPT_HOST_NAME = 12,
  DHCP_OPT_BOOT_FSIZE = 13,
  DHCP_OPT_MERIT_DUMPFILE = 14,
  DHCP_OPT_DOMAIN_NAME = 15,
  DHCP_OPT_SWAP_SRV = 16,
  DHCP_OPT_ROOT_PATH = 17,
  DHCP_OPT_EXTENTIONS_PATH = 18,
  DHCP_OPT_IP_FORWARDING = 19,
  DHCP_OPT_NON_LOCAL_SRC_ROUTE = 20,
  DHCP_OPT_POLICY_FILTER = 21,
  DHCP_OPT_MAX_DGRAM_REASM_SIZE = 22,
  DHCP_OPT_IP_DEFAULT_TTL = 23,
  DHCP_OPT_PATH_MTU_AGING_TIMEOUT = 24,
  DHCP_OPT_PATH_MTU_PLATEAU_TABLE = 25,
  DHCP_OPT_IF_MTU = 26,
  DHCP_OPT_ALL_SUBNETS_LOCAL = 27,
  DHCP_OPT_BROADCAST_ADDR = 28,
  DHCP_OPT_PERFORM_MASK_DISCOVERY = 29,
  DHCP_OPT_MASK_SUPPLIER = 30,
  DHCP_OPT_PERFORM_ROUTER_DISCOVERY = 31,
  DHCP_OPT_ROUTER_SOLICITATION_ADDR = 32,
  DHCP_OPT_STATIC_ROUTE = 33,
  DHCP_OPT_TRAILER_ENCAPSULATION = 34,
  DHCP_OPT_ARP_CACHE_TIMEOUT = 35,
  DHCP_OPT_ETHERNET_ENCAPSULATION = 36,
  DHCP_OPT_TCP_DEFAULT_TTL = 37,
  DHCP_OPT_TCP_KEEPALIVE_INTERVAL = 38,
  DHCP_OPT_TCP_KEEPALIVE_GARBAGE = 39,
  DHCP_OPT_NIS_DOMAIN_NAME = 40,
  DHCP_OPT_NIS_SRVS = 41,
  DHCP_OPT_NTP_SRVS = 42,
  DHCP_OPT_VENDOR_SPECIFIC_INFO = 43,
  DHCP_OPT_NBIOS_NAME_SRV = 44,
  DHCP_OPT_NBIOS_DGRAM_DIST_SRV = 45,
  DHCP_OPT_NBIOS_NODE_TYPE = 46,
  DHCP_OPT_NBIOS_SCOPE = 47,
  DHCP_OPT_XFONT_SRV = 48,
  DHCP_OPT_XDISPLAY_MANAGER = 49,
  DHCP_OPT_REQUESTED_IP_ADDR = 50,
  DHCP_OPT_IP_ADDR_LEASE_TIME = 51,
  DHCP_OPT_OVERLOAD = 52,
  DHCP_OPT_MSG_TYPE = 53,
  DHCP_OPT_SRV_IDENTIFIER = 54,
  DHCP_OPT_PARAM_REQUEST = 55,
  DHCP_OPT_MSG = 56,
  DHCP_OPT_MAX_MSG_SIZE = 57,
  DHCP_OPT_T1_VALUE = 58,
  DHCP_OPT_T2_VALUE = 59,
  DHCP_OPT_CLASS_ID = 60,
  DHCP_OPT_CLIENT_ID = 61,
  DHCP_OPT_NIS_DOMAIN = 64,
  DHCP_OPT_NIS_SRV_OPT = 65,
  DHCP_OPT_TFTP_SERVER = 66,
  DHCP_OPT_BOOT_FILENAME = 67,
  DHCP_OPT_MOBIP_HOME_AGENTS = 68,
  DHCP_OPT_SMTP_SRVS = 69,
  DHCP_OPT_POP3_SRVS = 70,
  DHCP_OPT_NNTP_SRVS = 71,
  DHCP_OPT_WWW_SRVS = 72,
  DHCP_OPT_FINGER_SRVS = 73,
  DHCP_OPT_IRC_SRVS = 74,
  DHCP_OPT_STREET_TALK_SRVS = 75,
  DHCP_OPT_STDA_SRVS = 76,
  DHCP_OPT_USER_CLASS = 77,
  DHCP_OPT_GRUB_MENU = 150,
  DHCP_OPT_END = 255
}
 

Functions

int DHCP_do_boot (void)
 Our first time DHCP handler. More...
 
void DHCP_init (void)
 Initialises the DHCP config-parser.
 

Function Documentation

int DHCP_do_boot ( void  )

Our first time DHCP handler.

Called if:

  • we don't have a WATTCP.CFG file
  • or we specified "MY_IP = DHCP".
  • or reading a previous W32DHCP.TMP file with transient config failed.
  • or lease times call for a renew or rebind. It doesn't hurt that it is blocking.

Definition at line 1056 of file pcdhcp.c.

References dhcp_fsm(), dhcp_open(), DHCP_state_BOUND(), DHCP_state_INIT(), DHCP_state_REBINDING(), DHCP_state_RENEWING(), erase_config(), my_ip_addr, set_timeout(), sin_mask, tcp_tick(), and write_config().