[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #14283] Add more detailed status callback
From: |
Dirk Ziegelmeier |
Subject: |
[lwip-devel] [task #14283] Add more detailed status callback |
Date: |
Sun, 12 Feb 2017 14:48:21 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 |
Follow-up Comment #1, task #14283 (project lwip):
API Proposal for discussion:
#if LWIP_NETIF_EXT_STATUS_CALLBACK
typedef enum
{
/** netif was removed. arg is NULL */
LWIP_NSC_NETIF_REMOVED,
/** link changed. arg: 1 up, 0 down */
LWIP_NSC_LINK_CHANGED,
/** netif status changed. arg: 1 up, 0 down */
LWIP_NSC_NETIF_STATUS_CHANGED,
/** IPv4 address has changed. arg is NULL */
LWIP_NSC_NETIF_IPV4_ADDRESS_CHANGED,
/** IPv4 gateway has changed. arg is NULL */
LWIP_NSC_NETIF_IPV4_GATEWAY_CHANGED,
/** IPv4 netmask has changed. arg is NULL */
LWIP_NSC_NETIF_IPV4_NETMASK_CHANGED,
/** called AFTER IPv4 address/gateway/netmask changes have been applied */
LWIP_NSC_NETIF_IPV4_SETTINGS_CHANGED,
/** IPv6 address was added. arg is NULL */
LWIP_NSC_NETIF_IPV6_ADDED,
/** IPv6 address was removed. arg is NULL */
LWIP_NSC_NETIF_IPV6_REMOVED
} netif_status_callback_reason_t;
typedef void (*netif_ext_status_callback)(struct netif* netif,
lwip_netif_status_callback_reason_t reason, void* arg, const ip_addr_t* old,
const ip_addr_t* new);
struct netif_ext_callback;
typedef struct netif_ext_callback
{
netif_ext_status_callback callback;
struct netif_ext_callback* next;
} netif_ext_callback_t;
void netif_add_ext_callback(netif_ext_callback_t* callback);
void netif_remove_ext_callback(netif_ext_callback_t* callback);
void netif_invoke_ext_callback(struct netif* netif,
lwip_netif_status_callback_reason_t reason, void* arg, const ip_addr_t* old,
const ip_addr_t* new);
#endif
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?14283>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [task #14283] Add more detailed status callback,
Dirk Ziegelmeier <=
- [lwip-devel] [task #14283] Add more detailed status callback, Dirk Ziegelmeier, 2017/02/12
- [lwip-devel] [task #14283] Add more detailed status callback, Simon Goldschmidt, 2017/02/13
- [lwip-devel] [task #14283] Add more detailed status callback, Dirk Ziegelmeier, 2017/02/13
- [lwip-devel] [task #14283] Add more detailed status callback, Dirk Ziegelmeier, 2017/02/14
- [lwip-devel] [task #14283] Add more detailed status callback, Joel Cunningham, 2017/02/14
- [lwip-devel] [task #14283] Add more detailed status callback, Dirk Ziegelmeier, 2017/02/16
- [lwip-devel] [task #14283] Add more detailed status callback, Dirk Ziegelmeier, 2017/02/20