Source code of Windows XP (NT5)
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.

791 lines
21 KiB

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