Data Structures | |
| struct | bootp |
Defines | |
| #define | DHCP_SERVERPORT 67 |
| #define | DHCP_CLIENTPORT 68 |
| #define | DHCPOPT_PAD 0 |
| #define | DHCPOPT_NETMASK 1 |
| #define | DHCPOPT_GATEWAY 3 |
| #define | DHCPOPT_DNS 6 |
| #define | DHCPOPT_HOSTNAME 12 |
| #define | DHCPOPT_DOMAIN 15 |
| #define | DHCPOPT_BROADCAST 28 |
| #define | DHCPOPT_REQUESTIP 50 |
| #define | DHCPOPT_LEASETIME 51 |
| #define | DHCPOPT_MSGTYPE 53 |
| #define | DHCPOPT_SID 54 |
| #define | DHCPOPT_RENEWALTIME 58 |
| #define | DHCPOPT_REBINDTIME 59 |
| #define | DHCPOPT_END 255 |
| #define | DHCP_DISCOVER 1 |
| #define | DHCP_OFFER 2 |
| #define | DHCP_REQUEST 3 |
| #define | DHCP_DECLINE 4 |
| #define | DHCP_ACK 5 |
| #define | DHCP_NAK 6 |
| #define | DHCP_RELEASE 7 |
| #define | DHCP_INFORM 8 |
Typedefs | |
| typedef bootp | BOOTPHDR |
Functions | |
| u_short | DhcpFrameInit (void) |
| Initialize the global send frame for DHCP requests. | |
| u_short | DhcpRequestFrame (void) |
| u_char | DhcpGetOption (u_char opt, void *ptr, u_char size) |
| Retrive the specified DCHP option. | |
| int | DhcpQuery (void) |
| Query any DHCP server on the local net. | |
Variables | |
| u_char | cookie [4] = { 0x63, 0x82, 0x53, 0x63 } |
|
|
Initialize the global send frame for DHCP requests.
|
|
||||||||||||||||
|
Retrive the specified DCHP option.
|
|
|
Query any DHCP server on the local net.
On success, this routine will fill some global variables:
|