1 #ifndef fooifacewindowshfoo
2 #define fooifacewindowshfoo
4 #include <catta/llist.h>
7 // we register with Windows to receive callbacks when IP interfaces change.
8 // we save these events in the structures below and pick them up from our
9 // own mainloop which we wake via a pipe.
11 typedef struct ChangeEvent ChangeEvent;
13 typedef struct CattaInterfaceMonitorOSDep {
14 pthread_mutex_t mutex; // guards access to event queues and the pipe
16 CATTA_LLIST_HEAD(ChangeEvent, events);
18 int pipefd[2]; // used to wake up the mainloop and check for events
20 // handles for deregistering the handler and notification callbacks
21 HANDLE icnhandle; // interface change notification handle
22 HANDLE acnhandle; // address change notification handle
24 } CattaInterfaceMonitorOSDep;