mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-06 16:56:31 +00:00
netutils/dhcpc/dhcpc: add implementation to get renewal (T1) time and
rebinding (T2) time from DHCP packet. According to RFC 2131, T1 and T2 times play a critical role in lease management in DHCP clients. Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
This commit is contained in:
parent
8d2a7e32a5
commit
8f3c3c57f9
2 changed files with 37 additions and 1 deletions
|
|
@ -58,6 +58,8 @@ struct dhcpc_state
|
|||
struct in_addr dnsaddr;
|
||||
struct in_addr default_router;
|
||||
uint32_t lease_time; /* Lease expires in this number of seconds */
|
||||
uint32_t renewal_time; /* Seconds to transition to RENEW state(T1) */
|
||||
uint32_t rebinding_time; /* Seconds to transition to REBIND state(T2) */
|
||||
};
|
||||
|
||||
typedef void (*dhcpc_callback_t)(FAR struct dhcpc_state *presult);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue