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.

682 lines
22 KiB

  1. //=============================================================================
  2. // Copyright (c) 1997 Microsoft Corporation
  3. //
  4. // File: igmprm.h
  5. //
  6. // Abstract:
  7. // Contains type definitions and declarations for IGMPv2
  8. // used by the IP Router Manager.
  9. //
  10. // Author: K.S.Lokesh (lokeshs@) 11-1-97
  11. //
  12. // Revision History:
  13. //=============================================================================
  14. #ifndef _IGMPRM_H_
  15. #define _IGMPRM_H_
  16. #define IGMP_CONFIG_VERSION_500 0x500
  17. // next non-compatible version
  18. #define IGMP_CONFIG_VERSION_600 0x600
  19. #define IGMP_VERSION_1_2 0x201
  20. //next incompatible version
  21. #define IGMP_VERSION_1_2_5 0x250
  22. #define IGMP_VERSION_3 0x301
  23. //next non-compatible version
  24. #define IGMP_VERSION_3_5 0x351
  25. #define IS_IGMP_VERSION_1_2(Flag) ((Flag)==0x201)
  26. #define IS_IGMP_VERSION_3(Flag) ((Flag)==0x301)
  27. #define IS_CONFIG_IGMP_V3(pConfig) ((pConfig)->Version==IGMP_VERSION_3)
  28. //----------------------------------------------------------------------------
  29. // constants identifying IGMP's MIB tables. The "TypeId" is set to this value
  30. //
  31. // IGMP_GLOBAL_CONFIG_ID : returns the global config
  32. // IGMP_IF_BINDING_ID : returns list of bindings for each interface, and
  33. // for a RAS interface returns a list of current RAS clients.
  34. // IGMP_IF_CONFIG_ID : returns the config info for an interface
  35. // IGMP_IF_STATS_ID : returns the stats for an interface
  36. // IGMP_IF_GROUPS_LIST_ID: returns the list of multicast group members on that
  37. // interface.
  38. // IGMP_GROUP_IFS_LIST_ID: returns the list of interfaces joined for that
  39. // group
  40. // IGMP_PROXY_INDEX_ID : returns the index of interface owned by igmp proxy.
  41. //----------------------------------------------------------------------------
  42. #define IGMP_GLOBAL_CONFIG_ID 0
  43. #define IGMP_GLOBAL_STATS_ID 1
  44. #define IGMP_IF_BINDING_ID 2
  45. #define IGMP_IF_CONFIG_ID 3
  46. #define IGMP_IF_STATS_ID 4
  47. #define IGMP_IF_GROUPS_LIST_ID 5
  48. #define IGMP_GROUP_IFS_LIST_ID 6
  49. #define IGMP_PROXY_IF_INDEX_ID 7
  50. #define IGMP_LAST_TABLE_ID 7
  51. //----------------------------------------------------------------------------
  52. // Flags in "Flags"
  53. // used to control the data returned from MIB queries
  54. //
  55. // IGMP_ENUM_FOR_RAS_CLIENTS : enumerate for ras clients only
  56. // IGMP_ENUM_ONE_ENTRY : return only one Interface-Group entry.
  57. // IGMP_ENUM_ALL_INTERFACES_GROUPS: enumerate all interfaces. If enumeration
  58. // reaches end of an interface, it will go to the next interface
  59. // IGMP_ENUM_INTERFACE_TABLE_BEGIN: indicate the beginning of a table.
  60. // IGMP_ENUM_INTERFACE_TABLE_CONTINUE: enum for interface has to continue
  61. // IGMP_ENUM_INTERFACE_TABLE_END: end of enumeration for that interface.
  62. //----------------------------------------------------------------------------
  63. // flags that are passed unchanged between calls during enumeration.
  64. #define IGMP_ENUM_FOR_RAS_CLIENTS 0x0001
  65. #define IGMP_ENUM_ONE_ENTRY 0x0002
  66. #define IGMP_ENUM_ALL_INTERFACES_GROUPS 0x0004
  67. #define IGMP_ENUM_ALL_TABLES 0x0008
  68. #define IGMP_ENUM_SUPPORT_FORMAT_IGMPV3 0x0010
  69. // flags that are changed between calls during the enumeration
  70. #define IGMP_ENUM_INTERFACE_TABLE_BEGIN 0x0100
  71. #define IGMP_ENUM_INTERFACE_TABLE_CONTINUE 0x0200
  72. #define IGMP_ENUM_INTERFACE_TABLE_END 0x0400
  73. // set in response only
  74. #define IGMP_ENUM_FORMAT_IGMPV3 0x1000
  75. #define CLEAR_IGMP_ENUM_INTERFACE_TABLE_FLAGS(Flags) (Flags = (Flags&0x00FF))
  76. //----------------------------------------------------------------------------
  77. // Constants used for the field IfType
  78. // IGMP_IF_NOT_RAS : the interface is conneted to a LAN.
  79. // IGMP_IF_RAS_ROUTER : the interface is connected to another router over RAS
  80. // IGMP_IF_RAS_SERVER : the entry corresponds to a RAS server
  81. // if it contains stats, then it represents summarized stats
  82. // IGMP_IF_RAS_CLIENT : the entry corresponds to a RAS client
  83. // if IGMP_IF_PROXY: then one of the 1st 4 flags still will be set to enable
  84. // switch from proxy to igmp router
  85. //----------------------------------------------------------------------------
  86. #define IGMP_IF_NOT_RAS 1
  87. #define IGMP_IF_RAS_ROUTER 2
  88. #define IGMP_IF_RAS_SERVER 3
  89. #define IGMP_IF_RAS_CLIENT 4
  90. #define IGMP_IF_PROXY 8
  91. #define IS_IFTYPE_PROXY(IfType) ((IfType) & IGMP_IF_PROXY)
  92. //----------------------------------------------------------------------------
  93. // Constants used for the field IgmpProtocolType
  94. //----------------------------------------------------------------------------
  95. #define IGMP_PROXY 0
  96. #define IGMP_ROUTER_V1 1
  97. #define IGMP_ROUTER_V2 2
  98. #define IGMP_ROUTER_V3 3
  99. #define IGMP_PROXY_V3 0x10
  100. #define IS_CONFIG_IGMPRTR(pConfig) \
  101. (((pConfig)->IgmpProtocolType==IGMP_ROUTER_V1) \
  102. ||((pConfig)->IgmpProtocolType==IGMP_ROUTER_V2) \
  103. ||((pConfig)->IgmpProtocolType==IGMP_ROUTER_V3) )
  104. #define IS_CONFIG_IGMPRTR_V1(pConfig) ((pConfig)->IgmpProtocolType==IGMP_ROUTER_V1)
  105. #define IS_CONFIG_IGMPRTR_V2(pConfig) ((pConfig)->IgmpProtocolType==IGMP_ROUTER_V2)
  106. #define IS_CONFIG_IGMPRTR_V3(pConfig) ((pConfig)->IgmpProtocolType==IGMP_ROUTER_V3)
  107. #define IS_CONFIG_IGMPPROXY(pConfig) \
  108. ((pConfig)->IgmpProtocolType==IGMP_PROXY \
  109. ||(pConfig)->IgmpProtocolType==IGMP_PROXY_V3)
  110. #define IS_CONFIG_IGMPPROXY_V2(pConfig) ((pConfig)->IgmpProtocolType==IGMP_PROXY)
  111. #define IS_CONFIG_IGMPPROXY_V3(pConfig) \
  112. ((pConfig)->IgmpProtocolType==IGMP_PROXY_V3)
  113. //----------------------------------------------------------------------------
  114. // constants used for the field IGMP_MIB_GLOBAL_CONFIG::LoggingLevel
  115. //----------------------------------------------------------------------------
  116. #define IGMP_LOGGING_NONE 0
  117. #define IGMP_LOGGING_ERROR 1
  118. #define IGMP_LOGGING_WARN 2
  119. #define IGMP_LOGGING_INFO 3
  120. //----------------------------------------------------------------------------
  121. // constants used for the fields
  122. // IGMP_MIB_IF_STATS::State, IGMP_MIB_IF_CONFIG::State and
  123. // IGMP_MIB_IF_BINDING::State
  124. //----------------------------------------------------------------------------
  125. #define IGMP_STATE_BOUND 0x01
  126. #define IGMP_STATE_ENABLED_BY_RTRMGR 0x02
  127. #define IGMP_STATE_ENABLED_IN_CONFIG 0x04
  128. #define IGMP_STATE_ENABLED_BY_MGM 0x08
  129. //
  130. // the below are not flags. So check for equality after anding.
  131. //
  132. #define IGMP_STATE_MGM_JOINS_ENABLED 0x10
  133. #define IGMP_STATE_ACTIVATED 0x07
  134. #define IS_IGMP_STATE_MGM_JOINS_ENABLED(Flag) \
  135. (((Flag) & IGMP_STATE_MGM_JOINS_ENABLED) == IGMP_STATE_MGM_JOINS_ENABLED)
  136. #define IS_IGMP_STATE_ACTIVATED(Flag) \
  137. (((Flag) & IGMP_STATE_ACTIVATED) == IGMP_STATE_ACTIVATED)
  138. //----------------------------------------------------------------------------
  139. // constants used for the field
  140. // IGMP_MIB_IF_STATS:QuerierState
  141. //----------------------------------------------------------------------------
  142. #define RTR_QUERIER 0x10
  143. #define RTR_NOT_QUERIER 0x00
  144. #define IS_IGMPRTR_QUERIER(flag) (flag&0x10)
  145. //----------------------------------------------------------------------------
  146. // STRUCTURE DEFINITIONS
  147. //----------------------------------------------------------------------------
  148. //----------------------------------------------------------------------------
  149. // struct: IGMP_MIB_GLOBAL_CONFIG
  150. //
  151. // This MIB entry stores global configuration for IGMP
  152. // There is only one instance, so this entry has no index.
  153. //
  154. // If RASClientStats is set, then per RAS client statistics is also kept
  155. //----------------------------------------------------------------------------
  156. typedef struct _IGMP_MIB_GLOBAL_CONFIG {
  157. DWORD Version;
  158. DWORD LoggingLevel;
  159. DWORD RasClientStats;
  160. } IGMP_MIB_GLOBAL_CONFIG, *PIGMP_MIB_GLOBAL_CONFIG;
  161. //----------------------------------------------------------------------------
  162. // struct: IGMP_MIB_GLOBAL_STATS
  163. //
  164. // This MIB entry stores global statistics for IGMP
  165. // There is only one instance, so this entry has no index.
  166. //----------------------------------------------------------------------------
  167. typedef struct _IGMP_MIB_GLOBAL_STATS {
  168. DWORD CurrentGroupMemberships;
  169. DWORD GroupMembershipsAdded;
  170. } IGMP_MIB_GLOBAL_STATS, *PIGMP_MIB_GLOBAL_STATS;
  171. //----------------------------------------------------------------------------
  172. // enum: IGMP_STATIC_GROUP_TYPE
  173. //
  174. // Igmp Static groups can be added to Igmp router in 3 modes:
  175. // IGMP_HOST_JOIN: group joined on a socket opened on that interface
  176. // IGMPRTR_JOIN_MGM_ONLY: the group is joined to MGM, so packets are
  177. // forwarded out on that interface and not up in the stack.
  178. // IGMP_PROXY_JOIN: the group is statically joined on the proxy interface
  179. // These are the values for IGMP_STATIC_GROUP::mode
  180. //----------------------------------------------------------------------------
  181. typedef enum _IGMP_STATIC_GROUP_TYPE {
  182. IGMP_HOST_JOIN =1,
  183. IGMPRTR_JOIN_MGM_ONLY
  184. } IGMP_STATIC_GROUP_TYPE;
  185. //----------------------------------------------------------------------------
  186. // struct: IGMP_STATIC_GROUP
  187. //----------------------------------------------------------------------------
  188. typedef struct _IGMP_STATIC_GROUP {
  189. DWORD GroupAddr;
  190. IGMP_STATIC_GROUP_TYPE Mode;
  191. } IGMP_STATIC_GROUP, *PIGMP_STATIC_GROUP;
  192. //----------------------------------------------------------------------------
  193. // struct: STATIC_GROUP_V3
  194. //----------------------------------------------------------------------------
  195. #define INCLUSION 1
  196. #define EXCLUSION 0
  197. typedef struct _IGMP_STATIC_GROUP_V3 {
  198. DWORD GroupAddr;
  199. IGMP_STATIC_GROUP_TYPE Mode;
  200. DWORD FilterType;
  201. DWORD NumSources;
  202. //DWORD Sources[0];
  203. } IGMP_STATIC_GROUP_V3, *PIGMP_STATIC_GROUP_V3;
  204. //----------------------------------------------------------------------------
  205. // struct: IGMP_MIB_IF_CONFIG
  206. //
  207. // This entry describes per-interface configuration.
  208. // All IP address fields must be in network order.
  209. // IfIndex, IpAddr, IfType are set by the igmp module. It is not set when
  210. // AddInterface is called
  211. //
  212. // Flags: IGMP_INTERFACE_ENABLED_IN_CONFIG
  213. // IGMP_ACCEPT_RTRALERT_PACKETS_ONLY
  214. //----------------------------------------------------------------------------
  215. typedef struct _IGMP_MIB_IF_CONFIG {
  216. DWORD Version;
  217. DWORD IfIndex; //read only:index
  218. DWORD IpAddr; //read only
  219. DWORD IfType; //read only
  220. DWORD Flags;
  221. DWORD IgmpProtocolType;
  222. DWORD RobustnessVariable;
  223. DWORD StartupQueryInterval;
  224. DWORD StartupQueryCount;
  225. DWORD GenQueryInterval;
  226. DWORD GenQueryMaxResponseTime;
  227. DWORD LastMemQueryInterval;
  228. DWORD LastMemQueryCount;
  229. DWORD OtherQuerierPresentInterval;//read only
  230. DWORD GroupMembershipTimeout; //read only
  231. DWORD NumStaticGroups;
  232. } IGMP_MIB_IF_CONFIG, *PIGMP_MIB_IF_CONFIG;
  233. //
  234. // static groups
  235. //
  236. #define GET_FIRST_IGMP_STATIC_GROUP(pConfig) \
  237. ((PIGMP_STATIC_GROUP)((PIGMP_MIB_IF_CONFIG)(pConfig)+1))
  238. #define IGMP_MIB_IF_CONFIG_SIZE(pConfig) \
  239. (sizeof(IGMP_MIB_IF_CONFIG) + \
  240. (pConfig)->NumStaticGroups*sizeof(IGMP_STATIC_GROUP))
  241. #define GET_FIRST_IGMP_STATIC_GROUP_V3(pConfig) \
  242. ((PIGMP_STATIC_GROUP_V3)((PIGMP_MIB_IF_CONFIG)(pConfig)+1))
  243. #define GET_NEXT_IGMP_STATIC_GROUP_V3(pConfig, pStaticGroupV3) \
  244. (((pConfig)->Version<IGMP_VERSION_3) \
  245. ?((PIGMP_STATIC_GROUP_V3) ((PCHAR)pStaticGroupV3+sizeof(IGMP_STATIC_GROUP))) \
  246. :((PIGMP_STATIC_GROUP_V3) ((PCHAR)pStaticGroupV3+sizeof(IGMP_STATIC_GROUP_V3) \
  247. +sizeof(DWORD)*pStaticGroupV3->NumSources)) )
  248. #define IGMP_MIB_STATIC_GROUP_SIZE(pConfig, pStaticGroup) \
  249. (((pConfig)->Version<IGMP_VERSION_3)?sizeof(IGMP_STATIC_GROUP)\
  250. :sizeof(IGMP_STATIC_GROUP_V3)+sizeof(DWORD)*(pStaticGroup)->NumSources)
  251. //
  252. // Flags
  253. //
  254. #define IGMP_INTERFACE_ENABLED_IN_CONFIG 0x0001
  255. #define IGMP_ACCEPT_RTRALERT_PACKETS_ONLY 0x0002
  256. #define IGMP_ENABLED_FLAG_SET(Flags) \
  257. ((Flags) & IGMP_INTERFACE_ENABLED_IN_CONFIG)
  258. //----------------------------------------------------------------------------
  259. // struct: IGMP_MIB_IF_STATS
  260. //
  261. // This MIB entry stores per-interface statistics for IGMP.
  262. //
  263. // If this is a ras client interface, then IpAddr is set to the NextHopAddress
  264. // of the RAS client.
  265. //
  266. // This structure is read-only.
  267. //
  268. //----------------------------------------------------------------------------
  269. typedef struct _IGMP_MIB_IF_STATS {
  270. DWORD IfIndex; // same as in MIB_IF_CONFIG
  271. DWORD IpAddr; // same as in MIB_IF_CONFIG
  272. DWORD IfType; // same as in MIB_IF_CONFIG
  273. BYTE State; // bound/enabled
  274. BYTE QuerierState; // (not)querier
  275. DWORD IgmpProtocolType; // router/proxy, and ver(1/2/3)
  276. DWORD QuerierIpAddr;
  277. DWORD ProxyIfIndex; // IfIndex of proxy(req by mib)
  278. DWORD QuerierPresentTimeLeft;
  279. DWORD LastQuerierChangeTime;
  280. DWORD V1QuerierPresentTimeLeft; //obsolete
  281. DWORD Uptime; // seconds it has been activated
  282. DWORD TotalIgmpPacketsReceived;
  283. DWORD TotalIgmpPacketsForRouter;
  284. DWORD GeneralQueriesReceived;
  285. DWORD WrongVersionQueries;
  286. DWORD JoinsReceived;
  287. DWORD LeavesReceived;
  288. DWORD CurrentGroupMemberships;
  289. DWORD GroupMembershipsAdded;
  290. DWORD WrongChecksumPackets;
  291. DWORD ShortPacketsReceived;
  292. DWORD LongPacketsReceived;
  293. DWORD PacketsWithoutRtrAlert;
  294. } IGMP_MIB_IF_STATS, *PIGMP_MIB_IF_STATS;
  295. //----------------------------------------------------------------------------
  296. // struct: IGMP_MIB_IF_GROUPS_LIST
  297. //
  298. // This MIB entry stores the list of multicast groups which are members on
  299. // that interface
  300. //
  301. // THIS STRUCTURE HAS VARIABLE LENGTH.
  302. // The structure is followed by NumGroups number of IGMP_MIB_GROUP_INFO structs
  303. //
  304. // This structure is read-only
  305. //
  306. //----------------------------------------------------------------------------
  307. typedef struct _IGMP_MIB_IF_GROUPS_LIST {
  308. DWORD IfIndex;
  309. DWORD IpAddr;
  310. DWORD IfType;
  311. DWORD NumGroups;
  312. BYTE Buffer[1];
  313. } IGMP_MIB_IF_GROUPS_LIST, *PIGMP_MIB_IF_GROUPS_LIST;
  314. //----------------------------------------------------------------------------
  315. // struct: IGMP_MIB_GROUP_INFO
  316. //
  317. // If the interface is of type RAS_SERVER then the group membership of all the
  318. // RAS clients is summarized, and the GroupUpTime and GroupExpiryTime is the
  319. // maximum over all member RAS Clients, while the V1HostPresentTimeLeft is set
  320. // to 0. If the interface is of type RAS_CLIENT, the IpAddr is the next hop Ip
  321. // address of the RAS Client. The membership is summarized over RAS clients
  322. // unless the IGMP_ENUM_FOR_RAS_CLIENTS_ID flag is set in Flags.
  323. //
  324. // Flag: IGMP_GROUP_FWD_TO_MGM implies that the group had been added to MGM
  325. //----------------------------------------------------------------------------
  326. typedef struct _IGMP_MIB_GROUP_INFO {
  327. union {
  328. DWORD IfIndex;
  329. DWORD GroupAddr;
  330. };
  331. DWORD IpAddr;
  332. DWORD GroupUpTime;
  333. DWORD GroupExpiryTime;
  334. DWORD LastReporter;
  335. DWORD V1HostPresentTimeLeft;
  336. DWORD Flags;
  337. } IGMP_MIB_GROUP_INFO, *PIGMP_MIB_GROUP_INFO;
  338. typedef struct _IGMP_MIB_GROUP_SOURCE_INFO_V3 {
  339. DWORD Source;
  340. DWORD SourceExpiryTime; //not valid for exclusion mode
  341. DWORD SourceUpTime;
  342. DWORD Flags;
  343. } IGMP_MIB_GROUP_SOURCE_INFO_V3, *PIGMP_MIB_GROUP_SOURCE_INFO_V3;
  344. #define GET_FIRST_IGMP_MIB_GROUP_SOURCE_INFO_V3(pGroupInfoV3) \
  345. ((PIGMP_MIB_GROUP_SOURCE_INFO_V3)((PIGMP_MIB_GROUP_INFO_V3)(pGroupInfoV3)+1))
  346. typedef struct _IGMP_MIB_GROUP_INFO_V3 {
  347. union {
  348. DWORD IfIndex;
  349. DWORD GroupAddr;
  350. };
  351. DWORD IpAddr;
  352. DWORD GroupUpTime;
  353. DWORD GroupExpiryTime;
  354. DWORD LastReporter;
  355. DWORD V1HostPresentTimeLeft;
  356. DWORD Flags;
  357. //v3 additions
  358. DWORD Version; //1/2/3
  359. DWORD Size; //size of this struct
  360. DWORD FilterType;//EXCLUSION/INCLUSION
  361. DWORD V2HostPresentTimeLeft;
  362. DWORD NumSources;
  363. //IGMP_MIB_GROUP_SOURCE_INFO_V3 Sources[0];
  364. } IGMP_MIB_GROUP_INFO_V3, *PIGMP_MIB_GROUP_INFO_V3;
  365. #define IGMP_GROUP_TYPE_NON_STATIC 0x0001
  366. #define IGMP_GROUP_TYPE_STATIC 0x0002
  367. #define IGMP_GROUP_FWD_TO_MGM 0x0004
  368. #define IGMP_GROUP_ALLOW 0x0010
  369. #define IGMP_GROUP_BLOCK 0x0020
  370. #define IGMP_GROUP_NO_STATE 0x0040
  371. //----------------------------------------------------------------------------
  372. // struct: IGMP_MIB_GROUP_IFS_LIST
  373. //
  374. // This MIB entry stores the list of interfaces which have received joins for
  375. // that group.
  376. //
  377. // THIS STRUCTURE HAS VARIABLE LENGTH.
  378. // The structure is followed by NumInterfaces number of structures of type
  379. // IGMP_MIB_GROUP_INFO or IGMP_MIB_GROUP_INFO_V3
  380. //
  381. // This structure is read-only
  382. //
  383. //----------------------------------------------------------------------------
  384. typedef struct _IGMP_MIB_GROUP_IFS_LIST {
  385. DWORD GroupAddr;
  386. DWORD NumInterfaces;
  387. BYTE Buffer[1];
  388. } IGMP_MIB_GROUP_IFS_LIST, *PIGMP_MIB_GROUP_IFS_LIST;
  389. //----------------------------------------------------------------------------
  390. // struct: IGMP_MIB_IF_BINDING
  391. //
  392. // This MIB entry contains the table of IP addresses to which each interface
  393. // is bound.
  394. // All IP addresses are in network order.
  395. //
  396. // THIS STRUCTURE IS VARIABLE LENGTH:
  397. //
  398. // The base structure contains of the field AddrCount, which gives
  399. // the number of IP addresses to which the indexed interface is bound.
  400. // The IP addresses themselves follow the base structure, and are given
  401. // as IGMP_MIB_IP_ADDRESS structures.
  402. // If IfType == IGMP_IF_RAS_SERVER, the IGMP_MIB_IF_BINDING is followed by
  403. // one IGMP_MIB_IP_ADDRESS struct containing the binding of the server
  404. // interface and is followed by (AddrCount-1) next hop addresses of
  405. // RAS clients which are of type DWORD.
  406. //
  407. // This MIB entry is read-only.
  408. //----------------------------------------------------------------------------
  409. typedef struct _IGMP_MIB_IF_BINDING {
  410. DWORD IfIndex;
  411. DWORD IfType;
  412. DWORD State;
  413. DWORD AddrCount;
  414. } IGMP_MIB_IF_BINDING, *PIGMP_MIB_IF_BINDING;
  415. //----------------------------------------------------------------------------
  416. // struct: IGMP_MIB_IP_ADDRESS
  417. //
  418. // This structure is used for storing interface bindings.
  419. // A series of structures of this type follows the IGMP_MIB_IF_BINDING
  420. // structure (described above) .
  421. //
  422. // Both fields are IP address fields in network-order.
  423. //----------------------------------------------------------------------------
  424. typedef struct _IGMP_MIB_IP_ADDRESS {
  425. DWORD IpAddr;
  426. DWORD SubnetMask;
  427. } IGMP_MIB_IP_ADDRESS, *PIGMP_MIB_IP_ADDRESS;
  428. typedef IGMP_MIB_IP_ADDRESS IGMP_IP_ADDRESS;
  429. typedef PIGMP_MIB_IP_ADDRESS PIGMP_IP_ADDRESS;
  430. #define IGMP_BINDING_FIRST_ADDR(bind) ((PIGMP_IP_ADDRESS)((bind) + 1))
  431. //---------------------------------------------------------------------------
  432. //struct: IGMP_IF_BINDING
  433. // This structure is passed during BindInterface Call
  434. //---------------------------------------------------------------------------
  435. typedef struct _IGMP_IF_BINDING {
  436. DWORD State;
  437. DWORD AddrCount;
  438. } IGMP_IF_BINDING, *PIGMP_IF_BINDING;
  439. //----------------------------------------------------------------------------
  440. // struct: IGMP_MIB_SET_INPUT_DATA
  441. //
  442. // This is passed as input data for MibSet.
  443. // Note that only global config and interface config can be set.
  444. //----------------------------------------------------------------------------
  445. typedef struct _IGMP_MIB_SET_INPUT_DATA {
  446. DWORD TypeId;
  447. USHORT Flags; //todo: change subtype to Flags
  448. DWORD BufferSize;
  449. BYTE Buffer[1];
  450. } IGMP_MIB_SET_INPUT_DATA, *PIGMP_MIB_SET_INPUT_DATA;
  451. //----------------------------------------------------------------------------
  452. // struct: IGMP_MIB_GET_INPUT_DATA
  453. //
  454. // This is passed as input data for MibGet, MibGetFirst, MibGetNext.
  455. // All tables are readable.
  456. // These and all other IP addresses must be in network order.
  457. //
  458. // Count: specifies the number of entries to return
  459. //----------------------------------------------------------------------------
  460. typedef struct _IGMP_MIB_GET_INPUT_DATA {
  461. DWORD TypeId;
  462. USHORT Flags;//set IGMP_ENUM_FORMAT_IGMPV3 if you support v3
  463. USHORT Signature;
  464. DWORD IfIndex;
  465. DWORD RasClientAddr;
  466. DWORD GroupAddr;
  467. DWORD Count;
  468. } IGMP_MIB_GET_INPUT_DATA, *PIGMP_MIB_GET_INPUT_DATA;
  469. //----------------------------------------------------------------------------
  470. // struct: IGMP_MIB_GET_OUTPUT_DATA
  471. //
  472. // This is written into the output data by MibGet, MibGetFirst, MibGetNext.
  473. // Note that at the end of a table MibGetNext wraps to the next table,
  474. // and therefore the value TypeID should be examined to see the
  475. // type of the data returned in the output buffer.
  476. //----------------------------------------------------------------------------
  477. typedef struct _IGMP_MIB_GET_OUTPUT_DATA {
  478. DWORD TypeId;
  479. DWORD Flags; //IGMP_ENUM_FORMAT_IGMPV3 set if v3 struct
  480. DWORD Count;
  481. BYTE Buffer[1];
  482. } IGMP_MIB_GET_OUTPUT_DATA, *PIGMP_MIB_GET_OUTPUT_DATA;
  483. #endif // _IGMPRM_H_