Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

789 lines
22 KiB

  1. /*++
  2. Copyright (c) 1995-1999 Microsoft Corporation
  3. Module Name:
  4. routprot.h
  5. Abstract:
  6. Include file for Routing Protocol inteface to Router Managers
  7. --*/
  8. #ifndef _ROUTPROT_H_
  9. #define _ROUTPROT_H_
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif
  13. #include "stm.h"
  14. #if _MSC_VER >= 1200
  15. #pragma warning(push)
  16. #endif
  17. #pragma warning(disable:4201)
  18. #pragma warning(disable:4200)
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. //////////////////////////////////////////////////////////////////////////////
  23. // //
  24. // Supported functionality flags //
  25. // //
  26. // ROUTING Imports Routing Table Manager APIs //
  27. // SERVICES Exports Service Table Manager APIs //
  28. // DEMAND_UPDATE_ROUTES IP and IPX RIP support for Autostatic //
  29. // DEMAND_UPDATE_SERVICES IPX SAP, NLSP support for Autostatic //
  30. // ADD_ALL_INTERFACES Adds all interfaces, even if no info is present //
  31. // MULTICAST Supports multicast //
  32. // POWER Power Manageable //
  33. // //
  34. //////////////////////////////////////////////////////////////////////////////
  35. #define RF_ROUTING 0x00000001
  36. #define RF_DEMAND_UPDATE_ROUTES 0x00000004
  37. #define RF_ADD_ALL_INTERFACES 0x00000010
  38. #define RF_MULTICAST 0x00000020
  39. #define RF_POWER 0x00000040
  40. #if MPR50
  41. #define MS_ROUTER_VERSION 0x00000500
  42. #else
  43. #error Router version not defined
  44. #endif
  45. typedef enum _ROUTING_PROTOCOL_EVENTS
  46. {
  47. ROUTER_STOPPED, // Result is empty
  48. SAVE_GLOBAL_CONFIG_INFO, // Result is empty
  49. SAVE_INTERFACE_CONFIG_INFO, // Result is interface index
  50. // for which config info is to be saved.
  51. UPDATE_COMPLETE, // Result is UPDATE_COMPLETE_MESSAGE structure
  52. }ROUTING_PROTOCOL_EVENTS;
  53. typedef enum _NET_INTERFACE_TYPE
  54. {
  55. PERMANENT,
  56. DEMAND_DIAL,
  57. LOCAL_WORKSTATION_DIAL,
  58. REMOTE_WORKSTATION_DIAL
  59. } NET_INTERFACE_TYPE;
  60. //
  61. // Interface Receive Types
  62. //
  63. #define IR_PROMISCUOUS 0
  64. #define IR_PROMISCUOUS_MULTICAST 1
  65. typedef struct _SUPPORT_FUNCTIONS
  66. {
  67. union
  68. {
  69. ULONGLONG _Align8;
  70. struct
  71. {
  72. DWORD dwVersion;
  73. DWORD dwReserved;
  74. };
  75. };
  76. //
  77. // Function called by routing protocol to initiate demand dial connection
  78. //
  79. OUT DWORD
  80. (WINAPI *DemandDialRequest)(
  81. IN DWORD ProtocolId,
  82. IN DWORD InterfaceIndex
  83. ) ;
  84. //
  85. // Can be called to set the interface's receive capability
  86. // See IR_Xxx values above
  87. //
  88. OUT DWORD
  89. (WINAPI *SetInterfaceReceiveType)(
  90. IN DWORD ProtocolId,
  91. IN DWORD InterfaceIndex,
  92. IN DWORD InterfaceReceiveType,
  93. IN BOOL bActivate
  94. );
  95. //
  96. // Must be called by every protocol to set the route preference
  97. // and perform other validation
  98. //
  99. OUT DWORD
  100. (WINAPI *ValidateRoute)(
  101. IN DWORD ProtocolId,
  102. IN PVOID RouteInfo,
  103. IN PVOID DestAddress OPTIONAL
  104. );
  105. //
  106. // The following entrypoints are provided as a way for getting
  107. // information that spans components
  108. //
  109. OUT DWORD
  110. (WINAPI *MIBEntryCreate)(
  111. IN DWORD dwRoutingPid,
  112. IN DWORD dwEntrySize,
  113. IN LPVOID lpEntry
  114. );
  115. OUT DWORD
  116. (WINAPI *MIBEntryDelete)(
  117. IN DWORD dwRoutingPid,
  118. IN DWORD dwEntrySize,
  119. IN LPVOID lpEntry
  120. );
  121. OUT DWORD
  122. (WINAPI *MIBEntrySet)(
  123. IN DWORD dwRoutingPid,
  124. IN DWORD dwEntrySize,
  125. IN LPVOID lpEntry
  126. );
  127. OUT DWORD
  128. (WINAPI *MIBEntryGet)(
  129. IN DWORD dwRoutingPid,
  130. IN DWORD dwInEntrySize,
  131. IN LPVOID lpInEntry,
  132. IN OUT LPDWORD lpOutEntrySize,
  133. OUT LPVOID lpOutEntry
  134. );
  135. OUT DWORD
  136. (WINAPI *MIBEntryGetFirst)(
  137. IN DWORD dwRoutingPid,
  138. IN DWORD dwInEntrySize,
  139. IN LPVOID lpInEntry,
  140. IN OUT LPDWORD lpOutEntrySize,
  141. OUT LPVOID lpOutEntry
  142. );
  143. OUT DWORD
  144. (WINAPI *MIBEntryGetNext)(
  145. IN DWORD dwRoutingPid,
  146. IN DWORD dwInEntrySize,
  147. IN LPVOID lpInEntry,
  148. IN OUT LPDWORD lpOutEntrySize,
  149. OUT LPVOID lpOutEntry
  150. );
  151. //
  152. // Can be called to get the router ID value
  153. //
  154. OUT DWORD
  155. (WINAPI *GetRouterId)(VOID);
  156. OUT BOOL
  157. (WINAPI *HasMulticastBoundary)(
  158. IN DWORD dwIfIndex,
  159. IN DWORD dwGroupAddress
  160. );
  161. } SUPPORT_FUNCTIONS, *PSUPPORT_FUNCTIONS ;
  162. //////////////////////////////////////////////////////////////////////////////
  163. // //
  164. // All IP Protocols must use the protocol ids defined in the range below. //
  165. // Protocols not identified below can use any unassigned number BELOW //
  166. // 0xffff0000 //
  167. // //
  168. // NOTE: These numbers have been chosen to coincide with MIB-II protocol //
  169. // numbers. Allocation should not be arbitrary. //
  170. // //
  171. //////////////////////////////////////////////////////////////////////////////
  172. #define PROTO_IP_OTHER 1
  173. #define PROTO_IP_LOCAL 2
  174. #define PROTO_IP_NETMGMT 3
  175. #define PROTO_IP_ICMP 4
  176. #define PROTO_IP_EGP 5
  177. #define PROTO_IP_GGP 6
  178. #define PROTO_IP_HELLO 7
  179. #define PROTO_IP_RIP 8
  180. #define PROTO_IP_IS_IS 9
  181. #define PROTO_IP_ES_IS 10
  182. #define PROTO_IP_CISCO 11
  183. #define PROTO_IP_BBN 12
  184. #define PROTO_IP_OSPF 13
  185. #define PROTO_IP_BGP 14
  186. //
  187. // The multicast protocol IDs
  188. //
  189. #define PROTO_IP_MSDP 9
  190. #define PROTO_IP_IGMP 10
  191. #define PROTO_IP_BGMP 11
  192. //
  193. // The IPRTRMGR_PID is 10000 // 0x00002710
  194. //
  195. #define PROTO_IP_VRRP 112
  196. #define PROTO_IP_BOOTP 9999 // 0x0000270F
  197. #define PROTO_IP_NT_AUTOSTATIC 10002 // 0x00002712
  198. #define PROTO_IP_DNS_PROXY 10003 // 0x00002713
  199. #define PROTO_IP_DHCP_ALLOCATOR 10004 // 0x00002714
  200. #define PROTO_IP_NAT 10005 // 0x00002715
  201. #define PROTO_IP_NT_STATIC 10006 // 0x00002716
  202. #define PROTO_IP_NT_STATIC_NON_DOD 10007 // 0x00002717
  203. #define PROTO_IP_DIFFSERV 10008 // 0x00002718
  204. #define PROTO_IP_MGM 10009 // 0x00002719
  205. #define PROTO_IP_DTP 10010 // 0x0000271A
  206. #define PROTO_IP_H323 10011 // 0x0000271B
  207. #define PROTO_IP_QOSMGR 10012 // 0x0000271C
  208. //
  209. // For all future development, the following macro must be used to generate
  210. // Ids
  211. //
  212. //
  213. // Type - 2 bits
  214. // Vendor - 14 bits
  215. // ProtocolId - 16 bits
  216. //
  217. #define PROTOCOL_ID(Type, VendorId, ProtocolId) \
  218. (((Type & 0x03)<<30)|((VendorId & 0x3FFF)<<16)|(ProtocolId & 0xFFFF))
  219. //
  220. // |----|----|----|----|----|----|----|----|
  221. // Ty*** Vendor Id *** StandardProtocolId
  222. //
  223. #define TYPE_FROM_PROTO_ID(X) (((X) >> 30) & 0x03)
  224. #define VENDOR_FROM_PROTO_ID(X) (((X) >> 16) & 0x3FFF)
  225. #define PROTO_FROM_PROTO_ID(X) ((X) & 0xFFFF)
  226. //
  227. // Types MS0 and MS1 are Microsoft Reserved
  228. // A protocol that supports both unicast and multicast should use type
  229. // MCAST
  230. //
  231. #define PROTO_TYPE_UCAST 0
  232. #define PROTO_TYPE_MCAST 1
  233. #define PROTO_TYPE_MS0 2
  234. #define PROTO_TYPE_MS1 3
  235. #define PROTO_VENDOR_MS0 0x0000
  236. #define PROTO_VENDOR_MS1 0x137 // 311
  237. #define PROTO_VENDOR_MS2 0x3FFF
  238. #define MS_IP_BOOTP \
  239. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS0, PROTO_IP_BOOTP)
  240. #define MS_IP_RIP \
  241. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS0, PROTO_IP_RIP)
  242. #define MS_IP_OSPF \
  243. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS0, PROTO_IP_OSPF)
  244. #define MS_IP_BGP \
  245. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS1, PROTO_IP_BGP)
  246. #define MS_IP_IGMP \
  247. PROTOCOL_ID(PROTO_TYPE_MCAST, PROTO_VENDOR_MS1, PROTO_IP_IGMP)
  248. #define MS_IP_BGMP \
  249. PROTOCOL_ID(PROTO_TYPE_MCAST, PROTO_VENDOR_MS1, PROTO_IP_BGMP)
  250. #define MS_IP_MSDP \
  251. PROTOCOL_ID(PROTO_TYPE_MCAST, PROTO_VENDOR_MS1, PROTO_IP_MSDP)
  252. #define MS_IP_DNS_PROXY \
  253. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DNS_PROXY)
  254. #define MS_IP_DHCP_ALLOCATOR \
  255. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DHCP_ALLOCATOR)
  256. #define MS_IP_NAT \
  257. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_NAT)
  258. #define MS_IP_DIFFSERV \
  259. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DIFFSERV)
  260. #define MS_IP_MGM \
  261. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_MGM)
  262. #define MS_IP_VRRP \
  263. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_VRRP)
  264. #define MS_IP_DTP \
  265. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DTP)
  266. #define MS_IP_H323 \
  267. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_H323)
  268. #define MS_IP_QOSMGR \
  269. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_QOSMGR)
  270. //
  271. // All IPX Protocols must use the protocol ids defined in the range below.
  272. // Protocols not identified below can use any unassigned number greater than
  273. // IPX_PROTOCOL_BASE.
  274. //
  275. #define IPX_PROTOCOL_BASE 0x0001ffff
  276. #define IPX_PROTOCOL_RIP IPX_PROTOCOL_BASE + 1
  277. #define IPX_PROTOCOL_SAP IPX_PROTOCOL_BASE + 2
  278. #define IPX_PROTOCOL_NLSP IPX_PROTOCOL_BASE + 3
  279. typedef struct _UPDATE_COMPLETE_MESSAGE
  280. {
  281. ULONG InterfaceIndex;
  282. ULONG UpdateType; // DEMAND_UPDATE_ROUTES, DEMAND_UPDATE_SERVICES
  283. ULONG UpdateStatus; // NO_ERROR if successfull
  284. } UPDATE_COMPLETE_MESSAGE, *PUPDATE_COMPLETE_MESSAGE;
  285. //
  286. // Message returned in Result parameter to GET_EVENT_MESSAGE api call.
  287. // UpdateCompleteMessage returned for UPDATE_COMPLETE message
  288. // InterfaceIndex returned for SAVE_INTERFACE_CONFIG_INFO message
  289. //
  290. typedef union _MESSAGE
  291. {
  292. UPDATE_COMPLETE_MESSAGE UpdateCompleteMessage;
  293. DWORD InterfaceIndex;
  294. } MESSAGE, *PMESSAGE;
  295. //
  296. // Routing Interface Status types
  297. //
  298. #define RIS_INTERFACE_ADDRESS_CHANGE 0
  299. #define RIS_INTERFACE_ENABLED 1
  300. #define RIS_INTERFACE_DISABLED 2
  301. #define RIS_INTERFACE_MEDIA_PRESENT 3
  302. #define RIS_INTERFACE_MEDIA_ABSENT 4
  303. //
  304. // IPX Adapter Binding Info
  305. //
  306. typedef struct IPX_ADAPTER_BINDING_INFO
  307. {
  308. ULONG AdapterIndex;
  309. UCHAR Network[4];
  310. UCHAR LocalNode[6];
  311. UCHAR RemoteNode[6];
  312. ULONG MaxPacketSize;
  313. ULONG LinkSpeed;
  314. }IPX_ADAPTER_BINDING_INFO, *PIPX_ADAPTER_BINDING_INFO;
  315. //
  316. // IP Adapter Binding Info
  317. // This is the information associated with an ADDRESS_ARRIVAL event
  318. // An address arrival may have AddressCount == 0, this implies a unnumbered
  319. // interface
  320. //
  321. typedef struct IP_LOCAL_BINDING
  322. {
  323. DWORD Address;
  324. DWORD Mask;
  325. }IP_LOCAL_BINDING, *PIP_LOCAL_BINDING;
  326. typedef struct IP_ADAPTER_BINDING_INFO
  327. {
  328. ULONG AddressCount;
  329. DWORD RemoteAddress;
  330. ULONG Mtu;
  331. ULONGLONG Speed;
  332. IP_LOCAL_BINDING Address[0];
  333. }IP_ADAPTER_BINDING_INFO, *PIP_ADAPTER_BINDING_INFO;
  334. #define SIZEOF_IP_BINDING(X) \
  335. (FIELD_OFFSET(IP_ADAPTER_BINDING_INFO,Address[0]) + \
  336. ((X) * sizeof(IP_LOCAL_BINDING)))
  337. typedef
  338. DWORD
  339. (WINAPI * PSTART_PROTOCOL) (
  340. IN HANDLE NotificationEvent,
  341. IN PSUPPORT_FUNCTIONS SupportFunctions,
  342. IN LPVOID GlobalInfo,
  343. IN ULONG StructureVersion,
  344. IN ULONG StructureSize,
  345. IN ULONG StructureCount
  346. );
  347. typedef
  348. DWORD
  349. (WINAPI * PSTART_COMPLETE) (
  350. VOID
  351. );
  352. typedef
  353. DWORD
  354. (WINAPI * PSTOP_PROTOCOL) (
  355. VOID
  356. );
  357. typedef
  358. DWORD
  359. (WINAPI * PADD_INTERFACE) (
  360. IN LPWSTR InterfaceName,
  361. IN ULONG InterfaceIndex,
  362. IN NET_INTERFACE_TYPE InterfaceType,
  363. IN DWORD MediaType,
  364. IN WORD AccessType,
  365. IN WORD ConnectionType,
  366. IN PVOID InterfaceInfo,
  367. IN ULONG StructureVersion,
  368. IN ULONG StructureSize,
  369. IN ULONG StructureCount
  370. );
  371. typedef
  372. DWORD
  373. (WINAPI * PDELETE_INTERFACE) (
  374. IN ULONG InterfaceIndex
  375. );
  376. typedef
  377. DWORD
  378. (WINAPI * PGET_EVENT_MESSAGE) (
  379. OUT ROUTING_PROTOCOL_EVENTS *Event,
  380. OUT MESSAGE *Result
  381. );
  382. typedef
  383. DWORD
  384. (WINAPI * PGET_INTERFACE_INFO) (
  385. IN ULONG InterfaceIndex,
  386. IN PVOID InterfaceInfo,
  387. IN OUT PULONG BufferSize,
  388. OUT PULONG StructureVersion,
  389. IN PULONG StructureSize,
  390. OUT PULONG StructureCount
  391. );
  392. typedef
  393. DWORD
  394. (WINAPI * PSET_INTERFACE_INFO) (
  395. IN ULONG InterfaceIndex,
  396. IN PVOID InterfaceInfo,
  397. IN ULONG StructureVersion,
  398. IN ULONG StructureSize,
  399. IN ULONG StructureCount
  400. );
  401. typedef
  402. DWORD
  403. (WINAPI * PINTERFACE_STATUS) (
  404. IN ULONG InterfaceIndex,
  405. IN BOOL InterfaceActive,
  406. IN DWORD StatusType,
  407. IN PVOID StatusInfo
  408. );
  409. typedef
  410. DWORD
  411. (WINAPI * PQUERY_POWER) (
  412. IN DWORD PowerType
  413. );
  414. typedef
  415. DWORD
  416. (WINAPI * PSET_POWER) (
  417. IN DWORD PowerType
  418. );
  419. typedef
  420. DWORD
  421. (WINAPI * PGET_GLOBAL_INFO) (
  422. IN PVOID GlobalInfo,
  423. IN OUT PULONG BufferSize,
  424. OUT PULONG StructureVersion,
  425. OUT PULONG StructureSize,
  426. OUT PULONG StructureCount
  427. );
  428. typedef
  429. DWORD
  430. (WINAPI * PSET_GLOBAL_INFO) (
  431. IN PVOID GlobalInfo,
  432. IN ULONG StructureVersion,
  433. IN ULONG StructureSize,
  434. IN ULONG StructureCount
  435. );
  436. typedef
  437. DWORD
  438. (WINAPI * PDO_UPDATE_ROUTES) (
  439. IN ULONG InterfaceIndex
  440. );
  441. typedef
  442. DWORD
  443. (WINAPI * PMIB_CREATE) (
  444. IN ULONG InputDataSize,
  445. IN PVOID InputData
  446. );
  447. typedef
  448. DWORD
  449. (WINAPI * PMIB_DELETE) (
  450. IN ULONG InputDataSize,
  451. IN PVOID InputData
  452. );
  453. typedef
  454. DWORD
  455. (WINAPI * PMIB_GET) (
  456. IN ULONG InputDataSize,
  457. IN PVOID InputData,
  458. OUT PULONG OutputDataSize,
  459. OUT PVOID OutputData
  460. );
  461. typedef
  462. DWORD
  463. (WINAPI * PMIB_SET) (
  464. IN ULONG InputDataSize,
  465. IN PVOID InputData
  466. );
  467. typedef
  468. DWORD
  469. (WINAPI * PMIB_GET_FIRST) (
  470. IN ULONG InputDataSize,
  471. IN PVOID InputData,
  472. OUT PULONG OutputDataSize,
  473. OUT PVOID OutputData
  474. );
  475. typedef
  476. DWORD
  477. (WINAPI * PMIB_GET_NEXT) (
  478. IN ULONG InputDataSize,
  479. IN PVOID InputData,
  480. OUT PULONG OutputDataSize,
  481. OUT PVOID OutputData
  482. );
  483. typedef
  484. DWORD
  485. (WINAPI * PMIB_SET_TRAP_INFO) (
  486. IN HANDLE Event,
  487. IN ULONG InputDataSize,
  488. IN PVOID InputData,
  489. OUT PULONG OutputDataSize,
  490. OUT PVOID OutputData
  491. );
  492. typedef
  493. DWORD
  494. (WINAPI * PMIB_GET_TRAP_INFO) (
  495. IN ULONG InputDataSize,
  496. IN PVOID InputData,
  497. OUT PULONG OutputDataSize,
  498. OUT PVOID OutputData
  499. );
  500. typedef
  501. DWORD
  502. (WINAPI *PCONNECT_CLIENT) (
  503. IN ULONG InterfaceIndex,
  504. IN PVOID ClientAddress
  505. );
  506. typedef
  507. DWORD
  508. (WINAPI *PDISCONNECT_CLIENT) (
  509. IN ULONG InterfaceIndex,
  510. IN PVOID ClientAddress
  511. );
  512. //
  513. // InterfaceFlags used with the GetNeighbors() call below
  514. //
  515. #define MRINFO_TUNNEL_FLAG 0x01
  516. #define MRINFO_PIM_FLAG 0x04
  517. #define MRINFO_DOWN_FLAG 0x10
  518. #define MRINFO_DISABLED_FLAG 0x20
  519. #define MRINFO_QUERIER_FLAG 0x40
  520. #define MRINFO_LEAF_FLAG 0x80
  521. typedef
  522. DWORD
  523. (WINAPI *PGET_NEIGHBORS) (
  524. IN DWORD InterfaceIndex,
  525. IN PDWORD NeighborList,
  526. IN OUT PDWORD NeighborListSize,
  527. OUT PBYTE InterfaceFlags
  528. );
  529. //
  530. // StatusCode values used with the GetMfeStatus() call below.
  531. // The protocol should return the highest-valued one that applies.
  532. //
  533. #define MFE_NO_ERROR 0 // none of the below events
  534. #define MFE_REACHED_CORE 1 // this router is an RP/core for the group
  535. //
  536. // StatusCode values set by oif owner only
  537. //
  538. #define MFE_OIF_PRUNED 5 // no downstream receivers exist on oif
  539. //
  540. // StatusCode values set by iif owner only
  541. //
  542. #define MFE_PRUNED_UPSTREAM 4 // a prune was send upstream
  543. #define MFE_OLD_ROUTER 11 // upstream nbr doesn't support mtrace
  544. //
  545. // StatusCode values which are used only by the Router Manager itself:
  546. //
  547. #define MFE_NOT_FORWARDING 2 // not fwding for an unspecified reason
  548. #define MFE_WRONG_IF 3 // mtrace received on iif
  549. #define MFE_BOUNDARY_REACHED 6 // iif or oif is admin scope boundary
  550. #define MFE_NO_MULTICAST 7 // oif is not multicast-enabled
  551. #define MFE_IIF 8 // mtrace arrived on iif
  552. #define MFE_NO_ROUTE 9 // router has no route that matches
  553. #define MFE_NOT_LAST_HOP 10 // router is not the proper last-hop router
  554. #define MFE_PROHIBITED 12 // mtrace is administratively prohibited
  555. #define MFE_NO_SPACE 13 // not enough room in packet
  556. typedef
  557. DWORD
  558. (WINAPI *PGET_MFE_STATUS) (
  559. IN DWORD InterfaceIndex,
  560. IN DWORD GroupAddress,
  561. IN DWORD SourceAddress,
  562. OUT PBYTE StatusCode
  563. );
  564. //////////////////////////////////////////////////////////////////////////////
  565. // //
  566. // This is the structure passed between the router manager and a protocol //
  567. // upon registration. //
  568. // //
  569. // IN OUT DWORD dwVersion //
  570. // This is filled by the router manager to indicate the version it supports.//
  571. // The DLL MUST set this to the version that the protocol will support. //
  572. // //
  573. // IN DWORD dwProtocolId //
  574. // This the protocol the router manager is expecting the DLL to register. //
  575. // If the DLL does not support this protocol, it MUST return //
  576. // ERROR_NOT_SUPPORTED //
  577. // A DLL will be called once for every protocol it supports //
  578. // //
  579. // IN OUT DWORD fSupportedFunctionality //
  580. // These are the flags denoting the functionality the router manager //
  581. // supports. The DLL MUST reset this to the functionality that it supports. //
  582. // //
  583. //////////////////////////////////////////////////////////////////////////////
  584. typedef struct _MPR50_ROUTING_CHARACTERISTICS
  585. {
  586. DWORD dwVersion;
  587. DWORD dwProtocolId;
  588. DWORD fSupportedFunctionality;
  589. PSTART_PROTOCOL pfnStartProtocol;
  590. PSTART_COMPLETE pfnStartComplete;
  591. PSTOP_PROTOCOL pfnStopProtocol;
  592. PGET_GLOBAL_INFO pfnGetGlobalInfo;
  593. PSET_GLOBAL_INFO pfnSetGlobalInfo;
  594. PQUERY_POWER pfnQueryPower;
  595. PSET_POWER pfnSetPower;
  596. PADD_INTERFACE pfnAddInterface;
  597. PDELETE_INTERFACE pfnDeleteInterface;
  598. PINTERFACE_STATUS pfnInterfaceStatus;
  599. PGET_INTERFACE_INFO pfnGetInterfaceInfo;
  600. PSET_INTERFACE_INFO pfnSetInterfaceInfo;
  601. PGET_EVENT_MESSAGE pfnGetEventMessage;
  602. PDO_UPDATE_ROUTES pfnUpdateRoutes;
  603. PCONNECT_CLIENT pfnConnectClient;
  604. PDISCONNECT_CLIENT pfnDisconnectClient;
  605. PGET_NEIGHBORS pfnGetNeighbors;
  606. PGET_MFE_STATUS pfnGetMfeStatus;
  607. PMIB_CREATE pfnMibCreateEntry;
  608. PMIB_DELETE pfnMibDeleteEntry;
  609. PMIB_GET pfnMibGetEntry;
  610. PMIB_SET pfnMibSetEntry;
  611. PMIB_GET_FIRST pfnMibGetFirstEntry;
  612. PMIB_GET_NEXT pfnMibGetNextEntry;
  613. PMIB_SET_TRAP_INFO pfnMibSetTrapInfo;
  614. PMIB_GET_TRAP_INFO pfnMibGetTrapInfo;
  615. }MPR50_ROUTING_CHARACTERISTICS;
  616. #if MPR50
  617. typedef MPR50_ROUTING_CHARACTERISTICS MPR_ROUTING_CHARACTERISTICS;
  618. #endif
  619. typedef MPR_ROUTING_CHARACTERISTICS *PMPR_ROUTING_CHARACTERISTICS;
  620. //
  621. // All routing protocols must export the following entry point.
  622. // The router manager calls this function to allow the routing
  623. // protocol to register
  624. //
  625. #define REGISTER_PROTOCOL_ENTRY_POINT RegisterProtocol
  626. #define REGISTER_PROTOCOL_ENTRY_POINT_STRING "RegisterProtocol"
  627. typedef
  628. DWORD
  629. (WINAPI * PREGISTER_PROTOCOL) (
  630. IN OUT PMPR_ROUTING_CHARACTERISTICS pRoutingChar,
  631. IN OUT PMPR_SERVICE_CHARACTERISTICS pServiceChar
  632. );
  633. #ifdef __cplusplus
  634. }
  635. #endif
  636. #if _MSC_VER >= 1200
  637. #pragma warning(pop)
  638. #else
  639. #pragma warning(default:4200)
  640. #pragma warning(default:4201)
  641. #endif
  642. #endif // _ROUTPROT_H_