mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-13 08:50:16 +00:00
netutils/dhcpc: add non-blocking interface
Signed-off-by: songlinzhang <songlinzhang@xiaomi.com>
This commit is contained in:
parent
c9f736005a
commit
e0fc53b23c
2 changed files with 145 additions and 11 deletions
|
|
@ -63,6 +63,8 @@ struct dhcpc_state
|
|||
uint32_t lease_time; /* Lease expires in this number of seconds */
|
||||
};
|
||||
|
||||
typedef void (*dhcpc_callback_t)(FAR struct dhcpc_state *presult);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
|
@ -78,6 +80,8 @@ extern "C"
|
|||
FAR void *dhcpc_open(FAR const char *interface,
|
||||
FAR const void *mac_addr, int mac_len);
|
||||
int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult);
|
||||
int dhcpc_request_async(FAR void *handle, dhcpc_callback_t callback);
|
||||
void dhcpc_cancel(FAR void *handle);
|
||||
void dhcpc_close(FAR void *handle);
|
||||
|
||||
#undef EXTERN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue