1. 程式人生 > >Linux下DHCP協議解析及客戶端原始碼實現

Linux下DHCP協議解析及客戶端原始碼實現

Option ID

Length(位元組)

描述

1

4

Subnet Mask

3

n*4

Router(閘道器)

6

n*4

DNS Server

7

n*4

Log Server

26

2

Interface MTU

33

n*8

Static route

35

4

ARP cache timeout

42

n*4

NTP servers

51

4

IP address lease time

53

1

Message type 1-DHCPDISCOVER 2-DHCPOFFER 3-DHCPREQUEST 4-DHCPDECLINE 5-DHCPACK 6-DHCPNAK 7-DHCPRELEASE 8-DHCPINFORM

54

4

DHCP Server Identifier