00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef __ROUTING_IPRTRMIB_H__
00042 #define __ROUTING_IPRTRMIB_H__
00043
00044 #if _MSC_VER > 1000
00045 #pragma once
00046 #endif
00047
00048 #if _MSC_VER >= 1200
00049 #pragma warning(push)
00050 #endif
00051 #pragma warning(disable:4201)
00052
00053
00054
00055
00056
00057
00058
00059 #include <mprapi.h>
00060
00061
00062
00063
00064
00065
00066
00067 #include <ipifcons.h>
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 #define IPRTRMGR_PID 10000
00084
00085 #ifndef ANY_SIZE
00086
00087 #define ANY_SIZE 1
00088
00089 #endif
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 #define IF_NUMBER 0
00102 #define IF_TABLE (IF_NUMBER + 1)
00103 #define IF_ROW (IF_TABLE + 1)
00104 #define IP_STATS (IF_ROW + 1)
00105 #define IP_ADDRTABLE (IP_STATS + 1)
00106 #define IP_ADDRROW (IP_ADDRTABLE + 1)
00107 #define IP_FORWARDNUMBER (IP_ADDRROW + 1)
00108 #define IP_FORWARDTABLE (IP_FORWARDNUMBER + 1)
00109 #define IP_FORWARDROW (IP_FORWARDTABLE + 1)
00110 #define IP_NETTABLE (IP_FORWARDROW + 1)
00111 #define IP_NETROW (IP_NETTABLE + 1)
00112 #define ICMP_STATS (IP_NETROW + 1)
00113 #define TCP_STATS (ICMP_STATS + 1)
00114 #define TCP_TABLE (TCP_STATS + 1)
00115 #define TCP_ROW (TCP_TABLE + 1)
00116 #define UDP_STATS (TCP_ROW + 1)
00117 #define UDP_TABLE (UDP_STATS + 1)
00118 #define UDP_ROW (UDP_TABLE + 1)
00119 #define MCAST_MFE (UDP_ROW + 1)
00120 #define MCAST_MFE_STATS (MCAST_MFE + 1)
00121 #define BEST_IF (MCAST_MFE_STATS + 1)
00122 #define BEST_ROUTE (BEST_IF + 1)
00123 #define PROXY_ARP (BEST_ROUTE + 1)
00124 #define MCAST_IF_ENTRY (PROXY_ARP + 1)
00125 #define MCAST_GLOBAL (MCAST_IF_ENTRY + 1)
00126 #define IF_STATUS (MCAST_GLOBAL + 1)
00127 #define MCAST_BOUNDARY (IF_STATUS + 1)
00128 #define MCAST_SCOPE (MCAST_BOUNDARY + 1)
00129 #define DEST_MATCHING (MCAST_SCOPE + 1)
00130 #define DEST_LONGER (DEST_MATCHING + 1)
00131 #define DEST_SHORTER (DEST_LONGER + 1)
00132 #define ROUTE_MATCHING (DEST_SHORTER + 1)
00133 #define ROUTE_LONGER (ROUTE_MATCHING + 1)
00134 #define ROUTE_SHORTER (ROUTE_LONGER + 1)
00135 #define ROUTE_STATE (ROUTE_SHORTER + 1)
00136 #define MCAST_MFE_STATS_EX (ROUTE_STATE + 1)
00137 #define IP6_STATS (MCAST_MFE_STATS_EX + 1)
00138 #define UDP6_STATS (IP6_STATS + 1)
00139 #define TCP6_STATS (UDP6_STATS + 1)
00140
00141 #define NUMBER_OF_EXPORTED_VARIABLES (TCP6_STATS + 1)
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156 typedef struct _MIB_OPAQUE_QUERY
00157 {
00158 DWORD dwVarId;
00159 DWORD rgdwVarIndex[ANY_SIZE];
00160 }MIB_OPAQUE_QUERY, *PMIB_OPAQUE_QUERY;
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 typedef struct _MIB_IFNUMBER
00171 {
00172 DWORD dwValue;
00173 } MIB_IFNUMBER, *PMIB_IFNUMBER;
00174
00175
00176 #define MAXLEN_IFDESCR 256
00177 #define MAXLEN_PHYSADDR 8
00178
00179 typedef struct _MIB_IFROW
00180 {
00181 WCHAR wszName[MAX_INTERFACE_NAME_LEN];
00182 DWORD dwIndex;
00183 DWORD dwType;
00184 DWORD dwMtu;
00185 DWORD dwSpeed;
00186 DWORD dwPhysAddrLen;
00187 BYTE bPhysAddr[MAXLEN_PHYSADDR];
00188 DWORD dwAdminStatus;
00189 DWORD dwOperStatus;
00190 DWORD dwLastChange;
00191 DWORD dwInOctets;
00192 DWORD dwInUcastPkts;
00193 DWORD dwInNUcastPkts;
00194 DWORD dwInDiscards;
00195 DWORD dwInErrors;
00196 DWORD dwInUnknownProtos;
00197 DWORD dwOutOctets;
00198 DWORD dwOutUcastPkts;
00199 DWORD dwOutNUcastPkts;
00200 DWORD dwOutDiscards;
00201 DWORD dwOutErrors;
00202 DWORD dwOutQLen;
00203 DWORD dwDescrLen;
00204 BYTE bDescr[MAXLEN_IFDESCR];
00205 } MIB_IFROW,*PMIB_IFROW;
00206
00207 typedef struct _MIB_IFTABLE
00208 {
00209 DWORD dwNumEntries;
00210 MIB_IFROW table[ANY_SIZE];
00211 } MIB_IFTABLE, *PMIB_IFTABLE;
00212
00213 #define SIZEOF_IFTABLE(X) (FIELD_OFFSET(MIB_IFTABLE,table[0]) + ((X) * sizeof(MIB_IFROW)) + ALIGN_SIZE)
00214
00215 typedef struct _MIBICMPSTATS
00216 {
00217 DWORD dwMsgs;
00218 DWORD dwErrors;
00219 DWORD dwDestUnreachs;
00220 DWORD dwTimeExcds;
00221 DWORD dwParmProbs;
00222 DWORD dwSrcQuenchs;
00223 DWORD dwRedirects;
00224 DWORD dwEchos;
00225 DWORD dwEchoReps;
00226 DWORD dwTimestamps;
00227 DWORD dwTimestampReps;
00228 DWORD dwAddrMasks;
00229 DWORD dwAddrMaskReps;
00230 } MIBICMPSTATS, *PMIBICMPSTATS;
00231
00232 typedef struct _MIBICMPINFO
00233 {
00234 MIBICMPSTATS icmpInStats;
00235 MIBICMPSTATS icmpOutStats;
00236 } MIBICMPINFO;
00237
00238 typedef struct _MIB_ICMP
00239 {
00240 MIBICMPINFO stats;
00241 } MIB_ICMP,*PMIB_ICMP;
00242
00243
00244
00245
00246 typedef enum {
00247 ICMP6_DST_UNREACH = 1,
00248 ICMP6_PACKET_TOO_BIG = 2,
00249 ICMP6_TIME_EXCEEDED = 3,
00250 ICMP6_PARAM_PROB = 4,
00251 ICMP6_ECHO_REQUEST = 128,
00252 ICMP6_ECHO_REPLY = 129,
00253 ICMP6_MEMBERSHIP_QUERY = 130,
00254 ICMP6_MEMBERSHIP_REPORT = 131,
00255 ICMP6_MEMBERSHIP_REDUCTION = 132,
00256 ND_ROUTER_SOLICIT = 133,
00257 ND_ROUTER_ADVERT = 134,
00258 ND_NEIGHBOR_SOLICIT = 135,
00259 ND_NEIGHBOR_ADVERT = 136,
00260 ND_REDIRECT = 137,
00261 } ICMP6_TYPE, *PICMP6_TYPE;
00262
00263
00264
00265
00266
00267 typedef enum {
00268 ICMP4_ECHO_REPLY = 0,
00269 ICMP4_DST_UNREACH = 3,
00270 ICMP4_SOURCE_QUENCH = 4,
00271 ICMP4_REDIRECT = 5,
00272 ICMP4_ECHO_REQUEST = 8,
00273 ICMP4_ROUTER_ADVERT = 9,
00274 ICMP4_ROUTER_SOLICIT = 10,
00275 ICMP4_TIME_EXCEEDED = 11,
00276 ICMP4_PARAM_PROB = 12,
00277 ICMP4_TIMESTAMP_REQUEST = 13,
00278 ICMP4_TIMESTAMP_REPLY = 14,
00279 ICMP4_MASK_REQUEST = 17,
00280 ICMP4_MASK_REPLY = 18,
00281 } ICMP4_TYPE, *PICMP4_TYPE;
00282
00283 typedef struct _MIBICMPSTATS_EX
00284 {
00285 DWORD dwMsgs;
00286 DWORD dwErrors;
00287 DWORD rgdwTypeCount[256];
00288 } MIBICMPSTATS_EX, *PMIBICMPSTATS_EX;
00289
00290 typedef struct _MIB_ICMP_EX
00291 {
00292 MIBICMPSTATS_EX icmpInStats;
00293 MIBICMPSTATS_EX icmpOutStats;
00294 } MIB_ICMP_EX,*PMIB_ICMP_EX;
00295
00296 typedef struct _MIB_UDPSTATS
00297 {
00298 DWORD dwInDatagrams;
00299 DWORD dwNoPorts;
00300 DWORD dwInErrors;
00301 DWORD dwOutDatagrams;
00302 DWORD dwNumAddrs;
00303 } MIB_UDPSTATS,*PMIB_UDPSTATS;
00304
00305 typedef struct _MIB_UDPROW
00306 {
00307 DWORD dwLocalAddr;
00308 DWORD dwLocalPort;
00309 } MIB_UDPROW, *PMIB_UDPROW;
00310
00311 typedef struct _MIB_UDPTABLE
00312 {
00313 DWORD dwNumEntries;
00314 MIB_UDPROW table[ANY_SIZE];
00315 } MIB_UDPTABLE, *PMIB_UDPTABLE;
00316
00317 #define SIZEOF_UDPTABLE(X) (FIELD_OFFSET(MIB_UDPTABLE, table[0]) + ((X) * sizeof(MIB_UDPROW)) + ALIGN_SIZE)
00318
00319 typedef struct _MIB_TCPSTATS
00320 {
00321 DWORD dwRtoAlgorithm;
00322 DWORD dwRtoMin;
00323 DWORD dwRtoMax;
00324 DWORD dwMaxConn;
00325 DWORD dwActiveOpens;
00326 DWORD dwPassiveOpens;
00327 DWORD dwAttemptFails;
00328 DWORD dwEstabResets;
00329 DWORD dwCurrEstab;
00330 DWORD dwInSegs;
00331 DWORD dwOutSegs;
00332 DWORD dwRetransSegs;
00333 DWORD dwInErrs;
00334 DWORD dwOutRsts;
00335 DWORD dwNumConns;
00336 } MIB_TCPSTATS, *PMIB_TCPSTATS;
00337
00338 #define MIB_TCP_RTO_OTHER 1
00339 #define MIB_TCP_RTO_CONSTANT 2
00340 #define MIB_TCP_RTO_RSRE 3
00341 #define MIB_TCP_RTO_VANJ 4
00342
00343 #define MIB_TCP_MAXCONN_DYNAMIC (DWORD)-1
00344
00345 typedef struct _MIB_TCPROW
00346 {
00347 DWORD dwState;
00348 DWORD dwLocalAddr;
00349 DWORD dwLocalPort;
00350 DWORD dwRemoteAddr;
00351 DWORD dwRemotePort;
00352 } MIB_TCPROW, *PMIB_TCPROW;
00353
00354 #define MIB_TCP_STATE_CLOSED 1
00355 #define MIB_TCP_STATE_LISTEN 2
00356 #define MIB_TCP_STATE_SYN_SENT 3
00357 #define MIB_TCP_STATE_SYN_RCVD 4
00358 #define MIB_TCP_STATE_ESTAB 5
00359 #define MIB_TCP_STATE_FIN_WAIT1 6
00360 #define MIB_TCP_STATE_FIN_WAIT2 7
00361 #define MIB_TCP_STATE_CLOSE_WAIT 8
00362 #define MIB_TCP_STATE_CLOSING 9
00363 #define MIB_TCP_STATE_LAST_ACK 10
00364 #define MIB_TCP_STATE_TIME_WAIT 11
00365 #define MIB_TCP_STATE_DELETE_TCB 12
00366
00367 typedef struct _MIB_TCPTABLE
00368 {
00369 DWORD dwNumEntries;
00370 MIB_TCPROW table[ANY_SIZE];
00371 } MIB_TCPTABLE, *PMIB_TCPTABLE;
00372
00373 #define SIZEOF_TCPTABLE(X) (FIELD_OFFSET(MIB_TCPTABLE,table[0]) + ((X) * sizeof(MIB_TCPROW)) + ALIGN_SIZE)
00374
00375 #define MIB_USE_CURRENT_TTL ((DWORD)-1)
00376 #define MIB_USE_CURRENT_FORWARDING ((DWORD)-1)
00377
00378 typedef struct _MIB_IPSTATS
00379 {
00380 DWORD dwForwarding;
00381 DWORD dwDefaultTTL;
00382 DWORD dwInReceives;
00383 DWORD dwInHdrErrors;
00384 DWORD dwInAddrErrors;
00385 DWORD dwForwDatagrams;
00386 DWORD dwInUnknownProtos;
00387 DWORD dwInDiscards;
00388 DWORD dwInDelivers;
00389 DWORD dwOutRequests;
00390 DWORD dwRoutingDiscards;
00391 DWORD dwOutDiscards;
00392 DWORD dwOutNoRoutes;
00393 DWORD dwReasmTimeout;
00394 DWORD dwReasmReqds;
00395 DWORD dwReasmOks;
00396 DWORD dwReasmFails;
00397 DWORD dwFragOks;
00398 DWORD dwFragFails;
00399 DWORD dwFragCreates;
00400 DWORD dwNumIf;
00401 DWORD dwNumAddr;
00402 DWORD dwNumRoutes;
00403 } MIB_IPSTATS, *PMIB_IPSTATS;
00404
00405 #define MIB_IP_FORWARDING 1
00406 #define MIB_IP_NOT_FORWARDING 2
00407
00408
00409
00410
00411 #define MIB_IPADDR_PRIMARY 0x0001 // Primary ipaddr
00412 #define MIB_IPADDR_DYNAMIC 0x0004 // Dynamic ipaddr
00413 #define MIB_IPADDR_DISCONNECTED 0x0008 // Address is on disconnected interface
00414 #define MIB_IPADDR_DELETED 0x0040 // Address being deleted
00415 #define MIB_IPADDR_TRANSIENT 0x0080 // Transient address
00416
00417
00418 typedef struct _MIB_IPADDRROW
00419 {
00420 DWORD dwAddr;
00421 DWORD dwIndex;
00422 DWORD dwMask;
00423 DWORD dwBCastAddr;
00424 DWORD dwReasmSize;
00425 unsigned short unused1;
00426 unsigned short wType;
00427 } MIB_IPADDRROW, *PMIB_IPADDRROW;
00428
00429 typedef struct _MIB_IPADDRTABLE
00430 {
00431 DWORD dwNumEntries;
00432 MIB_IPADDRROW table[ANY_SIZE];
00433 } MIB_IPADDRTABLE, *PMIB_IPADDRTABLE;
00434
00435
00436 #define SIZEOF_IPADDRTABLE(X) (FIELD_OFFSET(MIB_IPADDRTABLE,table[0]) + ((X) * sizeof(MIB_IPADDRROW)) + ALIGN_SIZE)
00437
00438
00439 typedef struct _MIB_IPFORWARDNUMBER
00440 {
00441 DWORD dwValue;
00442 }MIB_IPFORWARDNUMBER,*PMIB_IPFORWARDNUMBER;
00443
00444 typedef struct _MIB_IPFORWARDROW
00445 {
00446 DWORD dwForwardDest;
00447 DWORD dwForwardMask;
00448 DWORD dwForwardPolicy;
00449 DWORD dwForwardNextHop;
00450 DWORD dwForwardIfIndex;
00451 DWORD dwForwardType;
00452 DWORD dwForwardProto;
00453 DWORD dwForwardAge;
00454 DWORD dwForwardNextHopAS;
00455 DWORD dwForwardMetric1;
00456 DWORD dwForwardMetric2;
00457 DWORD dwForwardMetric3;
00458 DWORD dwForwardMetric4;
00459 DWORD dwForwardMetric5;
00460 }MIB_IPFORWARDROW, *PMIB_IPFORWARDROW;
00461
00462 #define MIB_IPROUTE_TYPE_OTHER 1
00463 #define MIB_IPROUTE_TYPE_INVALID 2
00464 #define MIB_IPROUTE_TYPE_DIRECT 3
00465 #define MIB_IPROUTE_TYPE_INDIRECT 4
00466
00467 #define MIB_IPROUTE_METRIC_UNUSED (DWORD)-1
00468
00469
00470
00471
00472
00473 #define MIB_IPPROTO_OTHER 1
00474 #define MIB_IPPROTO_LOCAL 2
00475 #define MIB_IPPROTO_NETMGMT 3
00476 #define MIB_IPPROTO_ICMP 4
00477 #define MIB_IPPROTO_EGP 5
00478 #define MIB_IPPROTO_GGP 6
00479 #define MIB_IPPROTO_HELLO 7
00480 #define MIB_IPPROTO_RIP 8
00481 #define MIB_IPPROTO_IS_IS 9
00482 #define MIB_IPPROTO_ES_IS 10
00483 #define MIB_IPPROTO_CISCO 11
00484 #define MIB_IPPROTO_BBN 12
00485 #define MIB_IPPROTO_OSPF 13
00486 #define MIB_IPPROTO_BGP 14
00487
00488 #define MIB_IPPROTO_NT_AUTOSTATIC 10002
00489 #define MIB_IPPROTO_NT_STATIC 10006
00490 #define MIB_IPPROTO_NT_STATIC_NON_DOD 10007
00491
00492 typedef struct _MIB_IPFORWARDTABLE
00493 {
00494 DWORD dwNumEntries;
00495 MIB_IPFORWARDROW table[ANY_SIZE];
00496 }MIB_IPFORWARDTABLE, *PMIB_IPFORWARDTABLE;
00497
00498
00499
00500
00501 #define SIZEOF_IPFORWARDTABLE(X) (FIELD_OFFSET(MIB_IPFORWARDTABLE,table[0]) + ((X) * sizeof(MIB_IPFORWARDROW)) + ALIGN_SIZE)
00502
00503
00504 typedef struct _MIB_IPNETROW
00505 {
00506 DWORD dwIndex;
00507 DWORD dwPhysAddrLen;
00508 BYTE bPhysAddr[MAXLEN_PHYSADDR];
00509 DWORD dwAddr;
00510 DWORD dwType;
00511 } MIB_IPNETROW, *PMIB_IPNETROW;
00512
00513 #define MIB_IPNET_TYPE_OTHER 1
00514 #define MIB_IPNET_TYPE_INVALID 2
00515 #define MIB_IPNET_TYPE_DYNAMIC 3
00516 #define MIB_IPNET_TYPE_STATIC 4
00517
00518 typedef struct _MIB_IPNETTABLE
00519 {
00520 DWORD dwNumEntries;
00521 MIB_IPNETROW table[ANY_SIZE];
00522 } MIB_IPNETTABLE, *PMIB_IPNETTABLE;
00523
00524 #define SIZEOF_IPNETTABLE(X) (FIELD_OFFSET(MIB_IPNETTABLE, table[0]) + ((X) * sizeof(MIB_IPNETROW)) + ALIGN_SIZE)
00525
00526 typedef struct _MIB_IPMCAST_OIF
00527 {
00528 DWORD dwOutIfIndex;
00529 DWORD dwNextHopAddr;
00530 DWORD dwReserved;
00531 DWORD dwReserved1;
00532 }MIB_IPMCAST_OIF, *PMIB_IPMCAST_OIF;
00533
00534 typedef struct _MIB_IPMCAST_MFE
00535 {
00536 DWORD dwGroup;
00537 DWORD dwSource;
00538 DWORD dwSrcMask;
00539 DWORD dwUpStrmNgbr;
00540 DWORD dwInIfIndex;
00541 DWORD dwInIfProtocol;
00542 DWORD dwRouteProtocol;
00543 DWORD dwRouteNetwork;
00544 DWORD dwRouteMask;
00545 ULONG ulUpTime;
00546 ULONG ulExpiryTime;
00547 ULONG ulTimeOut;
00548 ULONG ulNumOutIf;
00549 DWORD fFlags;
00550 DWORD dwReserved;
00551 MIB_IPMCAST_OIF rgmioOutInfo[ANY_SIZE];
00552 }MIB_IPMCAST_MFE, *PMIB_IPMCAST_MFE;
00553
00554 typedef struct _MIB_MFE_TABLE
00555 {
00556 DWORD dwNumEntries;
00557 MIB_IPMCAST_MFE table[ANY_SIZE];
00558 }MIB_MFE_TABLE, *PMIB_MFE_TABLE;
00559
00560
00561 #define SIZEOF_BASIC_MIB_MFE \
00562 (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE, rgmioOutInfo[0]))
00563
00564 #define SIZEOF_MIB_MFE(X) \
00565 (SIZEOF_BASIC_MIB_MFE + ((X) * sizeof(MIB_IPMCAST_OIF)))
00566
00567
00568 typedef struct _MIB_IPMCAST_OIF_STATS
00569 {
00570 DWORD dwOutIfIndex;
00571 DWORD dwNextHopAddr;
00572 DWORD dwDialContext;
00573 ULONG ulTtlTooLow;
00574 ULONG ulFragNeeded;
00575 ULONG ulOutPackets;
00576 ULONG ulOutDiscards;
00577 }MIB_IPMCAST_OIF_STATS, *PMIB_IPMCAST_OIF_STATS;
00578
00579 typedef struct _MIB_IPMCAST_MFE_STATS
00580 {
00581 DWORD dwGroup;
00582 DWORD dwSource;
00583 DWORD dwSrcMask;
00584 DWORD dwUpStrmNgbr;
00585 DWORD dwInIfIndex;
00586 DWORD dwInIfProtocol;
00587 DWORD dwRouteProtocol;
00588 DWORD dwRouteNetwork;
00589 DWORD dwRouteMask;
00590 ULONG ulUpTime;
00591 ULONG ulExpiryTime;
00592 ULONG ulNumOutIf;
00593 ULONG ulInPkts;
00594 ULONG ulInOctets;
00595 ULONG ulPktsDifferentIf;
00596 ULONG ulQueueOverflow;
00597
00598 MIB_IPMCAST_OIF_STATS rgmiosOutStats[ANY_SIZE];
00599 }MIB_IPMCAST_MFE_STATS, *PMIB_IPMCAST_MFE_STATS;
00600
00601 typedef struct _MIB_MFE_STATS_TABLE
00602 {
00603 DWORD dwNumEntries;
00604 MIB_IPMCAST_MFE_STATS table[ANY_SIZE];
00605 }MIB_MFE_STATS_TABLE, *PMIB_MFE_STATS_TABLE;
00606
00607 #define SIZEOF_BASIC_MIB_MFE_STATS \
00608 (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE_STATS, rgmiosOutStats[0]))
00609
00610 #define SIZEOF_MIB_MFE_STATS(X) \
00611 (SIZEOF_BASIC_MIB_MFE_STATS + ((X) * sizeof(MIB_IPMCAST_OIF_STATS)))
00612
00613
00614 typedef struct _MIB_IPMCAST_MFE_STATS_EX
00615 {
00616 DWORD dwGroup;
00617 DWORD dwSource;
00618 DWORD dwSrcMask;
00619 DWORD dwUpStrmNgbr;
00620 DWORD dwInIfIndex;
00621 DWORD dwInIfProtocol;
00622 DWORD dwRouteProtocol;
00623 DWORD dwRouteNetwork;
00624 DWORD dwRouteMask;
00625 ULONG ulUpTime;
00626 ULONG ulExpiryTime;
00627 ULONG ulNumOutIf;
00628 ULONG ulInPkts;
00629 ULONG ulInOctets;
00630 ULONG ulPktsDifferentIf;
00631 ULONG ulQueueOverflow;
00632 ULONG ulUninitMfe;
00633 ULONG ulNegativeMfe;
00634 ULONG ulInDiscards;
00635 ULONG ulInHdrErrors;
00636 ULONG ulTotalOutPackets;
00637
00638 MIB_IPMCAST_OIF_STATS rgmiosOutStats[ANY_SIZE];
00639 }MIB_IPMCAST_MFE_STATS_EX, *PMIB_IPMCAST_MFE_STATS_EX;
00640
00641 typedef struct _MIB_MFE_STATS_TABLE_EX
00642 {
00643 DWORD dwNumEntries;
00644 MIB_IPMCAST_MFE_STATS_EX table[ANY_SIZE];
00645 }MIB_MFE_STATS_TABLE_EX, *PMIB_MFE_STATS_TABLE_EX;
00646
00647 #define SIZEOF_BASIC_MIB_MFE_STATS_EX \
00648 (ULONG)(FIELD_OFFSET(MIB_IPMCAST_MFE_STATS_EX, rgmiosOutStats[0]))
00649
00650 #define SIZEOF_MIB_MFE_STATS_EX(X) \
00651 (SIZEOF_BASIC_MIB_MFE_STATS_EX + ((X) * sizeof(MIB_IPMCAST_OIF_STATS)))
00652
00653
00654 typedef struct _MIB_IPMCAST_GLOBAL {
00655 DWORD dwEnable;
00656 }MIB_IPMCAST_GLOBAL, *PMIB_IPMCAST_GLOBAL;
00657
00658 typedef struct _MIB_IPMCAST_IF_ENTRY
00659 {
00660 DWORD dwIfIndex;
00661 DWORD dwTtl;
00662 DWORD dwProtocol;
00663 DWORD dwRateLimit;
00664 ULONG ulInMcastOctets;
00665 ULONG ulOutMcastOctets;
00666 }MIB_IPMCAST_IF_ENTRY, *PMIB_IPMCAST_IF_ENTRY;
00667
00668 typedef struct _MIB_IPMCAST_IF_TABLE
00669 {
00670 DWORD dwNumEntries;
00671 MIB_IPMCAST_IF_ENTRY table[ANY_SIZE];
00672 }MIB_IPMCAST_IF_TABLE, *PMIB_IPMCAST_IF_TABLE;
00673
00674 #define SIZEOF_MCAST_IF_TABLE(X) (FIELD_OFFSET(MIB_IPMCAST_IF_TABLE,table[0]) + ((X) * sizeof(MIB_IPMCAST_IF_ENTRY)) + ALIGN_SIZE)
00675
00676 typedef struct _MIB_IPMCAST_BOUNDARY
00677 {
00678 DWORD dwIfIndex;
00679 DWORD dwGroupAddress;
00680 DWORD dwGroupMask;
00681 DWORD dwStatus;
00682 }MIB_IPMCAST_BOUNDARY, *PMIB_IPMCAST_BOUNDARY;
00683
00684 typedef struct _MIB_IPMCAST_BOUNDARY_TABLE
00685 {
00686 DWORD dwNumEntries;
00687 MIB_IPMCAST_BOUNDARY table[ANY_SIZE];
00688 }MIB_IPMCAST_BOUNDARY_TABLE, *PMIB_IPMCAST_BOUNDARY_TABLE;
00689
00690 #define SIZEOF_BOUNDARY_TABLE(X) (FIELD_OFFSET(MIB_IPMCAST_BOUNDARY_TABLE,table[0]) + ((X) * sizeof(MIB_IPMCAST_BOUNDARY)) + ALIGN_SIZE)
00691
00692 typedef struct {
00693 DWORD dwGroupAddress;
00694 DWORD dwGroupMask;
00695 } MIB_BOUNDARYROW, *PMIB_BOUNDARYROW;
00696
00697
00698
00699
00700
00701 typedef struct {
00702 DWORD dwTtl;
00703 DWORD dwRateLimit;
00704 } MIB_MCAST_LIMIT_ROW, *PMIB_MCAST_LIMIT_ROW;
00705
00706 #define MAX_SCOPE_NAME_LEN 255
00707
00708
00709
00710
00711
00712 #define SN_UNICODE
00713 typedef WCHAR SN_CHAR;
00714 typedef SN_CHAR SCOPE_NAME_BUFFER[MAX_SCOPE_NAME_LEN+1], *SCOPE_NAME;
00715
00716 typedef struct _MIB_IPMCAST_SCOPE
00717 {
00718 DWORD dwGroupAddress;
00719 DWORD dwGroupMask;
00720 SCOPE_NAME_BUFFER snNameBuffer;
00721 DWORD dwStatus;
00722 }MIB_IPMCAST_SCOPE, *PMIB_IPMCAST_SCOPE;
00723
00724 typedef struct _MIB_IPDESTROW
00725 {
00726 #ifdef __cplusplus
00727 MIB_IPFORWARDROW ForwardRow;
00728 #else
00729 MIB_IPFORWARDROW;
00730 #endif
00731
00732 DWORD dwForwardPreference;
00733 DWORD dwForwardViewSet;
00734 }MIB_IPDESTROW, *PMIB_IPDESTROW;
00735
00736 typedef struct _MIB_IPDESTTABLE
00737 {
00738 DWORD dwNumEntries;
00739 MIB_IPDESTROW table[ANY_SIZE];
00740 }MIB_IPDESTTABLE, *PMIB_IPDESTTABLE;
00741
00742 typedef struct _MIB_BEST_IF
00743 {
00744 DWORD dwDestAddr;
00745 DWORD dwIfIndex;
00746 }MIB_BEST_IF, *PMIB_BEST_IF;
00747
00748 typedef struct _MIB_PROXYARP
00749 {
00750 DWORD dwAddress;
00751 DWORD dwMask;
00752 DWORD dwIfIndex;
00753 }MIB_PROXYARP, *PMIB_PROXYARP;
00754
00755 typedef struct _MIB_IFSTATUS
00756 {
00757 DWORD dwIfIndex;
00758 DWORD dwAdminStatus;
00759 DWORD dwOperationalStatus;
00760 BOOL bMHbeatActive;
00761 BOOL bMHbeatAlive;
00762 }MIB_IFSTATUS, *PMIB_IFSTATUS;
00763
00764 typedef struct _MIB_ROUTESTATE
00765 {
00766 BOOL bRoutesSetToStack;
00767
00768 }MIB_ROUTESTATE, *PMIB_ROUTESTATE;
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790 typedef struct _MIB_OPAQUE_INFO
00791 {
00792 DWORD dwId;
00793
00794 union
00795 {
00796 ULONGLONG ullAlign;
00797 BYTE rgbyData[1];
00798 };
00799
00800 }MIB_OPAQUE_INFO, *PMIB_OPAQUE_INFO;
00801
00802 #define MAX_MIB_OFFSET 8
00803
00804 #define MIB_INFO_SIZE(S) \
00805 (MAX_MIB_OFFSET + sizeof(S))
00806
00807 #define MIB_INFO_SIZE_IN_DWORDS(S) \
00808 ((MIB_INFO_SIZE(S))/sizeof(DWORD) + 1)
00809
00810 #define DEFINE_MIB_BUFFER(X,Y,Z) \
00811 DWORD __rgdwBuff[MIB_INFO_SIZE_IN_DWORDS(Y)]; \
00812 PMIB_OPAQUE_INFO X = (PMIB_OPAQUE_INFO)__rgdwBuff; \
00813 Y * Z = (Y *)(X->rgbyData)
00814
00815
00816 #define CAST_MIB_INFO(X,Y,Z) Z = (Y)(X->rgbyData)
00817
00818 #if _MSC_VER >= 1200
00819 #pragma warning(pop)
00820 #else
00821 #pragma warning(default:4201)
00822 #endif
00823
00824 #endif //__ROUTING_IPRTRMIB_H__