1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_DHCPV6CSDK 7 #define _INC_DHCPV6CSDK 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 #if (_WIN32_WINNT >= 0x0600) 14 15 typedef enum _StatusCode { 16 STATUS_NO_ERROR, 17 STATUS_UNSPECIFIED_FAILURE, 18 STATUS_NO_BINDING, 19 STATUS_NOPREFIX_AVAIL 20 } StatusCode; 21 22 typedef struct _DHCPV6CAPI_CLASSID { 23 ULONG Flags; 24 LPBYTE Data; 25 ULONG nBytesData; 26 } DHCPV6CAPI_CLASSID, *PDHCPV6CAPI_CLASSID, *LPDHCPV6CAPI_CLASSID; 27 28 typedef struct _DHCPV6CAPI_PARAMS { 29 ULONG Flags; 30 ULONG OptionId; 31 WINBOOL IsVendor; 32 LPBYTE Data; 33 DWORD nBytesData; 34 } DHCPV6CAPI_PARAMS, *PDHCPV6CAPI_PARAMS, *LPDHCPV6CAPI_PARAMS; 35 36 typedef struct _DHCPV6Prefix { 37 UCHAR prefix[16]; 38 DWORD prefixLength; 39 DWORD preferredLifeTime; 40 DWORD validLifeTime; 41 StatusCode status; 42 } DHCPV6Prefix, *PDHCPV6Prefix, *LPDHCPV6Prefix; 43 44 typedef struct _DHCPV6CAPI_PARAMS_ARRAY { 45 ULONG nParams; 46 LPDHCPV6CAPI_PARAMS Params; 47 } DHCPV6CAPI_PARAMS_ARRAY, *PDHCPV6CAPI_PARAMS_ARRAY, *LPDHCPV6CAPI_PARAMS_ARRAY; 48 49 typedef struct _DHCPV6PrefixLeaseInformation { 50 DWORD nPrefixes; 51 LPDHCPV6Prefix prefixArray; 52 DWORD iaid; 53 time_t T1; 54 time_t T2; 55 time_t MaxLeaseExpirationTime; 56 time_t LastRenewalTime; 57 StatusCode status; 58 LPBYTE ServerId; 59 DWORD ServerIdLen; 60 } DHCPV6PrefixLeaseInformation, *PDHCPV6PrefixLeaseInformation, *LPDHCPV6PrefixLeaseInformation, *LPDHCPV6CAPIPrefixLeaseInformation; 61 62 VOID APIENTRY Dhcpv6CApiCleanup(void); 63 64 DWORD APIENTRY Dhcpv6CApiInitialize( 65 LPDWORD Version 66 ); 67 68 DWORD APIENTRY Dhcpv6RenewPrefix( 69 LPWSTR adapterName, 70 LPDHCPV6CAPI_CLASSID classId, 71 LPDHCPV6CAPIPrefixLeaseInformation prefixleaseInfo 72 ); 73 74 DWORD APIENTRY Dhcpv6RenewPrefix( 75 LPWSTR adapterName, 76 LPDHCPV6CAPI_CLASSID classId, 77 LPDHCPV6PrefixLeaseInformation prefixleaseInfo, 78 DWORD pdwTimeToWait, 79 DWORD bValidatePrefix 80 ); 81 82 DWORD APIENTRY Dhcpv6RequestPrefix( 83 LPWSTR adapterName, 84 LPDHCPV6CAPI_CLASSID classId, 85 LPDHCPV6PrefixLeaseInformation prefixleaseInfo, 86 DWORD pdwTimeToWait 87 ); 88 89 #endif /* (_WIN32_WINNT >= 0x0600) */ 90 91 #ifdef __cplusplus 92 } 93 #endif 94 95 #endif /*_INC_DHCPV6CSDK*/ 96