xref: /reactos/sdk/include/psdk/nldef.h (revision c2c66aff)
1 #ifndef _NLDEF_
2 #define _NLDEF_
3 
4 #pragma once
5 
6 #define NL_MAX_METRIC_COMPONENT ((((ULONG) 1) << 31) - 1)
7 
8 typedef enum {
9   IpPrefixOriginOther = 0,
10   IpPrefixOriginManual,
11   IpPrefixOriginWellKnown,
12   IpPrefixOriginDhcp,
13   IpPrefixOriginRouterAdvertisement,
14   IpPrefixOriginUnchanged = 1 << 4
15 } NL_PREFIX_ORIGIN;
16 
17 #define NlpoOther               IpPrefixOriginOther
18 #define NlpoManual              IpPrefixOriginManual
19 #define NlpoWellKnown           IpPrefixOriginWellKnown
20 #define NlpoDhcp                IpPrefixOriginDhcp
21 #define NlpoRouterAdvertisement IpPrefixOriginRouterAdvertisement
22 
23 typedef enum {
24   NlsoOther = 0,
25   NlsoManual,
26   NlsoWellKnown,
27   NlsoDhcp,
28   NlsoLinkLayerAddress,
29   NlsoRandom,
30   IpSuffixOriginOther = 0,
31   IpSuffixOriginManual,
32   IpSuffixOriginWellKnown,
33   IpSuffixOriginDhcp,
34   IpSuffixOriginLinkLayerAddress,
35   IpSuffixOriginRandom,
36   IpSuffixOriginUnchanged = 1 << 4
37 } NL_SUFFIX_ORIGIN;
38 
39 typedef enum {
40   NldsInvalid,
41   NldsTentative,
42   NldsDuplicate,
43   NldsDeprecated,
44   NldsPreferred,
45   IpDadStateInvalid = 0,
46   IpDadStateTentative,
47   IpDadStateDuplicate,
48   IpDadStateDeprecated,
49   IpDadStatePreferred,
50 } NL_DAD_STATE;
51 
52 #define MAKE_ROUTE_PROTOCOL(suffix, value) \
53     MIB_IPPROTO_ ## suffix = value,        \
54     PROTO_IP_ ## suffix    = value
55 
56 typedef enum {
57   RouteProtocolOther = 1,
58   RouteProtocolLocal = 2,
59   RouteProtocolNetMgmt = 3,
60   RouteProtocolIcmp = 4,
61   RouteProtocolEgp = 5,
62   RouteProtocolGgp = 6,
63   RouteProtocolHello = 7,
64   RouteProtocolRip = 8,
65   RouteProtocolIsIs = 9,
66   RouteProtocolEsIs = 10,
67   RouteProtocolCisco = 11,
68   RouteProtocolBbn = 12,
69   RouteProtocolOspf = 13,
70   RouteProtocolBgp = 14,
71   MAKE_ROUTE_PROTOCOL(OTHER, 1),
72   MAKE_ROUTE_PROTOCOL(LOCAL, 2),
73   MAKE_ROUTE_PROTOCOL(NETMGMT, 3),
74   MAKE_ROUTE_PROTOCOL(ICMP, 4),
75   MAKE_ROUTE_PROTOCOL(EGP, 5),
76   MAKE_ROUTE_PROTOCOL(GGP, 6),
77   MAKE_ROUTE_PROTOCOL(HELLO, 7),
78   MAKE_ROUTE_PROTOCOL(RIP, 8),
79   MAKE_ROUTE_PROTOCOL(IS_IS, 9),
80   MAKE_ROUTE_PROTOCOL(ES_IS, 10),
81   MAKE_ROUTE_PROTOCOL(CISCO, 11),
82   MAKE_ROUTE_PROTOCOL(BBN, 12),
83   MAKE_ROUTE_PROTOCOL(OSPF, 13),
84   MAKE_ROUTE_PROTOCOL(BGP, 14),
85   MAKE_ROUTE_PROTOCOL(NT_AUTOSTATIC, 10002),
86   MAKE_ROUTE_PROTOCOL(NT_STATIC, 10006),
87   MAKE_ROUTE_PROTOCOL(NT_STATIC_NON_DOD, 10007),
88 } NL_ROUTE_PROTOCOL, *PNL_ROUTE_PROTOCOL;
89 
90 typedef enum {
91   NlatUnspecified,
92   NlatUnicast,
93   NlatAnycast,
94   NlatMulticast,
95   NlatBroadcast,
96   NlatInvalid
97 } NL_ADDRESS_TYPE, *PNL_ADDRESS_TYPE;
98 
99 typedef enum _NL_ROUTE_ORIGIN {
100   NlroManual,
101   NlroWellKnown,
102   NlroDHCP,
103   NlroRouterAdvertisement,
104   Nlro6to4,
105 } NL_ROUTE_ORIGIN, *PNL_ROUTE_ORIGIN;
106 
107 typedef enum _NL_NEIGHBOR_STATE {
108   NlnsUnreachable,
109   NlnsIncomplete,
110   NlnsProbe,
111   NlnsDelay,
112   NlnsStale,
113   NlnsReachable,
114   NlnsPermanent,
115   NlnsMaximum,
116 } NL_NEIGHBOR_STATE, *PNL_NEIGHBOR_STATE;
117 
118 typedef enum _NL_LINK_LOCAL_ADDRESS_BEHAVIOR{
119   LinkLocalAlwaysOff = 0,
120   LinkLocalDelayed,
121   LinkLocalAlwaysOn,
122   LinkLocalUnchanged = -1
123 } NL_LINK_LOCAL_ADDRESS_BEHAVIOR;
124 
125 typedef struct _NL_INTERFACE_OFFLOAD_ROD {
126   BOOLEAN NlChecksumSupported:1;
127   BOOLEAN NlOptionsSupported:1;
128   BOOLEAN TlDatagramChecksumSupported:1;
129   BOOLEAN TlStreamChecksumSupported:1;
130   BOOLEAN TlStreamOptionsSupported:1;
131   BOOLEAN FastPathCompatible:1;
132   BOOLEAN TlLargeSendOffloadSupported:1;
133   BOOLEAN TlGiantSendOffloadSupported:1;
134 } NL_INTERFACE_OFFLOAD_ROD, *PNL_INTERFACE_OFFLOAD_ROD;
135 
136 typedef enum _NL_ROUTER_DISCOVERY_BEHAVIOR {
137   RouterDiscoveryDisabled = 0,
138   RouterDiscoveryEnabled,
139   RouterDiscoveryDhcp,
140   RouterDiscoveryUnchanged = -1
141 } NL_ROUTER_DISCOVERY_BEHAVIOR;
142 
143 typedef enum _NL_BANDWIDTH_FLAG {
144   NlbwDisabled = 0,
145   NlbwEnabled,
146   NlbwUnchanged = -1
147 } NL_BANDWIDTH_FLAG, *PNL_BANDWIDTH_FLAG;
148 
149 typedef struct _NL_PATH_BANDWIDTH_ROD {
150   ULONG64 Bandwidth;
151   ULONG64 Instability;
152   BOOLEAN BandwidthPeaked;
153 } NL_PATH_BANDWIDTH_ROD, *PNL_PATH_BANDWIDTH_ROD;
154 
155 typedef enum _NL_NETWORK_CATEGORY {
156   NetworkCategoryPublic,
157   NetworkCategoryPrivate,
158   NetworkCategoryDomainAuthenticated,
159   NetworkCategoryUnchanged = -1,
160   NetworkCategoryUnknown = -1
161 } NL_NETWORK_CATEGORY, *PNL_NETWORK_CATEGORY;
162 
163 #define NET_IF_CURRENT_SESSION ((ULONG)-1)
164 
165 #endif /* _NLDEF_ */
166 
167