8 struct _flxInterfaceMonitor;
9 typedef struct _flxInterfaceMonitor flxInterfaceMonitor;
11 struct _flxInterfaceAddress;
12 typedef struct _flxInterfaceAddress flxInterfaceAddress;
15 typedef struct _flxInterface flxInterface;
17 struct _flxInterface {
22 guint n_ipv6_addrs, n_ipv4_addrs;
24 flxInterfaceAddress *addresses;
25 flxInterface *next, *prev;
28 struct _flxInterfaceAddress {
33 flxInterface *interface;
34 flxInterfaceAddress *next, *prev;
37 typedef enum { FLX_INTERFACE_NEW, FLX_INTERFACE_REMOVE, FLX_INTERFACE_CHANGE } flxInterfaceChange;
39 flxInterfaceMonitor *flx_interface_monitor_new(GMainContext *c);
40 void flx_interface_monitor_free(flxInterfaceMonitor *m);
42 const flxInterface* flx_interface_monitor_get_interface(flxInterfaceMonitor *m, gint index);
43 const flxInterface* flx_interface_monitor_get_first(flxInterfaceMonitor *m);
45 void flx_interface_monitor_add_interface_callback(
46 flxInterfaceMonitor *m,
47 void (*cb)(flxInterfaceMonitor *m, flxInterfaceChange change, const flxInterface *i, gpointer userdata),
50 void flx_interface_monitor_remove_interface_callback(
51 flxInterfaceMonitor *m,
52 void (*cb)(flxInterfaceMonitor *m, flxInterfaceChange change, const flxInterface *i, gpointer userdata),
55 void flx_interface_monitor_add_address_callback(
56 flxInterfaceMonitor *m,
57 void (*cb)(flxInterfaceMonitor *m, flxInterfaceChange change, const flxInterfaceAddress *a, gpointer userdata),
60 void flx_interface_monitor_remove_address_callback(
61 flxInterfaceMonitor *m,
62 void (*cb)(flxInterfaceMonitor *m, flxInterfaceChange change, const flxInterfaceAddress *a, gpointer userdata),