aboutsummaryrefslogtreecommitdiff
path: root/ports/winnt/include/ntp_iocompletionport.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/winnt/include/ntp_iocompletionport.h')
-rw-r--r--ports/winnt/include/ntp_iocompletionport.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/ports/winnt/include/ntp_iocompletionport.h b/ports/winnt/include/ntp_iocompletionport.h
index b75c421c18c5..9d39a3197844 100644
--- a/ports/winnt/include/ntp_iocompletionport.h
+++ b/ports/winnt/include/ntp_iocompletionport.h
@@ -8,18 +8,40 @@
#if defined(HAVE_IO_COMPLETION_PORT)
+/* NotifyIpInterfaceChange() is available on Windows Vista and later. */
+typedef enum ENUM_DONTCARE_MIB_NOTIF_TYPE {
+ SomeType_DontCare
+} MIB_NOTIF_TYPE;
+
+typedef void
+(WINAPI* PMYIPINTERFACE_CHANGE_CALLBACK) (
+ PVOID CallerContext,
+ PVOID Row,
+ MIB_NOTIF_TYPE NotificationType
+ );
+
+typedef DWORD (WINAPI* NotifyIpInterfaceChange_ptr)(
+ ADDRESS_FAMILY Family,
+ PMYIPINTERFACE_CHANGE_CALLBACK Callback,
+ PVOID CallerContext,
+ BOOLEAN InitialNotification,
+ HANDLE* NotificationHandle
+ );
+
+extern NotifyIpInterfaceChange_ptr pNotifyIpInterfaceChange;
+
+
struct refclockio; /* in ntp_refclock.h but inclusion here triggers problems */
-struct interface; /* likewise */
extern void init_io_completion_port(void);
extern void uninit_io_completion_port(void);
-extern BOOL io_completion_port_add_interface(struct interface*);
-extern void io_completion_port_remove_interface(struct interface*);
+extern BOOL io_completion_port_add_interface(endpt *);
+extern void io_completion_port_remove_interface(endpt *);
-extern BOOL io_completion_port_add_socket(SOCKET fd, struct interface *, BOOL bcast);
-extern void io_completion_port_remove_socket(SOCKET fd, struct interface*);
+extern BOOL io_completion_port_add_socket(SOCKET fd, endpt *, BOOL bcast);
+extern void io_completion_port_remove_socket(SOCKET fd, endpt *);
extern int io_completion_port_sendto(endpt*, SOCKET, void *, size_t, sockaddr_u *);
@@ -27,6 +49,9 @@ extern BOOL io_completion_port_add_clock_io(struct refclockio *rio);
extern void io_completion_port_remove_clock_io(struct refclockio *rio);
extern int GetReceivedBuffers(void);
+extern void WINAPI IpInterfaceChangedCallback(PVOID ctx, PVOID row,
+ MIB_NOTIF_TYPE type);
+
extern HANDLE WaitableExitEventHandle;