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.

793 lines
22 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  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_ALG 10010 // 0x0000271A
  206. #define PROTO_IP_H323 10011 // 0x0000271B
  207. #define PROTO_IP_FTP 10012 // 0x0000271C
  208. #define PROTO_IP_DTP 10013 // 0x0000271D
  209. //
  210. // For all future development, the following macro must be used to generate
  211. // Ids
  212. //
  213. //
  214. // Type - 2 bits
  215. // Vendor - 14 bits
  216. // ProtocolId - 16 bits
  217. //
  218. #define PROTOCOL_ID(Type, VendorId, ProtocolId) \
  219. (((Type & 0x03)<<30)|((VendorId & 0x3FFF)<<16)|(ProtocolId & 0xFFFF))
  220. //
  221. // |----|----|----|----|----|----|----|----|
  222. // Ty*** Vendor Id *** StandardProtocolId
  223. //
  224. #define TYPE_FROM_PROTO_ID(X) (((X) >> 30) & 0x03)
  225. #define VENDOR_FROM_PROTO_ID(X) (((X) >> 16) & 0x3FFF)
  226. #define PROTO_FROM_PROTO_ID(X) ((X) & 0xFFFF)
  227. //
  228. // Types MS0 and MS1 are Microsoft Reserved
  229. // A protocol that supports both unicast and multicast should use type
  230. // MCAST
  231. //
  232. #define PROTO_TYPE_UCAST 0
  233. #define PROTO_TYPE_MCAST 1
  234. #define PROTO_TYPE_MS0 2
  235. #define PROTO_TYPE_MS1 3
  236. #define PROTO_VENDOR_MS0 0x0000
  237. #define PROTO_VENDOR_MS1 0x137 // 311
  238. #define PROTO_VENDOR_MS2 0x3FFF
  239. #define MS_IP_BOOTP \
  240. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS0, PROTO_IP_BOOTP)
  241. #define MS_IP_RIP \
  242. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS0, PROTO_IP_RIP)
  243. #define MS_IP_OSPF \
  244. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS0, PROTO_IP_OSPF)
  245. #define MS_IP_BGP \
  246. PROTOCOL_ID(PROTO_TYPE_UCAST, PROTO_VENDOR_MS1, PROTO_IP_BGP)
  247. #define MS_IP_IGMP \
  248. PROTOCOL_ID(PROTO_TYPE_MCAST, PROTO_VENDOR_MS1, PROTO_IP_IGMP)
  249. #define MS_IP_BGMP \
  250. PROTOCOL_ID(PROTO_TYPE_MCAST, PROTO_VENDOR_MS1, PROTO_IP_BGMP)
  251. #define MS_IP_MSDP \
  252. PROTOCOL_ID(PROTO_TYPE_MCAST, PROTO_VENDOR_MS1, PROTO_IP_MSDP)
  253. #define MS_IP_DNS_PROXY \
  254. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DNS_PROXY)
  255. #define MS_IP_DHCP_ALLOCATOR \
  256. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DHCP_ALLOCATOR)
  257. #define MS_IP_NAT \
  258. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_NAT)
  259. #define MS_IP_DIFFSERV \
  260. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DIFFSERV)
  261. #define MS_IP_MGM \
  262. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_MGM)
  263. #define MS_IP_VRRP \
  264. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_VRRP)
  265. #define MS_IP_DTP \
  266. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_DTP)
  267. #define MS_IP_H323 \
  268. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_H323)
  269. #define MS_IP_FTP \
  270. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_FTP)
  271. #define MS_IP_ALG \
  272. PROTOCOL_ID(PROTO_TYPE_MS0, PROTO_VENDOR_MS1, PROTO_IP_ALG)
  273. //
  274. // All IPX Protocols must use the protocol ids defined in the range below.
  275. // Protocols not identified below can use any unassigned number greater than
  276. // IPX_PROTOCOL_BASE.
  277. //
  278. #define IPX_PROTOCOL_BASE 0x0001ffff
  279. #define IPX_PROTOCOL_RIP IPX_PROTOCOL_BASE + 1
  280. #define IPX_PROTOCOL_SAP IPX_PROTOCOL_BASE + 2
  281. #define IPX_PROTOCOL_NLSP IPX_PROTOCOL_BASE + 3
  282. typedef struct _UPDATE_COMPLETE_MESSAGE
  283. {
  284. ULONG InterfaceIndex;
  285. ULONG UpdateType; // DEMAND_UPDATE_ROUTES, DEMAND_UPDATE_SERVICES
  286. ULONG UpdateStatus; // NO_ERROR if successfull
  287. } UPDATE_COMPLETE_MESSAGE, *PUPDATE_COMPLETE_MESSAGE;
  288. //
  289. // Message returned in Result parameter to GET_EVENT_MESSAGE api call.
  290. // UpdateCompleteMessage returned for UPDATE_COMPLETE message
  291. // InterfaceIndex returned for SAVE_INTERFACE_CONFIG_INFO message
  292. //
  293. typedef union _MESSAGE
  294. {
  295. UPDATE_COMPLETE_MESSAGE UpdateCompleteMessage;
  296. DWORD InterfaceIndex;
  297. } MESSAGE, *PMESSAGE;
  298. //
  299. // Routing Interface Status types
  300. //
  301. #define RIS_INTERFACE_ADDRESS_CHANGE 0
  302. #define RIS_INTERFACE_ENABLED 1
  303. #define RIS_INTERFACE_DISABLED 2
  304. #define RIS_INTERFACE_MEDIA_PRESENT 3
  305. #define RIS_INTERFACE_MEDIA_ABSENT 4
  306. //
  307. // IPX Adapter Binding Info
  308. //
  309. typedef struct IPX_ADAPTER_BINDING_INFO
  310. {
  311. ULONG AdapterIndex;
  312. UCHAR Network[4];
  313. UCHAR LocalNode[6];
  314. UCHAR RemoteNode[6];
  315. ULONG MaxPacketSize;
  316. ULONG LinkSpeed;
  317. }IPX_ADAPTER_BINDING_INFO, *PIPX_ADAPTER_BINDING_INFO;
  318. //
  319. // IP Adapter Binding Info
  320. // This is the information associated with an ADDRESS_ARRIVAL event
  321. // An address arrival may have AddressCount == 0, this implies a unnumbered
  322. // interface
  323. //
  324. typedef struct IP_LOCAL_BINDING
  325. {
  326. DWORD Address;
  327. DWORD Mask;
  328. }IP_LOCAL_BINDING, *PIP_LOCAL_BINDING;
  329. typedef struct IP_ADAPTER_BINDING_INFO
  330. {
  331. ULONG AddressCount;
  332. DWORD RemoteAddress;
  333. ULONG Mtu;
  334. ULONGLONG Speed;
  335. IP_LOCAL_BINDING Address[0];
  336. }IP_ADAPTER_BINDING_INFO, *PIP_ADAPTER_BINDING_INFO;
  337. #define SIZEOF_IP_BINDING(X) \
  338. (FIELD_OFFSET(IP_ADAPTER_BINDING_INFO,Address[0]) + \
  339. ((X) * sizeof(IP_LOCAL_BINDING)))
  340. typedef
  341. DWORD
  342. (WINAPI * PSTART_PROTOCOL) (
  343. IN HANDLE NotificationEvent,
  344. IN PSUPPORT_FUNCTIONS SupportFunctions,
  345. IN LPVOID GlobalInfo,
  346. IN ULONG StructureVersion,
  347. IN ULONG StructureSize,
  348. IN ULONG StructureCount
  349. );
  350. typedef
  351. DWORD
  352. (WINAPI * PSTART_COMPLETE) (
  353. VOID
  354. );
  355. typedef
  356. DWORD
  357. (WINAPI * PSTOP_PROTOCOL) (
  358. VOID
  359. );
  360. typedef
  361. DWORD
  362. (WINAPI * PADD_INTERFACE) (
  363. IN LPWSTR InterfaceName,
  364. IN ULONG InterfaceIndex,
  365. IN NET_INTERFACE_TYPE InterfaceType,
  366. IN DWORD MediaType,
  367. IN WORD AccessType,
  368. IN WORD ConnectionType,
  369. IN PVOID InterfaceInfo,
  370. IN ULONG StructureVersion,
  371. IN ULONG StructureSize,
  372. IN ULONG StructureCount
  373. );
  374. typedef
  375. DWORD
  376. (WINAPI * PDELETE_INTERFACE) (
  377. IN ULONG InterfaceIndex
  378. );
  379. typedef
  380. DWORD
  381. (WINAPI * PGET_EVENT_MESSAGE) (
  382. OUT ROUTING_PROTOCOL_EVENTS *Event,
  383. OUT MESSAGE *Result
  384. );
  385. typedef
  386. DWORD
  387. (WINAPI * PGET_INTERFACE_INFO) (
  388. IN ULONG InterfaceIndex,
  389. IN PVOID InterfaceInfo,
  390. IN OUT PULONG BufferSize,
  391. OUT PULONG StructureVersion,
  392. IN PULONG StructureSize,
  393. OUT PULONG StructureCount
  394. );
  395. typedef
  396. DWORD
  397. (WINAPI * PSET_INTERFACE_INFO) (
  398. IN ULONG InterfaceIndex,
  399. IN PVOID InterfaceInfo,
  400. IN ULONG StructureVersion,
  401. IN ULONG StructureSize,
  402. IN ULONG StructureCount
  403. );
  404. typedef
  405. DWORD
  406. (WINAPI * PINTERFACE_STATUS) (
  407. IN ULONG InterfaceIndex,
  408. IN BOOL InterfaceActive,
  409. IN DWORD StatusType,
  410. IN PVOID StatusInfo
  411. );
  412. typedef
  413. DWORD
  414. (WINAPI * PQUERY_POWER) (
  415. IN DWORD PowerType
  416. );
  417. typedef
  418. DWORD
  419. (WINAPI * PSET_POWER) (
  420. IN DWORD PowerType
  421. );
  422. typedef
  423. DWORD
  424. (WINAPI * PGET_GLOBAL_INFO) (
  425. IN PVOID GlobalInfo,
  426. IN OUT PULONG BufferSize,
  427. OUT PULONG StructureVersion,
  428. OUT PULONG StructureSize,
  429. OUT PULONG StructureCount
  430. );
  431. typedef
  432. DWORD
  433. (WINAPI * PSET_GLOBAL_INFO) (
  434. IN PVOID GlobalInfo,
  435. IN ULONG StructureVersion,
  436. IN ULONG StructureSize,
  437. IN ULONG StructureCount
  438. );
  439. typedef
  440. DWORD
  441. (WINAPI * PDO_UPDATE_ROUTES) (
  442. IN ULONG InterfaceIndex
  443. );
  444. typedef
  445. DWORD
  446. (WINAPI * PMIB_CREATE) (
  447. IN ULONG InputDataSize,
  448. IN PVOID InputData
  449. );
  450. typedef
  451. DWORD
  452. (WINAPI * PMIB_DELETE) (
  453. IN ULONG InputDataSize,
  454. IN PVOID InputData
  455. );
  456. typedef
  457. DWORD
  458. (WINAPI * PMIB_GET) (
  459. IN ULONG InputDataSize,
  460. IN PVOID InputData,
  461. OUT PULONG OutputDataSize,
  462. OUT PVOID OutputData
  463. );
  464. typedef
  465. DWORD
  466. (WINAPI * PMIB_SET) (
  467. IN ULONG InputDataSize,
  468. IN PVOID InputData
  469. );
  470. typedef
  471. DWORD
  472. (WINAPI * PMIB_GET_FIRST) (
  473. IN ULONG InputDataSize,
  474. IN PVOID InputData,
  475. OUT PULONG OutputDataSize,
  476. OUT PVOID OutputData
  477. );
  478. typedef
  479. DWORD
  480. (WINAPI * PMIB_GET_NEXT) (
  481. IN ULONG InputDataSize,
  482. IN PVOID InputData,
  483. OUT PULONG OutputDataSize,
  484. OUT PVOID OutputData
  485. );
  486. typedef
  487. DWORD
  488. (WINAPI * PMIB_SET_TRAP_INFO) (
  489. IN HANDLE Event,
  490. IN ULONG InputDataSize,
  491. IN PVOID InputData,
  492. OUT PULONG OutputDataSize,
  493. OUT PVOID OutputData
  494. );
  495. typedef
  496. DWORD
  497. (WINAPI * PMIB_GET_TRAP_INFO) (
  498. IN ULONG InputDataSize,
  499. IN PVOID InputData,
  500. OUT PULONG OutputDataSize,
  501. OUT PVOID OutputData
  502. );
  503. typedef
  504. DWORD
  505. (WINAPI *PCONNECT_CLIENT) (
  506. IN ULONG InterfaceIndex,
  507. IN PVOID ClientAddress
  508. );
  509. typedef
  510. DWORD
  511. (WINAPI *PDISCONNECT_CLIENT) (
  512. IN ULONG InterfaceIndex,
  513. IN PVOID ClientAddress
  514. );
  515. //
  516. // InterfaceFlags used with the GetNeighbors() call below
  517. //
  518. #define MRINFO_TUNNEL_FLAG 0x01
  519. #define MRINFO_PIM_FLAG 0x04
  520. #define MRINFO_DOWN_FLAG 0x10
  521. #define MRINFO_DISABLED_FLAG 0x20
  522. #define MRINFO_QUERIER_FLAG 0x40
  523. #define MRINFO_LEAF_FLAG 0x80
  524. typedef
  525. DWORD
  526. (WINAPI *PGET_NEIGHBORS) (
  527. IN DWORD InterfaceIndex,
  528. IN PDWORD NeighborList,
  529. IN OUT PDWORD NeighborListSize,
  530. OUT PBYTE InterfaceFlags
  531. );
  532. //
  533. // StatusCode values used with the GetMfeStatus() call below.
  534. // The protocol should return the highest-valued one that applies.
  535. //
  536. #define MFE_NO_ERROR 0 // none of the below events
  537. #define MFE_REACHED_CORE 1 // this router is an RP/core for the group
  538. //
  539. // StatusCode values set by oif owner only
  540. //
  541. #define MFE_OIF_PRUNED 5 // no downstream receivers exist on oif
  542. //
  543. // StatusCode values set by iif owner only
  544. //
  545. #define MFE_PRUNED_UPSTREAM 4 // a prune was send upstream
  546. #define MFE_OLD_ROUTER 11 // upstream nbr doesn't support mtrace
  547. //
  548. // StatusCode values which are used only by the Router Manager itself:
  549. //
  550. #define MFE_NOT_FORWARDING 2 // not fwding for an unspecified reason
  551. #define MFE_WRONG_IF 3 // mtrace received on iif
  552. #define MFE_BOUNDARY_REACHED 6 // iif or oif is admin scope boundary
  553. #define MFE_NO_MULTICAST 7 // oif is not multicast-enabled
  554. #define MFE_IIF 8 // mtrace arrived on iif
  555. #define MFE_NO_ROUTE 9 // router has no route that matches
  556. #define MFE_NOT_LAST_HOP 10 // router is not the proper last-hop router
  557. #define MFE_PROHIBITED 12 // mtrace is administratively prohibited
  558. #define MFE_NO_SPACE 13 // not enough room in packet
  559. typedef
  560. DWORD
  561. (WINAPI *PGET_MFE_STATUS) (
  562. IN DWORD InterfaceIndex,
  563. IN DWORD GroupAddress,
  564. IN DWORD SourceAddress,
  565. OUT PBYTE StatusCode
  566. );
  567. //////////////////////////////////////////////////////////////////////////////
  568. // //
  569. // This is the structure passed between the router manager and a protocol //
  570. // upon registration. //
  571. // //
  572. // IN OUT DWORD dwVersion //
  573. // This is filled by the router manager to indicate the version it supports.//
  574. // The DLL MUST set this to the version that the protocol will support. //
  575. // //
  576. // IN DWORD dwProtocolId //
  577. // This the protocol the router manager is expecting the DLL to register. //
  578. // If the DLL does not support this protocol, it MUST return //
  579. // ERROR_NOT_SUPPORTED //
  580. // A DLL will be called once for every protocol it supports //
  581. // //
  582. // IN OUT DWORD fSupportedFunctionality //
  583. // These are the flags denoting the functionality the router manager //
  584. // supports. The DLL MUST reset this to the functionality that it supports. //
  585. // //
  586. //////////////////////////////////////////////////////////////////////////////
  587. typedef struct _MPR50_ROUTING_CHARACTERISTICS
  588. {
  589. DWORD dwVersion;
  590. DWORD dwProtocolId;
  591. DWORD fSupportedFunctionality;
  592. PSTART_PROTOCOL pfnStartProtocol;
  593. PSTART_COMPLETE pfnStartComplete;
  594. PSTOP_PROTOCOL pfnStopProtocol;
  595. PGET_GLOBAL_INFO pfnGetGlobalInfo;
  596. PSET_GLOBAL_INFO pfnSetGlobalInfo;
  597. PQUERY_POWER pfnQueryPower;
  598. PSET_POWER pfnSetPower;
  599. PADD_INTERFACE pfnAddInterface;
  600. PDELETE_INTERFACE pfnDeleteInterface;
  601. PINTERFACE_STATUS pfnInterfaceStatus;
  602. PGET_INTERFACE_INFO pfnGetInterfaceInfo;
  603. PSET_INTERFACE_INFO pfnSetInterfaceInfo;
  604. PGET_EVENT_MESSAGE pfnGetEventMessage;
  605. PDO_UPDATE_ROUTES pfnUpdateRoutes;
  606. PCONNECT_CLIENT pfnConnectClient;
  607. PDISCONNECT_CLIENT pfnDisconnectClient;
  608. PGET_NEIGHBORS pfnGetNeighbors;
  609. PGET_MFE_STATUS pfnGetMfeStatus;
  610. PMIB_CREATE pfnMibCreateEntry;
  611. PMIB_DELETE pfnMibDeleteEntry;
  612. PMIB_GET pfnMibGetEntry;
  613. PMIB_SET pfnMibSetEntry;
  614. PMIB_GET_FIRST pfnMibGetFirstEntry;
  615. PMIB_GET_NEXT pfnMibGetNextEntry;
  616. PMIB_SET_TRAP_INFO pfnMibSetTrapInfo;
  617. PMIB_GET_TRAP_INFO pfnMibGetTrapInfo;
  618. }MPR50_ROUTING_CHARACTERISTICS;
  619. #if MPR50
  620. typedef MPR50_ROUTING_CHARACTERISTICS MPR_ROUTING_CHARACTERISTICS;
  621. #endif
  622. typedef MPR_ROUTING_CHARACTERISTICS *PMPR_ROUTING_CHARACTERISTICS;
  623. //
  624. // All routing protocols must export the following entry point.
  625. // The router manager calls this function to allow the routing
  626. // protocol to register
  627. //
  628. #define REGISTER_PROTOCOL_ENTRY_POINT RegisterProtocol
  629. #define REGISTER_PROTOCOL_ENTRY_POINT_STRING "RegisterProtocol"
  630. typedef
  631. DWORD
  632. (WINAPI * PREGISTER_PROTOCOL) (
  633. IN OUT PMPR_ROUTING_CHARACTERISTICS pRoutingChar,
  634. IN OUT PMPR_SERVICE_CHARACTERISTICS pServiceChar
  635. );
  636. #ifdef __cplusplus
  637. }
  638. #endif
  639. #if _MSC_VER >= 1200
  640. #pragma warning(pop)
  641. #else
  642. #pragma warning(default:4200)
  643. #pragma warning(default:4201)
  644. #endif
  645. #endif // _ROUTPROT_H_