WiFi Framework是否支持DHCP infinite
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
wifi php?mod=tag&id=6090" target="_blank" class="relatedlink">Framework是否支持DHCP infinite,即从路由器获取无限期的租约
[SOLUTION]
支持的,具体过程如下:
1、路由器可以配置成leasetime= inifite模式,相当于0xFFFFFFF
2、然后native和jni这儿得到的leasetime也是0xFFFFFFF ,jni和native里leasetime都是unsigned int类型
3、而dhcpstatemachine的log里,leasetime 是-1,如下
02-25 03:49:43.474307 695 3289 D DhcpStateMachine: dhcpResults:{InterfaceName: wlan0 LinkAddresses:
[192.168.20.101/24,] Routes: [192.168.20.0/24 -> 0.0.0.0,0.0.0.0/0 -> 192.168.20.1,] DnsAddresses:
[202.106.0.20,202.202.0.33,] Domains: ss6MTU: 0} DHCP server /192.168.20.1 Vendor info lease -1 seconds
PPPlinkname null pid 0
4、当leasetime小于0时,framework层就不会启动alARM去做renew,即infinite