source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ifdef.h@ 1166

Last change on this file since 1166 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.4 KB
Line 
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_IFDEF
7#define _INC_IFDEF
8
9#include <ipifcons.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#define IF_MAX_STRING_SIZE 256
16#define IF_MAX_PHYS_ADDRESS_LENGTH 32
17
18typedef UINT32 NET_IF_COMPARTMENT_ID, *PNET_IF_COMPARTMENT_ID;
19
20typedef ULONG NET_IFINDEX, *PNET_IFINDEX;
21typedef UINT16 NET_IFTYPE, *PNET_IFTYPE;
22typedef NET_IFINDEX IF_INDEX, *PIF_INDEX;
23
24typedef GUID NET_IF_NETWORK_GUID;
25
26typedef enum _IF_OPER_STATUS {
27 IfOperStatusUp = 1,
28 IfOperStatusDown,
29 IfOperStatusTesting,
30 IfOperStatusUnknown,
31 IfOperStatusDormant,
32 IfOperStatusNotPresent,
33 IfOperStatusLowerLayerDown
34} IF_OPER_STATUS;
35
36typedef enum _NET_IF_OPER_STATUS {
37 NET_IF_OPER_STATUS_UP = 1,
38 NET_IF_OPER_STATUS_DOWN,
39 NET_IF_OPER_STATUS_TESTING,
40 NET_IF_OPER_STATUS_UNKNOWN,
41 NET_IF_OPER_STATUS_DORMANT,
42 NET_IF_OPER_STATUS_NOT_PRESENT,
43 NET_IF_OPER_STATUS_LOWER_LAYER_DOWN
44} NET_IF_OPER_STATUS, *PNET_IF_OPER_STATUS;
45
46typedef enum _NET_IF_ADMIN_STATUS {
47 NET_IF_ADMIN_STATUS_UP = 1,
48 NET_IF_ADMIN_STATUS_DOWN,
49 NET_IF_ADMIN_STATUS_TESTING
50} NET_IF_ADMIN_STATUS, *PNET_IF_ADMIN_STATUS;
51
52typedef enum _NET_IF_MEDIA_CONNECT_STATE {
53 MediaConnectStateUnknown,
54 MediaConnectStateConnected,
55 MediaConnectStateDisconnected
56} NET_IF_MEDIA_CONNECT_STATE, *PNET_IF_MEDIA_CONNECT_STATE;
57
58typedef enum _NET_IF_ACCESS_TYPE {
59 NET_IF_ACCESS_LOOPBACK = 1,
60 NET_IF_ACCESS_BROADCAST,
61 NET_IF_ACCESS_POINT_TO_POINT,
62 NET_IF_ACCESS_POINT_TO_MULTI_POINT,
63 NET_IF_ACCESS_MAXIMUM
64} NET_IF_ACCESS_TYPE, *PNET_IF_ACCESS_TYPE;
65
66typedef enum _NET_IF_CONNECTION_TYPE {
67 NET_IF_CONNECTION_DEDICATED = 1,
68 NET_IF_CONNECTION_PASSIVE,
69 NET_IF_CONNECTION_DEMAND,
70 NET_IF_CONNECTION_MAXIMUM
71} NET_IF_CONNECTION_TYPE, *PNET_IF_CONNECTION_TYPE;
72
73typedef enum _NET_IF_DIRECTION_TYPE {
74 NET_IF_DIRECTION_SENDRECEIVE,
75 NET_IF_DIRECTION_SENDONLY,
76 NET_IF_DIRECTION_RECEIVEONLY,
77 NET_IF_DIRECTION_MAXIMUM
78} NET_IF_DIRECTION_TYPE, *PNET_IF_DIRECTION_TYPE;
79
80typedef enum _NET_IF_MEDIA_DUPLEX_STATE {
81 MediaDuplexStateUnknown,
82 MediaDuplexStateHalf,
83 MediaDuplexStateFull
84} NET_IF_MEDIA_DUPLEX_STATE, *PNET_IF_MEDIA_DUPLEX_STATE;
85
86typedef enum _TUNNEL_TYPE {
87 TUNNEL_TYPE_NONE = 0,
88 TUNNEL_TYPE_OTHER = 1,
89 TUNNEL_TYPE_DIRECT = 2,
90 TUNNEL_TYPE_6TO4 = 11,
91 TUNNEL_TYPE_ISATAP = 13,
92 TUNNEL_TYPE_TEREDO = 14,
93 TUNNEL_TYPE_IPHTTPS = 15
94} TUNNEL_TYPE, *PTUNNEL_TYPE;
95
96typedef union _NET_LUID {
97 ULONG64 Value;
98 __C89_NAMELESS struct { /* bitfield with 64 bit types. */
99 ULONG64 Reserved :24;
100 ULONG64 NetLuidIndex :24;
101 ULONG64 IfType :16;
102 } Info;
103} NET_LUID, *PNET_LUID;
104
105typedef NET_LUID IF_LUID, *PIF_LUID;
106
107typedef struct _IF_COUNTED_STRING_LH {
108 USHORT Length;
109 WCHAR String[IF_MAX_STRING_SIZE + 1];
110} IF_COUNTED_STRING_LH, *PIF_COUNTED_STRING_LH;
111typedef IF_COUNTED_STRING_LH IF_COUNTED_STRING;
112typedef IF_COUNTED_STRING *PIF_COUNTED_STRING;
113
114typedef struct _IF_PHYSICAL_ADDRESS_LH {
115 USHORT Length;
116 UCHAR Address[IF_MAX_PHYS_ADDRESS_LENGTH];
117} IF_PHYSICAL_ADDRESS_LH, *PIF_PHYSICAL_ADDRESS_LH;
118typedef IF_PHYSICAL_ADDRESS_LH IF_PHYSICAL_ADDRESS;
119typedef IF_PHYSICAL_ADDRESS *PIF_PHYSICAL_ADDRESS;
120
121#ifdef __cplusplus
122}
123#endif
124
125#endif /* _INC_IFDEF */
126
Note: See TracBrowser for help on using the repository browser.