DHCP option 52, Option Overload

在RFC2132中对OPTION 52的定义如下:

9.3. Option Overload



   This option is used to indicate that the DHCP 'sname' or 'file'
   fields are being overloaded by using them to carry DHCP options. A
   DHCP server inserts this option if the returned parameters will
   exceed the usual space allotted for options.


   If this option is present, the client interprets the specified
   additional fields after it concludes interpretation of the standard
   option fields.


   The code for this option is 52, and its length is 1.  Legal values
   for this option are:


           Value   Meaning
           -----   --------
             1     the 'file' field is used to hold options
             2     the 'sname' field is used to hold options
             3     both fields are used to hold options


    Code   Len  Value
   +-----+-----+-----+
   |  52 |  1  |1/2/3|

   +-----+-----+-----+


看完这段英文描述,感觉云里雾里的,网上搜索相关的资料,也不是很多。

硬着头皮分析源代码,如果将overload理解为c++中的overload(重载),一下子就茅塞顿开了。

在大多数的DHCP报文中,sname和file两个固定的字段一共会占用178个字节,但是大多数情况下却为空,

option 52的意思是重载dhcp头中的sname和file两个字段,使其能得到真正的充分利用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值