source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/netmon.h@ 1170

Last change on this file since 1170 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 109.6 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef __REQUIRED_RPCNDR_H_VERSION__
7#define __REQUIRED_RPCNDR_H_VERSION__ 475
8#endif
9
10#include "rpc.h"
11#include "rpcndr.h"
12
13#ifndef __RPCNDR_H_VERSION__
14#error This stub requires an updated version of <rpcndr.h>
15#endif
16
17#ifndef COM_NO_WINDOWS_H
18#include "windows.h"
19#include "ole2.h"
20#endif
21
22#ifndef __netmon_h__
23#define __netmon_h__
24
25#ifndef __IDelaydC_FWD_DEFINED__
26#define __IDelaydC_FWD_DEFINED__
27typedef struct IDelaydC IDelaydC;
28#endif
29
30#ifndef __IRTC_FWD_DEFINED__
31#define __IRTC_FWD_DEFINED__
32typedef struct IRTC IRTC;
33#endif
34
35#ifndef __IStats_FWD_DEFINED__
36#define __IStats_FWD_DEFINED__
37typedef struct IStats IStats;
38#endif
39
40#include "unknwn.h"
41
42#ifdef __cplusplus
43extern "C"{
44#endif
45
46#ifndef __MIDL_user_allocate_free_DEFINED__
47#define __MIDL_user_allocate_free_DEFINED__
48 void *__RPC_API MIDL_user_allocate(size_t);
49 void __RPC_API MIDL_user_free(void *);
50#endif
51
52#include <winerror.h>
53#include <winerror.h>
54
55#pragma pack(1)
56
57#ifdef _X86_
58#pragma pack(1)
59#else
60#pragma pack()
61#endif
62
63 typedef BYTE *LPBYTE;
64 typedef const void *HBLOB;
65
66#define MAC_TYPE_UNKNOWN (0)
67#define MAC_TYPE_ETHERNET (1)
68#define MAC_TYPE_TOKENRING (2)
69#define MAC_TYPE_FDDI (3)
70#define MAC_TYPE_ATM (4)
71#define MAC_TYPE_1394 (5)
72#define MACHINE_NAME_LENGTH (16)
73#define USER_NAME_LENGTH (32)
74#define ADAPTER_COMMENT_LENGTH (32)
75#define CONNECTION_FLAGS_WANT_CONVERSATION_STATS (0x1)
76
77 typedef struct _TRANSMITSTATS {
78 DWORD TotalFramesSent;
79 DWORD TotalBytesSent;
80 DWORD TotalTransmitErrors;
81 } TRANSMITSTATS;
82
83 typedef TRANSMITSTATS *LPTRANSMITSTATS;
84
85#define TRANSMITSTATS_SIZE (sizeof(TRANSMITSTATS))
86
87 typedef struct _STATISTICS {
88 __MINGW_EXTENSION __int64 TimeElapsed;
89 DWORD TotalFramesCaptured;
90 DWORD TotalBytesCaptured;
91 DWORD TotalFramesFiltered;
92 DWORD TotalBytesFiltered;
93 DWORD TotalMulticastsFiltered;
94 DWORD TotalBroadcastsFiltered;
95 DWORD TotalFramesSeen;
96 DWORD TotalBytesSeen;
97 DWORD TotalMulticastsReceived;
98 DWORD TotalBroadcastsReceived;
99 DWORD TotalFramesDropped;
100 DWORD TotalFramesDroppedFromBuffer;
101 DWORD MacFramesReceived;
102 DWORD MacCRCErrors;
103 __MINGW_EXTENSION __int64 MacBytesReceivedEx;
104 DWORD MacFramesDropped_NoBuffers;
105 DWORD MacMulticastsReceived;
106 DWORD MacBroadcastsReceived;
107 DWORD MacFramesDropped_HwError;
108 } STATISTICS;
109
110 typedef STATISTICS *LPSTATISTICS;
111
112#define STATISTICS_SIZE (sizeof(STATISTICS))
113
114#pragma pack(push,1)
115
116#define MAX_NAME_SIZE (32)
117#define IP_ADDRESS_SIZE (4)
118#define MAC_ADDRESS_SIZE (6)
119#define IP6_ADDRESS_SIZE (16)
120#define MAX_ADDRESS_SIZE (16)
121
122#define ADDRESS_TYPE_ETHERNET (0)
123#define ADDRESS_TYPE_IP (1)
124#define ADDRESS_TYPE_IPX (2)
125#define ADDRESS_TYPE_TOKENRING (3)
126#define ADDRESS_TYPE_FDDI (4)
127#define ADDRESS_TYPE_XNS (5)
128#define ADDRESS_TYPE_ANY (6)
129#define ADDRESS_TYPE_ANY_GROUP (7)
130#define ADDRESS_TYPE_FIND_HIGHEST (8)
131#define ADDRESS_TYPE_VINES_IP (9)
132#define ADDRESS_TYPE_LOCAL_ONLY (10)
133#define ADDRESS_TYPE_ATM (11)
134#define ADDRESS_TYPE_1394 (12)
135#define ADDRESS_TYPE_IP6 (13)
136
137#define ADDRESSTYPE_FLAGS_NORMALIZE (0x1)
138#define ADDRESSTYPE_FLAGS_BIT_REVERSE (0x2)
139
140 typedef struct _VINES_IP_ADDRESS {
141 DWORD NetID;
142 WORD SubnetID;
143 } VINES_IP_ADDRESS;
144
145 typedef VINES_IP_ADDRESS *LPVINES_IP_ADDRESS;
146
147#define VINES_IP_ADDRESS_SIZE (sizeof(VINES_IP_ADDRESS))
148
149 typedef struct _IPX_ADDR {
150 BYTE Subnet[4];
151 BYTE Address[6];
152 } IPX_ADDR;
153
154 typedef IPX_ADDR *LPIPX_ADDR;
155
156#define IPX_ADDR_SIZE (sizeof(IPX_ADDR))
157
158 typedef IPX_ADDR XNS_ADDRESS;
159 typedef IPX_ADDR *LPXNS_ADDRESS;
160
161 typedef struct _ETHERNET_SRC_ADDRESS {
162 BYTE RoutingBit: 1;
163 BYTE LocalBit: 1;
164 BYTE Byte0: 6;
165 BYTE Reserved[5];
166 } ETHERNET_SRC_ADDRESS;
167
168 typedef ETHERNET_SRC_ADDRESS *LPETHERNET_SRC_ADDRESS;
169
170 typedef struct _ETHERNET_DST_ADDRESS {
171 BYTE GroupBit: 1;
172 BYTE AdminBit: 1;
173 BYTE Byte0: 6;
174 BYTE Reserved[5];
175 } ETHERNET_DST_ADDRESS;
176
177 typedef ETHERNET_DST_ADDRESS *LPETHERNET_DST_ADDRESS;
178 typedef ETHERNET_SRC_ADDRESS FDDI_SRC_ADDRESS;
179 typedef ETHERNET_DST_ADDRESS FDDI_DST_ADDRESS;
180 typedef FDDI_SRC_ADDRESS *LPFDDI_SRC_ADDRESS;
181 typedef FDDI_DST_ADDRESS *LPFDDI_DST_ADDRESS;
182
183 typedef struct _TOKENRING_SRC_ADDRESS {
184 BYTE Byte0: 6;
185 BYTE LocalBit: 1;
186 BYTE RoutingBit: 1;
187 BYTE Byte1;
188 BYTE Byte2: 7;
189 BYTE Functional: 1;
190 BYTE Reserved[3];
191 } TOKENRING_SRC_ADDRESS;
192
193 typedef TOKENRING_SRC_ADDRESS *LPTOKENRING_SRC_ADDRESS;
194
195 typedef struct _TOKENRING_DST_ADDRESS {
196 BYTE Byte0: 6;
197 BYTE AdminBit: 1;
198 BYTE GroupBit: 1;
199 BYTE Reserved[5];
200 } TOKENRING_DST_ADDRESS;
201
202 typedef TOKENRING_DST_ADDRESS *LPTOKENRING_DST_ADDRESS;
203
204 typedef struct _ADDRESS2 {
205 DWORD Type;
206 __C89_NAMELESS union {
207 BYTE MACAddress[MAC_ADDRESS_SIZE];
208 BYTE IPAddress[IP_ADDRESS_SIZE];
209 BYTE IP6Address[IP6_ADDRESS_SIZE];
210 BYTE IPXRawAddress[IPX_ADDR_SIZE];
211 IPX_ADDR IPXAddress;
212 BYTE VinesIPRawAddress[VINES_IP_ADDRESS_SIZE];
213 VINES_IP_ADDRESS VinesIPAddress;
214 ETHERNET_SRC_ADDRESS EthernetSrcAddress;
215 ETHERNET_DST_ADDRESS EthernetDstAddress;
216 TOKENRING_SRC_ADDRESS TokenringSrcAddress;
217 TOKENRING_DST_ADDRESS TokenringDstAddress;
218 FDDI_SRC_ADDRESS FddiSrcAddress;
219 FDDI_DST_ADDRESS FddiDstAddress;
220 };
221 WORD Flags;
222 } ADDRESS2;
223
224 typedef ADDRESS2 *LPADDRESS2;
225
226#define ADDRESS2_SIZE sizeof(ADDRESS2)
227
228#pragma pack(pop)
229
230#define ADDRESS_FLAGS_MATCH_DST (0x1)
231#define ADDRESS_FLAGS_MATCH_SRC (0x2)
232#define ADDRESS_FLAGS_EXCLUDE (0x4)
233#define ADDRESS_FLAGS_DST_GROUP_ADDR (0x8)
234#define ADDRESS_FLAGS_MATCH_BOTH (0x3)
235
236 typedef struct _ADDRESSPAIR2 {
237 WORD AddressFlags;
238 WORD NalReserved;
239 ADDRESS2 DstAddress;
240 ADDRESS2 SrcAddress;
241 } ADDRESSPAIR2;
242
243 typedef ADDRESSPAIR2 *LPADDRESSPAIR2;
244
245#define ADDRESSPAIR2_SIZE sizeof(ADDRESSPAIR2)
246
247#define MAX_ADDRESS_PAIRS (8)
248
249 typedef struct _ADDRESSTABLE2 {
250 DWORD nAddressPairs;
251 DWORD nNonMacAddressPairs;
252 ADDRESSPAIR2 AddressPair[MAX_ADDRESS_PAIRS];
253 } ADDRESSTABLE2;
254
255 typedef ADDRESSTABLE2 *LPADDRESSTABLE2;
256
257#define ADDRESSTABLE2_SIZE sizeof(ADDRESSTABLE2)
258
259#define NETWORKINFO_FLAGS_PMODE_NOT_SUPPORTED (0x1)
260#define NETWORKINFO_FLAGS_REMOTE_NAL (0x4)
261#define NETWORKINFO_FLAGS_REMOTE_NAL_CONNECTED (0x8)
262#define NETWORKINFO_FLAGS_REMOTE_CARD (0x10)
263#define NETWORKINFO_FLAGS_RAS (0x20)
264#define NETWORKINFO_RESERVED_FIELD_SIZE (FIELD_OFFSET(ADDRESS2,IPXAddress) + sizeof(IPX_ADDR))
265
266 typedef struct _NETWORKINFO {
267 BYTE PermanentAddr[6];
268 BYTE CurrentAddr[6];
269 BYTE Reserved[NETWORKINFO_RESERVED_FIELD_SIZE];
270 DWORD LinkSpeed;
271 DWORD MacType;
272 DWORD MaxFrameSize;
273 DWORD Flags;
274 DWORD TimestampScaleFactor;
275 BYTE NodeName[32];
276 WINBOOL PModeSupported;
277 BYTE Comment[ADAPTER_COMMENT_LENGTH];
278 } NETWORKINFO;
279
280 typedef NETWORKINFO *LPNETWORKINFO;
281
282#define NETWORKINFO_SIZE sizeof(NETWORKINFO)
283#define MINIMUM_FRAME_SIZE (32)
284#define MAX_PATTERN_LENGTH (16)
285
286#define PATTERN_MATCH_FLAGS_NOT (0x1)
287#define PATTERN_MATCH_FLAGS_RESERVED_1 (0x2)
288#define PATTERN_MATCH_FLAGS_PORT_SPECIFIED (0x8)
289
290#define OFFSET_BASIS_RELATIVE_TO_FRAME (0)
291#define OFFSET_BASIS_RELATIVE_TO_EFFECTIVE_PROTOCOL (1)
292#define OFFSET_BASIS_RELATIVE_TO_IPX (2)
293#define OFFSET_BASIS_RELATIVE_TO_IP (3)
294#define OFFSET_BASIS_RELATIVE_TO_IP6 (4)
295
296 typedef union __MIDL___MIDL_itf_netmon_0000_0001 {
297 BYTE NextHeader;
298 BYTE IPPort;
299 WORD ByteSwappedIPXPort;
300 } GENERIC_PORT;
301
302 typedef struct _PATTERNMATCH {
303 DWORD Flags;
304 BYTE OffsetBasis;
305 GENERIC_PORT Port;
306 WORD Offset;
307 WORD Length;
308 BYTE PatternToMatch[16];
309 } PATTERNMATCH;
310
311 typedef PATTERNMATCH *LPPATTERNMATCH;
312
313#define PATTERNMATCH_SIZE (sizeof(PATTERNMATCH))
314
315#define MAX_PATTERNS (4)
316
317 typedef struct _ANDEXP {
318 DWORD nPatternMatches;
319 PATTERNMATCH PatternMatch[4];
320 } ANDEXP;
321
322 typedef ANDEXP *LPANDEXP;
323
324#define ANDEXP_SIZE (sizeof(ANDEXP))
325
326 typedef struct _EXPRESSION {
327 DWORD nAndExps;
328 ANDEXP AndExp[4];
329 } EXPRESSION;
330
331 typedef EXPRESSION *LPEXPRESSION;
332
333#define EXPRESSION_SIZE (sizeof(EXPRESSION))
334
335#define TRIGGER_TYPE_PATTERN_MATCH (1)
336#define TRIGGER_TYPE_BUFFER_CONTENT (2)
337#define TRIGGER_TYPE_PATTERN_MATCH_THEN_BUFFER_CONTENT (3)
338#define TRIGGER_TYPE_BUFFER_CONTENT_THEN_PATTERN_MATCH (4)
339
340#define TRIGGER_FLAGS_FRAME_RELATIVE (0)
341#define TRIGGER_FLAGS_DATA_RELATIVE (0x1)
342
343#define TRIGGER_ACTION_NOTIFY (0)
344#define TRIGGER_ACTION_STOP (0x2)
345#define TRIGGER_ACTION_PAUSE (0x3)
346
347#define TRIGGER_BUFFER_FULL_25_PERCENT (0)
348#define TRIGGER_BUFFER_FULL_50_PERCENT (1)
349#define TRIGGER_BUFFER_FULL_75_PERCENT (2)
350#define TRIGGER_BUFFER_FULL_100_PERCENT (3)
351
352 typedef struct _TRIGGER {
353 WINBOOL TriggerActive;
354 BYTE TriggerType;
355 BYTE TriggerAction;
356 DWORD TriggerFlags;
357 PATTERNMATCH TriggerPatternMatch;
358 DWORD TriggerBufferSize;
359 DWORD TriggerReserved;
360 char TriggerCommandLine[260];
361 } TRIGGER;
362
363 typedef TRIGGER *LPTRIGGER;
364
365#define TRIGGER_SIZE (sizeof(TRIGGER))
366
367#define CAPTUREFILTER_FLAGS_INCLUDE_ALL_SAPS (0x1)
368#define CAPTUREFILTER_FLAGS_INCLUDE_ALL_ETYPES (0x2)
369#define CAPTUREFILTER_FLAGS_TRIGGER (0x4)
370#define CAPTUREFILTER_FLAGS_LOCAL_ONLY (0x8)
371#define CAPTUREFILTER_FLAGS_DISCARD_COMMENTS (0x10)
372#define CAPTUREFILTER_FLAGS_KEEP_RAW (0x20)
373#define CAPTUREFILTER_FLAGS_INCLUDE_ALL (0x3)
374
375#define BUFFER_FULL_25_PERCENT (0)
376#define BUFFER_FULL_50_PERCENT (1)
377#define BUFFER_FULL_75_PERCENT (2)
378#define BUFFER_FULL_100_PERCENT (3)
379
380 typedef struct _CAPTUREFILTER {
381 DWORD FilterFlags;
382 LPBYTE lpSapTable;
383 LPWORD lpEtypeTable;
384 WORD nSaps;
385 WORD nEtypes;
386 LPADDRESSTABLE2 AddressTable;
387 EXPRESSION FilterExpression;
388 TRIGGER Trigger;
389 DWORD nFrameBytesToCopy;
390 DWORD Reserved;
391
392 } CAPTUREFILTER;
393
394 typedef CAPTUREFILTER *LPCAPTUREFILTER;
395
396#define CAPTUREFILTER_SIZE sizeof(CAPTUREFILTER)
397
398 typedef struct _FRAME {
399 __MINGW_EXTENSION __int64 TimeStamp;
400 DWORD FrameLength;
401 DWORD nBytesAvail;
402 BYTE MacFrame[1];
403 } FRAME;
404
405 typedef FRAME *LPFRAME;
406
407 typedef FRAME UNALIGNED *ULPFRAME;
408#define FRAME_SIZE (sizeof(FRAME))
409
410#define LOW_PROTOCOL_IPX (OFFSET_BASIS_RELATIVE_TO_IPX)
411
412#define LOW_PROTOCOL_IP (OFFSET_BASIS_RELATIVE_TO_IP)
413#define LOW_PROTOCOL_IP6 (OFFSET_BASIS_RELATIVE_TO_IP6)
414#define LOW_PROTOCOL_UNKNOWN ((BYTE)-1)
415
416 typedef struct _FRAME_DESCRIPTOR {
417 LPBYTE FramePointer;
418 __MINGW_EXTENSION __int64 TimeStamp;
419 DWORD FrameLength;
420 DWORD nBytesAvail;
421 WORD Etype;
422 BYTE Sap;
423 BYTE LowProtocol;
424 WORD LowProtocolOffset;
425 union {
426 WORD Reserved;
427 BYTE IPPort;
428 WORD ByteSwappedIPXPort;
429 } HighPort;
430 WORD HighProtocolOffset;
431 } FRAME_DESCRIPTOR;
432
433 typedef FRAME_DESCRIPTOR *LPFRAME_DESCRIPTOR;
434
435#define FRAME_DESCRIPTOR_SIZE (sizeof(FRAME_DESCRIPTOR))
436
437 typedef struct _FRAMETABLE {
438 DWORD FrameTableLength;
439 DWORD StartIndex;
440 DWORD EndIndex;
441 DWORD FrameCount;
442 FRAME_DESCRIPTOR Frames[1];
443 } FRAMETABLE;
444
445 typedef FRAMETABLE *LPFRAMETABLE;
446
447#define STATIONSTATS_FLAGS_INITIALIZED (0x1)
448#define STATIONSTATS_FLAGS_EVENTPOSTED (0x2)
449
450#define STATIONSTATS_POOL_SIZE (100)
451
452 typedef struct _STATIONSTATS {
453 DWORD NextStationStats;
454 DWORD SessionPartnerList;
455 DWORD Flags;
456 BYTE StationAddress[6];
457 WORD Pad;
458 DWORD TotalPacketsReceived;
459 DWORD TotalDirectedPacketsSent;
460 DWORD TotalBroadcastPacketsSent;
461 DWORD TotalMulticastPacketsSent;
462 DWORD TotalBytesReceived;
463 DWORD TotalBytesSent;
464 } STATIONSTATS;
465
466 typedef STATIONSTATS *LPSTATIONSTATS;
467
468#define STATIONSTATS_SIZE (sizeof(STATIONSTATS))
469
470#define SESSION_FLAGS_INITIALIZED (0x1)
471#define SESSION_FLAGS_EVENTPOSTED (0x2)
472
473#define SESSION_POOL_SIZE (100)
474
475 typedef struct _SESSIONSTATS {
476 DWORD NextSession;
477 DWORD StationOwner;
478 DWORD StationPartner;
479 DWORD Flags;
480 DWORD TotalPacketsSent;
481 } SESSIONSTATS;
482
483 typedef SESSIONSTATS *LPSESSIONSTATS;
484
485#define SESSIONSTATS_SIZE (sizeof(SESSIONSTATS))
486
487#pragma pack(push,1)
488 typedef struct _STATIONQUERY {
489 DWORD Flags;
490 BYTE BCDVerMinor;
491 BYTE BCDVerMajor;
492 DWORD LicenseNumber;
493 BYTE MachineName[16];
494 BYTE UserName[32];
495 BYTE Reserved[32];
496 BYTE AdapterAddress[6];
497 WCHAR WMachineName[16];
498 WCHAR WUserName[32];
499 } STATIONQUERY;
500
501 typedef STATIONQUERY *LPSTATIONQUERY;
502
503#define STATIONQUERY_SIZE (sizeof(STATIONQUERY))
504
505#pragma pack(pop)
506
507 typedef struct _QUERYTABLE {
508 DWORD nStationQueries;
509 STATIONQUERY StationQuery[1];
510 } QUERYTABLE;
511
512 typedef QUERYTABLE *LPQUERYTABLE;
513
514#define QUERYTABLE_SIZE (sizeof(QUERYTABLE))
515
516 typedef struct _LINK *LPLINK;
517
518 typedef struct _LINK {
519 LPLINK PrevLink;
520 LPLINK NextLink;
521 } LINK;
522
523#pragma pack(push,1)
524#define MAX_SECURITY_BREACH_REASON_SIZE (100)
525
526#define MAX_SIGNATURE_LENGTH (128)
527#define MAX_USER_NAME_LENGTH (256)
528
529 typedef struct _SECURITY_PERMISSION_RESPONSE {
530 UINT Version;
531 DWORD RandomNumber;
532 BYTE MachineName[16];
533 BYTE Address[6];
534 BYTE UserName[256];
535 BYTE Reason[100];
536 DWORD SignatureLength;
537 BYTE Signature[128];
538 } SECURITY_PERMISSION_RESPONSE;
539
540 typedef SECURITY_PERMISSION_RESPONSE *LPSECURITY_PERMISSION_RESPONSE;
541 typedef SECURITY_PERMISSION_RESPONSE UNALIGNED *ULPSECURITY_PERMISSION_RESPONSE;
542
543#define SECURITY_PERMISSION_RESPONSE_SIZE (sizeof(SECURITY_PERMISSION_RESPONSE))
544
545#pragma pack(pop)
546
547#define UPDATE_EVENT_TERMINATE_THREAD (0)
548#define UPDATE_EVENT_NETWORK_STATUS (0x1)
549#define UPDATE_EVENT_RTC_INTERVAL_ELAPSED (0x2)
550#define UPDATE_EVENT_RTC_FRAME_TABLE_FULL (0x3)
551#define UPDATE_EVENT_RTC_BUFFER_FULL (0x4)
552#define UPDATE_EVENT_TRIGGER_BUFFER_CONTENT (0x5)
553#define UPDATE_EVENT_TRIGGER_PATTERN_MATCH (0x6)
554#define UPDATE_EVENT_TRIGGER_BUFFER_PATTERN (0x7)
555#define UPDATE_EVENT_TRIGGER_PATTERN_BUFFER (0x8)
556#define UPDATE_EVENT_TRANSMIT_STATUS (0x9)
557#define UPDATE_EVENT_SECURITY_BREACH (0xa)
558#define UPDATE_EVENT_REMOTE_FAILURE (0xb)
559
560#define UPDATE_ACTION_TERMINATE_THREAD (0)
561#define UPDATE_ACTION_NOTIFY (0x1)
562#define UPDATE_ACTION_STOP_CAPTURE (0x2)
563#define UPDATE_ACTION_PAUSE_CAPTURE (0x3)
564#define UPDATE_ACTION_RTC_BUFFER_SWITCH (0x4)
565
566 __C89_NAMELESS typedef struct _UPDATE_EVENT {
567 USHORT Event;
568 DWORD Action;
569 DWORD Status;
570 DWORD Value;
571 __MINGW_EXTENSION __int64 TimeStamp;
572 DWORD_PTR lpUserContext;
573 DWORD_PTR lpReserved;
574 UINT FramesDropped;
575 __C89_NAMELESS union {
576 DWORD Reserved;
577 LPFRAMETABLE lpFrameTable;
578 DWORD_PTR lpPacketQueue;
579 SECURITY_PERMISSION_RESPONSE SecurityResponse;
580 };
581 LPSTATISTICS lpFinalStats;
582 } UPDATE_EVENT;
583
584 typedef UPDATE_EVENT *PUPDATE_EVENT;
585 typedef DWORD (WINAPI *LPNETWORKCALLBACKPROC)(UPDATE_EVENT);
586
587 typedef struct _NETWORKSTATUS {
588 DWORD State;
589 DWORD Flags;
590 } NETWORKSTATUS;
591
592 typedef NETWORKSTATUS *LPNETWORKSTATUS;
593
594#define NETWORKSTATUS_SIZE (sizeof(NETWORKSTATUS))
595
596#define NETWORKSTATUS_STATE_VOID (0)
597#define NETWORKSTATUS_STATE_INIT (1)
598#define NETWORKSTATUS_STATE_CAPTURING (2)
599#define NETWORKSTATUS_STATE_PAUSED (3)
600
601#define NETWORKSTATUS_FLAGS_TRIGGER_PENDING (0x1)
602
603#define MAKE_WORD(l,h) (((WORD) (l)) | (((WORD) (h)) << 8))
604#define MAKE_LONG(l,h) (((DWORD) (l)) | (((DWORD) (h)) << 16))
605#define MAKE_SIG(a,b,c,d) MAKE_LONG(MAKE_WORD(a,b),MAKE_WORD(c,d))
606
607#define MAX_SESSIONS (100)
608#define MAX_STATIONS (100)
609
610 typedef struct _STATISTICSPARAM {
611 DWORD StatisticsSize;
612 STATISTICS Statistics;
613 DWORD StatisticsTableEntries;
614 STATIONSTATS StatisticsTable[100];
615 DWORD SessionTableEntries;
616 SESSIONSTATS SessionTable[100];
617 } STATISTICSPARAM;
618
619 typedef STATISTICSPARAM *LPSTATISTICSPARAM;
620
621#define STATISTICSPARAM_SIZE (sizeof(STATISTICSPARAM))
622
623#pragma pack(push,1)
624#define CAPTUREFILE_VERSION_MAJOR (2)
625
626#define CAPTUREFILE_VERSION_MINOR (0)
627
628#define MakeVersion(Major,Minor) ((DWORD) MAKEWORD(Minor,Major))
629#define GetCurrentVersion() MakeVersion(CAPTUREFILE_VERSION_MAJOR,CAPTUREFILE_VERSION_MINOR)
630#define NETMON_1_0_CAPTUREFILE_SIGNATURE MAKE_IDENTIFIER('R','T','S','S')
631#define NETMON_2_0_CAPTUREFILE_SIGNATURE MAKE_IDENTIFIER('G','M','B','U')
632
633 typedef struct _CAPTUREFILE_HEADER_VALUES {
634 DWORD Signature;
635 BYTE BCDVerMinor;
636 BYTE BCDVerMajor;
637 WORD MacType;
638 SYSTEMTIME TimeStamp;
639 DWORD FrameTableOffset;
640 DWORD FrameTableLength;
641 DWORD UserDataOffset;
642 DWORD UserDataLength;
643 DWORD CommentDataOffset;
644 DWORD CommentDataLength;
645 DWORD StatisticsOffset;
646 DWORD StatisticsLength;
647 DWORD NetworkInfoOffset;
648 DWORD NetworkInfoLength;
649 DWORD ConversationStatsOffset;
650 DWORD ConversationStatsLength;
651 } CAPTUREFILE_HEADER_VALUES;
652
653 typedef CAPTUREFILE_HEADER_VALUES *LPCAPTUREFILE_HEADER_VALUES;
654
655#define CAPTUREFILE_HEADER_VALUES_SIZE (sizeof(CAPTUREFILE_HEADER_VALUES))
656
657#pragma pack(pop)
658
659#pragma pack(push,1)
660 typedef struct _CAPTUREFILE_HEADER {
661 __C89_NAMELESS union {
662 CAPTUREFILE_HEADER_VALUES ActualHeader;
663 BYTE Buffer[72];
664 };
665 BYTE Reserved[56];
666 } CAPTUREFILE_HEADER;
667
668 typedef CAPTUREFILE_HEADER *LPCAPTUREFILE_HEADER;
669
670#define CAPTUREFILE_HEADER_SIZE (sizeof(CAPTUREFILE_HEADER))
671
672#pragma pack(pop)
673
674#pragma pack(push,1)
675 typedef struct _EFRAMEHDR {
676 BYTE SrcAddress[6];
677 BYTE DstAddress[6];
678 WORD Length;
679 BYTE DSAP;
680 BYTE SSAP;
681 BYTE Control;
682 BYTE ProtocolID[3];
683 WORD EtherType;
684 } EFRAMEHDR;
685
686 typedef struct _TRFRAMEHDR {
687 BYTE AC;
688 BYTE FC;
689 BYTE SrcAddress[6];
690 BYTE DstAddress[6];
691 BYTE DSAP;
692 BYTE SSAP;
693 BYTE Control;
694 BYTE ProtocolID[3];
695 WORD EtherType;
696 } TRFRAMEHDR;
697
698#define DEFAULT_TR_AC (0)
699
700#define DEFAULT_TR_FC (0x40)
701#define DEFAULT_SAP (0xaa)
702
703#define DEFAULT_CONTROL (0x3)
704
705#define DEFAULT_ETHERTYPE (0x8419)
706
707 typedef struct _FDDIFRAMEHDR {
708 BYTE FC;
709 BYTE SrcAddress[6];
710 BYTE DstAddress[6];
711 BYTE DSAP;
712 BYTE SSAP;
713 BYTE Control;
714 BYTE ProtocolID[3];
715 WORD EtherType;
716 } FDDIFRAMEHDR;
717
718#define DEFAULT_FDDI_FC (0x10)
719
720 typedef struct _FDDISTATFRAME {
721 __MINGW_EXTENSION __int64 TimeStamp;
722 DWORD FrameLength;
723 DWORD nBytesAvail;
724 FDDIFRAMEHDR FrameHeader;
725 BYTE FrameID[4];
726 DWORD Flags;
727 DWORD FrameType;
728 WORD StatsDataLen;
729 DWORD StatsVersion;
730 STATISTICS Statistics;
731 } FDDISTATFRAME;
732
733 typedef FDDISTATFRAME *LPFDDISTATFRAME;
734
735 typedef FDDISTATFRAME UNALIGNED *ULPFDDISTATFRAME;
736#define FDDISTATFRAME_SIZE (sizeof(FDDISTATFRAME))
737
738 typedef struct _ATMFRAMEHDR {
739 BYTE SrcAddress[6];
740 BYTE DstAddress[6];
741 WORD Vpi;
742 WORD Vci;
743 } ATMFRAMEHDR;
744
745 typedef struct _ATMSTATFRAME {
746 __MINGW_EXTENSION __int64 TimeStamp;
747 DWORD FrameLength;
748 DWORD nBytesAvail;
749 ATMFRAMEHDR FrameHeader;
750 BYTE FrameID[4];
751 DWORD Flags;
752 DWORD FrameType;
753 WORD StatsDataLen;
754 DWORD StatsVersion;
755 STATISTICS Statistics;
756 } ATMSTATFRAME;
757
758 typedef ATMSTATFRAME *LPATMSTATFRAME;
759 typedef ATMSTATFRAME UNALIGNED *ULPATMSTATFRAME;
760
761#define ATMSTATFRAME_SIZE (sizeof(ATMSTATFRAME))
762
763 typedef struct _TRSTATFRAME {
764 __MINGW_EXTENSION __int64 TimeStamp;
765 DWORD FrameLength;
766 DWORD nBytesAvail;
767 TRFRAMEHDR FrameHeader;
768 BYTE FrameID[4];
769 DWORD Flags;
770 DWORD FrameType;
771 WORD StatsDataLen;
772 DWORD StatsVersion;
773 STATISTICS Statistics;
774 } TRSTATFRAME;
775
776 typedef TRSTATFRAME *LPTRSTATFRAME;
777 typedef TRSTATFRAME UNALIGNED *ULPTRSTATFRAME;
778
779#define TRSTATFRAME_SIZE (sizeof(TRSTATFRAME))
780
781 typedef struct _ESTATFRAME {
782 __MINGW_EXTENSION __int64 TimeStamp;
783 DWORD FrameLength;
784 DWORD nBytesAvail;
785 EFRAMEHDR FrameHeader;
786 BYTE FrameID[4];
787 DWORD Flags;
788 DWORD FrameType;
789 WORD StatsDataLen;
790 DWORD StatsVersion;
791 STATISTICS Statistics;
792 } ESTATFRAME;
793
794 typedef ESTATFRAME *LPESTATFRAME;
795 typedef ESTATFRAME UNALIGNED *ULPESTATFRAME;
796
797#define ESTATFRAME_SIZE (sizeof(ESTATFRAME))
798
799#define STATISTICS_VERSION_1_0 (0)
800#define STATISTICS_VERSION_2_0 (0x20)
801#define MAX_STATSFRAME_SIZE (sizeof(TRSTATFRAME))
802#define STATS_FRAME_TYPE (103)
803
804#pragma pack(pop)
805#pragma pack(push,1)
806
807 typedef struct _ADDRESS {
808 DWORD Type;
809 __C89_NAMELESS union {
810 BYTE MACAddress[MAC_ADDRESS_SIZE];
811 BYTE IPAddress[IP_ADDRESS_SIZE];
812 BYTE IPXRawAddress[IPX_ADDR_SIZE];
813 IPX_ADDR IPXAddress;
814 BYTE VinesIPRawAddress[VINES_IP_ADDRESS_SIZE];
815 VINES_IP_ADDRESS VinesIPAddress;
816 ETHERNET_SRC_ADDRESS EthernetSrcAddress;
817 ETHERNET_DST_ADDRESS EthernetDstAddress;
818 TOKENRING_SRC_ADDRESS TokenringSrcAddress;
819 TOKENRING_DST_ADDRESS TokenringDstAddress;
820 FDDI_SRC_ADDRESS FddiSrcAddress;
821 FDDI_DST_ADDRESS FddiDstAddress;
822 };
823 WORD Flags;
824 } ADDRESS;
825
826 typedef ADDRESS *LPADDRESS;
827#define ADDRESS_SIZE sizeof(ADDRESS)
828
829#pragma pack(pop)
830
831 typedef struct _ADDRESSPAIR {
832 WORD AddressFlags;
833 WORD NalReserved;
834 ADDRESS DstAddress;
835 ADDRESS SrcAddress;
836
837 } ADDRESSPAIR;
838
839 typedef ADDRESSPAIR *LPADDRESSPAIR;
840
841#define ADDRESSPAIR_SIZE sizeof(ADDRESSPAIR)
842
843 typedef struct _ADDRESSTABLE {
844 DWORD nAddressPairs;
845 DWORD nNonMacAddressPairs;
846 ADDRESSPAIR AddressPair[MAX_ADDRESS_PAIRS];
847
848 } ADDRESSTABLE;
849
850 typedef ADDRESSTABLE *LPADDRESSTABLE;
851
852#define ADDRESSTABLE_SIZE sizeof(ADDRESSTABLE)
853
854 typedef struct _ADDRESSINFO {
855 ADDRESS Address;
856 WCHAR Name[MAX_NAME_SIZE];
857 DWORD Flags;
858 LPVOID lpAddressInstData;
859 } ADDRESSINFO;
860
861 typedef struct _ADDRESSINFO *LPADDRESSINFO;
862
863#define ADDRESSINFO_SIZE sizeof(ADDRESSINFO)
864
865 typedef struct _ADDRESSINFOTABLE {
866 DWORD nAddressInfos;
867 LPADDRESSINFO lpAddressInfo[0];
868 } ADDRESSINFOTABLE;
869
870 typedef ADDRESSINFOTABLE *LPADDRESSINFOTABLE;
871
872#define ADDRESSINFOTABLE_SIZE sizeof(ADDRESSINFOTABLE)
873
874 DWORD __cdecl SetNPPAddressFilterInBlob(HBLOB hBlob,LPADDRESSTABLE pAddressTable);
875 DWORD __cdecl GetNPPAddressFilterFromBlob(HBLOB hBlob,LPADDRESSTABLE pAddressTable,HBLOB hErrorBlob);
876
877#pragma pack(push,8)
878
879 typedef enum __MIDL___MIDL_itf_netmon_0000_0005 {
880 NMCOLUMNTYPE_UINT8 = 0,
881 NMCOLUMNTYPE_SINT8,NMCOLUMNTYPE_UINT16,NMCOLUMNTYPE_SINT16,NMCOLUMNTYPE_UINT32,NMCOLUMNTYPE_SINT32,
882 NMCOLUMNTYPE_FLOAT64,NMCOLUMNTYPE_FRAME,NMCOLUMNTYPE_YESNO,NMCOLUMNTYPE_ONOFF,NMCOLUMNTYPE_TRUEFALSE,
883 NMCOLUMNTYPE_MACADDR,NMCOLUMNTYPE_IPXADDR,NMCOLUMNTYPE_IPADDR,NMCOLUMNTYPE_VARTIME,NMCOLUMNTYPE_STRING
884 } NMCOLUMNTYPE;
885
886 typedef struct _NMCOLUMNVARIANT {
887 NMCOLUMNTYPE Type;
888 union {
889 BYTE Uint8Val;
890 char Sint8Val;
891 WORD Uint16Val;
892 short Sint16Val;
893 DWORD Uint32Val;
894 __LONG32 Sint32Val;
895 DOUBLE Float64Val;
896 DWORD FrameVal;
897 WINBOOL YesNoVal;
898 WINBOOL OnOffVal;
899 WINBOOL TrueFalseVal;
900 BYTE MACAddrVal[6];
901 IPX_ADDR IPXAddrVal;
902 DWORD IPAddrVal;
903 DOUBLE VarTimeVal;
904 LPCSTR pStringVal;
905 } Value;
906 } NMCOLUMNVARIANT;
907
908 typedef struct _NMCOLUMNINFO {
909 LPSTR szColumnName;
910 NMCOLUMNVARIANT VariantData;
911 } NMCOLUMNINFO;
912
913 typedef NMCOLUMNINFO *PNMCOLUMNINFO;
914 typedef LPSTR JTYPE;
915
916 typedef struct _NMEVENTDATA {
917 LPSTR pszReserved;
918 BYTE Version;
919 DWORD EventIdent;
920 DWORD Flags;
921 DWORD Severity;
922 BYTE NumColumns;
923 LPSTR szSourceName;
924 LPSTR szEventName;
925 LPSTR szDescription;
926 LPSTR szMachine;
927 JTYPE Justification;
928 PVOID pvReserved;
929 SYSTEMTIME SysTime;
930 NMCOLUMNINFO Column[0];
931 } NMEVENTDATA;
932
933 typedef NMEVENTDATA *PNMEVENTDATA;
934
935#pragma pack(pop)
936
937#define NMEVENTFLAG_EXPERT (0x1)
938#define NMEVENTFLAG_DO_NOT_DISPLAY_SEVERITY (0x80000000)
939#define NMEVENTFLAG_DO_NOT_DISPLAY_SOURCE (0x40000000)
940#define NMEVENTFLAG_DO_NOT_DISPLAY_EVENT_NAME (0x20000000)
941#define NMEVENTFLAG_DO_NOT_DISPLAY_DESCRIPTION (0x10000000)
942#define NMEVENTFLAG_DO_NOT_DISPLAY_MACHINE (0x8000000)
943#define NMEVENTFLAG_DO_NOT_DISPLAY_TIME (0x4000000)
944#define NMEVENTFLAG_DO_NOT_DISPLAY_DATE (0x2000000)
945#define NMEVENTFLAG_DO_NOT_DISPLAY_FIXED_COLUMNS (0xfe000000)
946
947 enum _NMEVENT_SEVERITIES {
948 NMEVENT_SEVERITY_INFORMATIONAL = 0,NMEVENT_SEVERITY_WARNING,
949 NMEVENT_SEVERITY_STRONG_WARNING,NMEVENT_SEVERITY_ERROR,
950 NMEVENT_SEVERITY_SEVERE_ERROR,NMEVENT_SEVERITY_CRITICAL_ERROR
951 };
952
953 typedef struct __MIDL___MIDL_itf_netmon_0000_0007 {
954 DWORD dwNumBlobs;
955 HBLOB hBlobs[1];
956 } BLOB_TABLE;
957
958 typedef BLOB_TABLE *PBLOB_TABLE;
959
960 typedef struct __MIDL___MIDL_itf_netmon_0000_0008 {
961 DWORD size;
962 BYTE *pBytes;
963 } MBLOB;
964
965 typedef struct __MIDL___MIDL_itf_netmon_0000_0009 {
966 DWORD dwNumBlobs;
967 MBLOB mBlobs[1];
968 } MBLOB_TABLE;
969
970 typedef MBLOB_TABLE *PMBLOB_TABLE;
971
972 DWORD __cdecl GetNPPBlobTable(HBLOB hFilterBlob,PBLOB_TABLE *ppBlobTable);
973 DWORD __cdecl GetNPPBlobFromUI(HWND hwnd,HBLOB hFilterBlob,HBLOB *phBlob);
974 DWORD __cdecl GetNPPBlobFromUIExU(HWND hwnd,HBLOB hFilterBlob,HBLOB *phBlob,char *szHelpFileName);
975 DWORD __cdecl SelectNPPBlobFromTable(HWND hwnd,PBLOB_TABLE pBlobTable,HBLOB *hBlob);
976 DWORD __cdecl SelectNPPBlobFromTableExU(HWND hwnd,PBLOB_TABLE pBlobTable,HBLOB *hBlob,char *szHelpFileName);
977
978 static __inline DWORD BLOB_TABLE_SIZE(DWORD dwNumBlobs) { return (DWORD) (sizeof(BLOB_TABLE)+dwNumBlobs*sizeof(HBLOB)); }
979 static __inline PBLOB_TABLE AllocBlobTable(DWORD dwNumBlobs) {
980 DWORD size = BLOB_TABLE_SIZE(dwNumBlobs);
981 return (PBLOB_TABLE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,size);
982 }
983 static __inline DWORD MBLOB_TABLE_SIZE(DWORD dwNumBlobs) { return (DWORD) (sizeof(MBLOB_TABLE)+dwNumBlobs*sizeof(MBLOB)); }
984 static __inline PMBLOB_TABLE AllocMBlobTable(DWORD dwNumBlobs) {
985 DWORD size = MBLOB_TABLE_SIZE(dwNumBlobs);
986 return (PMBLOB_TABLE)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,size);
987 }
988 DWORD __cdecl GetNPPBlobs(PBLOB_TABLE *ppBlobTable);
989
990 typedef DWORD (_cdecl *BLOBSPROC) (PBLOB_TABLE *ppBlobTable);
991
992 DWORD __cdecl GetConfigBlob(HBLOB *phBlob);
993
994 typedef DWORD (_cdecl *GETCFGBLOB)(HBLOB,HBLOB*);
995 typedef DWORD (_cdecl *CFGPROC)(HWND hwnd,HBLOB SpecialBlob,PBLOB_TABLE *ppBlobTable);
996
997 WINBOOL __cdecl FilterNPPBlob(HBLOB hBlob,HBLOB FilterBlob);
998 WINBOOL __cdecl RaiseNMEvent(HINSTANCE hInstance,WORD EventType,DWORD EventID,WORD nStrings,const char **aInsertStrs,LPVOID lpvData,DWORD dwDataSize);
999
1000#ifndef __cplusplus
1001#ifndef try
1002#define try __try
1003#endif
1004
1005#ifndef except
1006#define except __except
1007#endif
1008#endif
1009
1010#define WINDOWS_VERSION_UNKNOWN (0)
1011#define WINDOWS_VERSION_WIN32S (1)
1012#define WINDOWS_VERSION_WIN32C (2)
1013#define WINDOWS_VERSION_WIN32 (3)
1014
1015#define FRAME_MASK_ETHERNET ((BYTE)~0x1)
1016#define FRAME_MASK_TOKENRING ((BYTE)~0x80)
1017#define FRAME_MASK_FDDI ((BYTE)~0x1)
1018
1019 typedef LPVOID HOBJECTHEAP;
1020 typedef VOID (WINAPI *OBJECTPROC)(HOBJECTHEAP,LPVOID);
1021 typedef struct _TIMER *HTIMER;
1022 typedef VOID (WINAPI *BHTIMERPROC)(LPVOID);
1023
1024 HTIMER WINAPI BhSetTimer(BHTIMERPROC TimerProc,LPVOID InstData,DWORD TimeOut);
1025 VOID WINAPI BhKillTimer(HTIMER hTimer);
1026 DWORD WINAPI BhGetLastError(VOID);
1027 DWORD WINAPI BhSetLastError(DWORD Error);
1028 HOBJECTHEAP WINAPI CreateObjectHeap(DWORD ObjectSize,OBJECTPROC ObjectProc);
1029 HOBJECTHEAP WINAPI DestroyObjectHeap(HOBJECTHEAP hObjectHeap);
1030 LPVOID WINAPI AllocObject(HOBJECTHEAP hObjectHeap);
1031 LPVOID WINAPI FreeObject(HOBJECTHEAP hObjectHeap,LPVOID ObjectMemory);
1032 DWORD WINAPI GrowObjectHeap(HOBJECTHEAP hObjectHeap,DWORD nObjects);
1033 DWORD WINAPI GetObjectHeapSize(HOBJECTHEAP hObjectHeap);
1034 VOID WINAPI PurgeObjectHeap(HOBJECTHEAP hObjectHeap);
1035 LPVOID WINAPI AllocMemory(SIZE_T size);
1036 LPVOID WINAPI ReallocMemory(LPVOID ptr,SIZE_T NewSize);
1037 VOID WINAPI FreeMemory(LPVOID ptr);
1038 VOID WINAPI TestMemory(LPVOID ptr);
1039 SIZE_T WINAPI MemorySize(LPVOID ptr);
1040 HANDLE WINAPI MemoryHandle(LPBYTE ptr);
1041 LPEXPRESSION WINAPI InitializeExpression(LPEXPRESSION Expression);
1042 LPPATTERNMATCH WINAPI InitializePattern(LPPATTERNMATCH Pattern,LPVOID ptr,DWORD offset,DWORD length);
1043 LPEXPRESSION WINAPI AndExpression(LPEXPRESSION Expression,LPPATTERNMATCH Pattern);
1044 LPEXPRESSION WINAPI OrExpression(LPEXPRESSION Expression,LPPATTERNMATCH Pattern);
1045 LPPATTERNMATCH WINAPI NegatePattern(LPPATTERNMATCH Pattern);
1046 LPADDRESSTABLE2 WINAPI AdjustOperatorPrecedence(LPADDRESSTABLE2 AddressTable);
1047 LPADDRESS2 WINAPI NormalizeAddress(LPADDRESS2 Address);
1048 LPADDRESSTABLE2 WINAPI NormalizeAddressTable(LPADDRESSTABLE2 AddressTable);
1049 DWORD WINAPI BhGetWindowsVersion(VOID);
1050 WINBOOL WINAPI IsDaytona(VOID);
1051 VOID __cdecl dprintf(LPSTR format,...);
1052
1053 typedef VOID UNALIGNED *ULPVOID;
1054 typedef BYTE UNALIGNED *ULPBYTE;
1055 typedef WORD UNALIGNED *ULPWORD;
1056 typedef DWORD UNALIGNED *ULPDWORD;
1057 typedef CHAR UNALIGNED *ULPSTR;
1058 typedef SYSTEMTIME UNALIGNED *ULPSYSTEMTIME;
1059 typedef struct _PARSER *HPARSER;
1060 typedef struct _CAPFRAMEDESC *HFRAME;
1061 typedef struct _CAPTURE *HCAPTURE;
1062 typedef struct _FILTER *HFILTER;
1063 typedef struct _ADDRESSDB *HADDRESSDB;
1064 typedef struct _PROTOCOL *HPROTOCOL;
1065 typedef DWORD_PTR HPROPERTY;
1066 typedef HPROTOCOL *LPHPROTOCOL;
1067
1068#define GetTableSize(TableBaseSize,nElements,ElementSize) ((TableBaseSize) + ((nElements) *(ElementSize)))
1069
1070 typedef DWORD OBJECTTYPE;
1071
1072#ifndef MAKE_IDENTIFIER
1073#define MAKE_IDENTIFIER(a,b,c,d) ((DWORD) MAKELONG(MAKEWORD(a,b),MAKEWORD(c,d)))
1074#endif
1075#define HANDLE_TYPE_INVALID MAKE_IDENTIFIER(-1,-1,-1,-1)
1076#define HANDLE_TYPE_CAPTURE MAKE_IDENTIFIER('C','A','P','$')
1077#define HANDLE_TYPE_PARSER MAKE_IDENTIFIER('P','S','R','$')
1078#define HANDLE_TYPE_ADDRESSDB MAKE_IDENTIFIER('A','D','R','$')
1079#define HANDLE_TYPE_PROTOCOL MAKE_IDENTIFIER('P','R','T','$')
1080#define HANDLE_TYPE_BUFFER MAKE_IDENTIFIER('B','U','F','$')
1081
1082#define INLINE __inline
1083#define BHAPI WINAPI
1084#define MAX_NAME_LENGTH (16)
1085
1086#define MAX_ADDR_LENGTH (6)
1087
1088#define ETYPE_LOOP (0x9000)
1089#define ETYPE_3COM_NETMAP1 (0x9001)
1090#define ETYPE_3COM_NETMAP2 (0x9002)
1091#define ETYPE_IBM_RT (0x80d5)
1092#define ETYPE_NETWARE (0x8137)
1093#define ETYPE_XNS1 (0x600)
1094#define ETYPE_XNS2 (0x807)
1095#define ETYPE_3COM_NBP0 (0x3c00)
1096#define ETYPE_3COM_NBP1 (0x3c01)
1097#define ETYPE_3COM_NBP2 (0x3c02)
1098#define ETYPE_3COM_NBP3 (0x3c03)
1099#define ETYPE_3COM_NBP4 (0x3c04)
1100#define ETYPE_3COM_NBP5 (0x3c05)
1101#define ETYPE_3COM_NBP6 (0x3c06)
1102#define ETYPE_3COM_NBP7 (0x3c07)
1103#define ETYPE_3COM_NBP8 (0x3c08)
1104#define ETYPE_3COM_NBP9 (0x3c09)
1105#define ETYPE_3COM_NBP10 (0x3c0a)
1106#define ETYPE_IP (0x800)
1107#define ETYPE_ARP1 (0x806)
1108#define ETYPE_ARP2 (0x807)
1109#define ETYPE_RARP (0x8035)
1110#define ETYPE_TRLR0 (0x1000)
1111#define ETYPE_TRLR1 (0x1001)
1112#define ETYPE_TRLR2 (0x1002)
1113#define ETYPE_TRLR3 (0x1003)
1114#define ETYPE_TRLR4 (0x1004)
1115#define ETYPE_TRLR5 (0x1005)
1116#define ETYPE_PUP (0x200)
1117#define ETYPE_PUP_ARP (0x201)
1118#define ETYPE_APPLETALK_ARP (0x80f3)
1119#define ETYPE_APPLETALK_LAP (0x809b)
1120#define ETYPE_SNMP (0x814c)
1121
1122#define SAP_SNAP (0xaa)
1123#define SAP_BPDU (0x42)
1124#define SAP_IBM_NM (0xf4)
1125#define SAP_IBM_NETBIOS (0xf0)
1126#define SAP_SNA1 (0x4)
1127#define SAP_SNA2 (0x5)
1128#define SAP_SNA3 (0x8)
1129#define SAP_SNA4 (0xc)
1130#define SAP_NETWARE1 (0x10)
1131#define SAP_NETWARE2 (0xe0)
1132#define SAP_NETWARE3 (0xfe)
1133#define SAP_IP (0x6)
1134#define SAP_X25 (0x7e)
1135#define SAP_RPL1 (0xf8)
1136#define SAP_RPL2 (0xfc)
1137#define SAP_UB (0xfa)
1138#define SAP_XNS (0x80)
1139
1140#define PROP_TYPE_VOID (0)
1141#define PROP_TYPE_SUMMARY (0x1)
1142#define PROP_TYPE_BYTE (0x2)
1143#define PROP_TYPE_WORD (0x3)
1144#define PROP_TYPE_DWORD (0x4)
1145#define PROP_TYPE_LARGEINT (0x5)
1146#define PROP_TYPE_ADDR (0x6)
1147#define PROP_TYPE_TIME (0x7)
1148#define PROP_TYPE_STRING (0x8)
1149#define PROP_TYPE_IP_ADDRESS (0x9)
1150#define PROP_TYPE_IPX_ADDRESS (0xa)
1151#define PROP_TYPE_BYTESWAPPED_WORD (0xb)
1152#define PROP_TYPE_BYTESWAPPED_DWORD (0xc)
1153#define PROP_TYPE_TYPED_STRING (0xd)
1154#define PROP_TYPE_RAW_DATA (0xe)
1155#define PROP_TYPE_COMMENT (0xf)
1156#define PROP_TYPE_SRCFRIENDLYNAME (0x10)
1157#define PROP_TYPE_DSTFRIENDLYNAME (0x11)
1158#define PROP_TYPE_TOKENRING_ADDRESS (0x12)
1159#define PROP_TYPE_FDDI_ADDRESS (0x13)
1160#define PROP_TYPE_ETHERNET_ADDRESS (0x14)
1161#define PROP_TYPE_OBJECT_IDENTIFIER (0x15)
1162#define PROP_TYPE_VINES_IP_ADDRESS (0x16)
1163#define PROP_TYPE_VAR_LEN_SMALL_INT (0x17)
1164#define PROP_TYPE_ATM_ADDRESS (0x18)
1165#define PROP_TYPE_1394_ADDRESS (0x19)
1166#define PROP_TYPE_IP6_ADDRESS (0x1a)
1167
1168#define PROP_QUAL_NONE (0)
1169#define PROP_QUAL_RANGE (0x1)
1170#define PROP_QUAL_SET (0x2)
1171#define PROP_QUAL_BITFIELD (0x3)
1172#define PROP_QUAL_LABELED_SET (0x4)
1173#define PROP_QUAL_LABELED_BITFIELD (0x8)
1174#define PROP_QUAL_CONST (0x9)
1175#define PROP_QUAL_FLAGS (0xa)
1176#define PROP_QUAL_ARRAY (0xb)
1177
1178 typedef LARGE_INTEGER *LPLARGEINT;
1179 typedef LARGE_INTEGER UNALIGNED *ULPLARGEINT;
1180
1181 typedef struct _RANGE {
1182 DWORD MinValue;
1183 DWORD MaxValue;
1184 } RANGE;
1185
1186 typedef RANGE *LPRANGE;
1187
1188 typedef struct _LABELED_BYTE {
1189 BYTE Value;
1190 LPSTR Label;
1191 } LABELED_BYTE;
1192
1193 typedef LABELED_BYTE *LPLABELED_BYTE;
1194
1195 typedef struct _LABELED_WORD {
1196 WORD Value;
1197 LPSTR Label;
1198 } LABELED_WORD;
1199
1200 typedef LABELED_WORD *LPLABELED_WORD;
1201
1202 typedef struct _LABELED_DWORD {
1203 DWORD Value;
1204 LPSTR Label;
1205 } LABELED_DWORD;
1206
1207 typedef LABELED_DWORD *LPLABELED_DWORD;
1208
1209 typedef struct _LABELED_LARGEINT {
1210 LARGE_INTEGER Value;
1211 LPSTR Label;
1212 } LABELED_LARGEINT;
1213
1214 typedef LABELED_LARGEINT *LPLABELED_LARGEINT;
1215
1216 typedef struct _LABELED_SYSTEMTIME {
1217 SYSTEMTIME Value;
1218 LPSTR Label;
1219 } LABELED_SYSTEMTIME;
1220
1221 typedef LABELED_SYSTEMTIME *LPLABELED_SYSTEMTIME;
1222
1223 typedef struct _LABELED_BIT {
1224 BYTE BitNumber;
1225 LPSTR LabelOff;
1226 LPSTR LabelOn;
1227 } LABELED_BIT;
1228
1229 typedef LABELED_BIT *LPLABELED_BIT;
1230
1231#define TYPED_STRING_NORMAL (1)
1232#define TYPED_STRING_UNICODE (2)
1233
1234#define TYPED_STRING_EXFLAG (1)
1235
1236 typedef struct _TYPED_STRING {
1237 BYTE StringType:7;
1238 BYTE fStringEx:1;
1239 LPSTR lpString;
1240 BYTE Byte[0];
1241 } TYPED_STRING;
1242
1243 typedef TYPED_STRING *LPTYPED_STRING;
1244
1245 typedef struct _OBJECT_IDENTIFIER {
1246 DWORD Length;
1247 LPDWORD lpIdentifier;
1248 } OBJECT_IDENTIFIER;
1249
1250 typedef OBJECT_IDENTIFIER *LPOBJECT_IDENTIFIER;
1251
1252 typedef struct _SET {
1253 DWORD nEntries;
1254 __C89_NAMELESS union {
1255 LPVOID lpVoidTable;
1256 LPBYTE lpByteTable;
1257 LPWORD lpWordTable;
1258 LPDWORD lpDwordTable;
1259 LPLARGEINT lpLargeIntTable;
1260 LPSYSTEMTIME lpSystemTimeTable;
1261 LPLABELED_BYTE lpLabeledByteTable;
1262 LPLABELED_WORD lpLabeledWordTable;
1263 LPLABELED_DWORD lpLabeledDwordTable;
1264 LPLABELED_LARGEINT lpLabeledLargeIntTable;
1265 LPLABELED_SYSTEMTIME lpLabeledSystemTimeTable;
1266 LPLABELED_BIT lpLabeledBit;
1267 };
1268 } SET;
1269
1270 typedef SET *LPSET;
1271
1272 typedef struct _STRINGTABLE {
1273 DWORD nStrings;
1274 LPSTR String[0];
1275 } STRINGTABLE;
1276
1277 typedef STRINGTABLE *LPSTRINGTABLE;
1278#define STRINGTABLE_SIZE sizeof(STRINGTABLE)
1279
1280 typedef struct _RECOGNIZEDATA {
1281 WORD ProtocolID;
1282 WORD nProtocolOffset;
1283 LPVOID InstData;
1284 } RECOGNIZEDATA;
1285
1286 typedef RECOGNIZEDATA *LPRECOGNIZEDATA;
1287
1288 typedef struct _RECOGNIZEDATATABLE {
1289 WORD nRecognizeDatas;
1290 RECOGNIZEDATA RecognizeData[0];
1291 } RECOGNIZEDATATABLE;
1292
1293 typedef RECOGNIZEDATATABLE *LPRECOGNIZEDATATABLE;
1294
1295 typedef struct _PROPERTYINFO {
1296 HPROPERTY hProperty;
1297 DWORD Version;
1298 LPSTR Label;
1299 LPSTR Comment;
1300 BYTE DataType;
1301 BYTE DataQualifier;
1302 __C89_NAMELESS union {
1303 LPVOID lpExtendedInfo;
1304 LPRANGE lpRange;
1305 LPSET lpSet;
1306 DWORD Bitmask;
1307 DWORD Value;
1308 };
1309 WORD FormatStringSize;
1310 LPVOID InstanceData;
1311 } PROPERTYINFO;
1312
1313 typedef PROPERTYINFO *LPPROPERTYINFO;
1314
1315#define PROPERTYINFO_SIZE (sizeof(PROPERTYINFO))
1316
1317 typedef struct _PROPERTYINSTEX {
1318 WORD Length;
1319 WORD LengthEx;
1320 ULPVOID lpData;
1321 __C89_NAMELESS union {
1322 BYTE Byte[1];
1323 WORD Word[1];
1324 DWORD Dword[1];
1325 LARGE_INTEGER LargeInt[1];
1326 SYSTEMTIME SysTime[1];
1327 TYPED_STRING TypedString;
1328 };
1329 } PROPERTYINSTEX;
1330 typedef PROPERTYINSTEX *LPPROPERTYINSTEX;
1331 typedef PROPERTYINSTEX UNALIGNED *ULPPROPERTYINSTEX;
1332
1333#define PROPERTYINSTEX_SIZE sizeof(PROPERTYINSTEX)
1334
1335 typedef struct _PROPERTYINST {
1336 LPPROPERTYINFO lpPropertyInfo;
1337 LPSTR szPropertyText;
1338 __C89_NAMELESS union {
1339 LPVOID lpData;
1340 ULPBYTE lpByte;
1341 ULPWORD lpWord;
1342 ULPDWORD lpDword;
1343 ULPLARGEINT lpLargeInt;
1344 ULPSYSTEMTIME lpSysTime;
1345 LPPROPERTYINSTEX lpPropertyInstEx;
1346 };
1347 WORD DataLength;
1348 WORD Level : 4;
1349 WORD HelpID : 12;
1350 DWORD IFlags;
1351 } PROPERTYINST;
1352
1353 typedef PROPERTYINST *LPPROPERTYINST;
1354
1355#define PROPERTYINST_SIZE sizeof(PROPERTYINST)
1356
1357#define IFLAG_ERROR (0x1)
1358#define IFLAG_SWAPPED (0x2)
1359#define IFLAG_UNICODE (0x4)
1360
1361 typedef struct _PROPERTYINSTTABLE {
1362 WORD nPropertyInsts;
1363 WORD nPropertyInstIndex;
1364 } PROPERTYINSTTABLE;
1365
1366 typedef PROPERTYINSTTABLE *LPPROPERTYINSTTABLE;
1367
1368#define PROPERTYINSTTABLE_SIZE (sizeof(PROPERTYINSTTABLE))
1369
1370 typedef struct _PROPERTYTABLE {
1371 LPVOID lpFormatBuffer;
1372 DWORD FormatBufferLength;
1373 DWORD nTotalPropertyInsts;
1374 LPPROPERTYINST lpFirstPropertyInst;
1375 BYTE nPropertyInstTables;
1376 PROPERTYINSTTABLE PropertyInstTable[0];
1377 } PROPERTYTABLE;
1378
1379 typedef PROPERTYTABLE *LPPROPERTYTABLE;
1380
1381#define PROPERTYTABLE_SIZE sizeof(PROPERTYTABLE)
1382
1383 typedef VOID (WINAPI *REGISTER)(HPROTOCOL);
1384 typedef VOID (WINAPI *DEREGISTER)(HPROTOCOL);
1385 typedef LPBYTE (WINAPI *RECOGNIZEFRAME)(HFRAME,ULPBYTE,ULPBYTE,DWORD,DWORD,HPROTOCOL,DWORD,LPDWORD,LPHPROTOCOL,PDWORD_PTR);
1386 typedef LPBYTE (WINAPI *ATTACHPROPERTIES)(HFRAME,ULPBYTE,ULPBYTE,DWORD,DWORD,HPROTOCOL,DWORD,DWORD_PTR);
1387 typedef DWORD (WINAPI *FORMATPROPERTIES)(HFRAME,ULPBYTE,ULPBYTE,DWORD,LPPROPERTYINST);
1388
1389 typedef struct _ENTRYPOINTS {
1390 REGISTER Register;
1391 DEREGISTER Deregister;
1392 RECOGNIZEFRAME RecognizeFrame;
1393 ATTACHPROPERTIES AttachProperties;
1394 FORMATPROPERTIES FormatProperties;
1395 } ENTRYPOINTS;
1396
1397 typedef ENTRYPOINTS *LPENTRYPOINTS;
1398
1399#define ENTRYPOINTS_SIZE sizeof(ENTRYPOINTS)
1400
1401 typedef struct _PROPERTYDATABASE {
1402 DWORD nProperties;
1403 LPPROPERTYINFO PropertyInfo[0];
1404 } PROPERTYDATABASE;
1405
1406#define PROPERTYDATABASE_SIZE sizeof(PROPERTYDATABASE)
1407
1408 typedef PROPERTYDATABASE *LPPROPERTYDATABASE;
1409
1410 typedef struct _PROTOCOLINFO {
1411 DWORD ProtocolID;
1412 LPPROPERTYDATABASE PropertyDatabase;
1413 BYTE ProtocolName[16];
1414 BYTE HelpFile[16];
1415 BYTE Comment[128];
1416 } PROTOCOLINFO;
1417
1418 typedef PROTOCOLINFO *LPPROTOCOLINFO;
1419
1420#define PROTOCOLINFO_SIZE sizeof(PROTOCOLINFO)
1421
1422 typedef struct _PROTOCOLTABLE {
1423 DWORD nProtocols;
1424 HPROTOCOL hProtocol[1];
1425 } PROTOCOLTABLE;
1426
1427 typedef PROTOCOLTABLE *LPPROTOCOLTABLE;
1428
1429#define PROTOCOLTABLE_SIZE (sizeof(PROTOCOLTABLE) - sizeof(HPROTOCOL))
1430#define PROTOCOLTABLE_ACTUAL_SIZE(p) GetTableSize(PROTOCOLTABLE_SIZE,(p)->nProtocols,sizeof(HPROTOCOL))
1431
1432#define SORT_BYADDRESS (0)
1433#define SORT_BYNAME (1)
1434#define PERMANENT_NAME (0x100)
1435
1436 typedef struct _ADDRESSINFO2 {
1437 ADDRESS2 Address;
1438 WCHAR Name[MAX_NAME_SIZE];
1439 DWORD Flags;
1440 LPVOID lpAddressInstData;
1441 } ADDRESSINFO2;
1442
1443 typedef struct _ADDRESSINFO2 *LPADDRESSINFO2;
1444
1445#define ADDRESSINFO2_SIZE sizeof(ADDRESSINFO2)
1446
1447 typedef struct _ADDRESSINFOTABLE2 {
1448 DWORD nAddressInfos;
1449 LPADDRESSINFO2 lpAddressInfo[0];
1450 } ADDRESSINFOTABLE2;
1451
1452 typedef ADDRESSINFOTABLE2 *LPADDRESSINFOTABLE2;
1453
1454#define ADDRESSINFOTABLE2_SIZE sizeof(ADDRESSINFOTABLE2)
1455
1456 typedef DWORD (WINAPI *FILTERPROC)(HCAPTURE,HFRAME,LPVOID);
1457
1458#define NMERR_SUCCESS (0)
1459#define NMERR_MEMORY_MAPPED_FILE_ERROR (1)
1460#define NMERR_INVALID_HFILTER (2)
1461#define NMERR_CAPTURING (3)
1462#define NMERR_NOT_CAPTURING (4)
1463#define NMERR_NO_MORE_FRAMES (5)
1464#define NMERR_BUFFER_TOO_SMALL (6)
1465#define NMERR_FRAME_NOT_RECOGNIZED (7)
1466#define NMERR_FILE_ALREADY_EXISTS (8)
1467#define NMERR_DRIVER_NOT_FOUND (9)
1468#define NMERR_ADDRESS_ALREADY_EXISTS (10)
1469#define NMERR_INVALID_HFRAME (11)
1470#define NMERR_INVALID_HPROTOCOL (12)
1471#define NMERR_INVALID_HPROPERTY (13)
1472#define NMERR_LOCKED (14)
1473#define NMERR_STACK_EMPTY (15)
1474#define NMERR_STACK_OVERFLOW (16)
1475#define NMERR_TOO_MANY_PROTOCOLS (17)
1476#define NMERR_FILE_NOT_FOUND (18)
1477#define NMERR_OUT_OF_MEMORY (19)
1478#define NMERR_CAPTURE_PAUSED (20)
1479#define NMERR_NO_BUFFERS (21)
1480#define NMERR_BUFFERS_ALREADY_EXIST (22)
1481#define NMERR_NOT_LOCKED (23)
1482#define NMERR_OUT_OF_RANGE (24)
1483#define NMERR_LOCK_NESTING_TOO_DEEP (25)
1484#define NMERR_LOAD_PARSER_FAILED (26)
1485#define NMERR_UNLOAD_PARSER_FAILED (27)
1486#define NMERR_INVALID_HADDRESSDB (28)
1487#define NMERR_ADDRESS_NOT_FOUND (29)
1488#define NMERR_NETWORK_NOT_PRESENT (30)
1489#define NMERR_NO_PROPERTY_DATABASE (31)
1490#define NMERR_PROPERTY_NOT_FOUND (32)
1491#define NMERR_INVALID_HPROPERTYDB (33)
1492#define NMERR_PROTOCOL_NOT_ENABLED (34)
1493#define NMERR_PROTOCOL_NOT_FOUND (35)
1494#define NMERR_INVALID_PARSER_DLL (36)
1495#define NMERR_NO_ATTACHED_PROPERTIES (37)
1496#define NMERR_NO_FRAMES (38)
1497#define NMERR_INVALID_FILE_FORMAT (39)
1498#define NMERR_COULD_NOT_CREATE_TEMPFILE (40)
1499#define NMERR_OUT_OF_DOS_MEMORY (41)
1500#define NMERR_NO_PROTOCOLS_ENABLED (42)
1501#define NMERR_UNKNOWN_MACTYPE (46)
1502#define NMERR_ROUTING_INFO_NOT_PRESENT (47)
1503#define NMERR_INVALID_HNETWORK (48)
1504#define NMERR_NETWORK_ALREADY_OPENED (49)
1505#define NMERR_NETWORK_NOT_OPENED (50)
1506#define NMERR_FRAME_NOT_FOUND (51)
1507#define NMERR_NO_HANDLES (53)
1508#define NMERR_INVALID_NETWORK_ID (54)
1509#define NMERR_INVALID_HCAPTURE (55)
1510#define NMERR_PROTOCOL_ALREADY_ENABLED (56)
1511#define NMERR_FILTER_INVALID_EXPRESSION (57)
1512#define NMERR_TRANSMIT_ERROR (58)
1513#define NMERR_INVALID_HBUFFER (59)
1514#define NMERR_INVALID_DATA (60)
1515#define NMERR_MSDOS_DRIVER_NOT_LOADED (61)
1516#define NMERR_WINDOWS_DRIVER_NOT_LOADED (62)
1517#define NMERR_MSDOS_DRIVER_INIT_FAILURE (63)
1518#define NMERR_WINDOWS_DRIVER_INIT_FAILURE (64)
1519#define NMERR_NETWORK_BUSY (65)
1520#define NMERR_CAPTURE_NOT_PAUSED (66)
1521#define NMERR_INVALID_PACKET_LENGTH (67)
1522#define NMERR_INTERNAL_EXCEPTION (69)
1523#define NMERR_PROMISCUOUS_MODE_NOT_SUPPORTED (70)
1524#define NMERR_MAC_DRIVER_OPEN_FAILURE (71)
1525#define NMERR_RUNAWAY_PROTOCOL (72)
1526#define NMERR_PENDING (73)
1527#define NMERR_ACCESS_DENIED (74)
1528#define NMERR_INVALID_HPASSWORD (75)
1529#define NMERR_INVALID_PARAMETER (76)
1530#define NMERR_FILE_READ_ERROR (77)
1531#define NMERR_FILE_WRITE_ERROR (78)
1532#define NMERR_PROTOCOL_NOT_REGISTERED (79)
1533#define NMERR_IP_ADDRESS_NOT_FOUND (80)
1534#define NMERR_TRANSMIT_CANCELLED (81)
1535#define NMERR_LOCKED_FRAMES (82)
1536#define NMERR_NO_TRANSMITS_PENDING (83)
1537#define NMERR_PATH_NOT_FOUND (84)
1538#define NMERR_WINDOWS_ERROR (85)
1539#define NMERR_NO_FRAME_NUMBER (86)
1540#define NMERR_FRAME_HAS_NO_CAPTURE (87)
1541#define NMERR_FRAME_ALREADY_HAS_CAPTURE (88)
1542#define NMERR_NAL_IS_NOT_REMOTE (89)
1543#define NMERR_NOT_SUPPORTED (90)
1544#define NMERR_DISCARD_FRAME (91)
1545#define NMERR_CANCEL_SAVE_CAPTURE (92)
1546#define NMERR_LOST_CONNECTION (93)
1547#define NMERR_INVALID_MEDIA_TYPE (94)
1548#define NMERR_AGENT_IN_USE (95)
1549#define NMERR_TIMEOUT (96)
1550#define NMERR_DISCONNECTED (97)
1551#define NMERR_SETTIMER_FAILED (98)
1552#define NMERR_NETWORK_ERROR (99)
1553#define NMERR_INVALID_FRAMESPROC (100)
1554#define NMERR_UNKNOWN_CAPTURETYPE (101)
1555#define NMERR_NOT_CONNECTED (102)
1556#define NMERR_ALREADY_CONNECTED (103)
1557#define NMERR_INVALID_REGISTRY_CONFIGURATION (104)
1558#define NMERR_DELAYED (105)
1559#define NMERR_NOT_DELAYED (106)
1560#define NMERR_REALTIME (107)
1561#define NMERR_NOT_REALTIME (108)
1562#define NMERR_STATS_ONLY (109)
1563#define NMERR_NOT_STATS_ONLY (110)
1564#define NMERR_TRANSMIT (111)
1565#define NMERR_NOT_TRANSMIT (112)
1566#define NMERR_TRANSMITTING (113)
1567#define NMERR_DISK_NOT_LOCAL_FIXED (114)
1568#define NMERR_COULD_NOT_CREATE_DIRECTORY (115)
1569#define NMERR_NO_DEFAULT_CAPTURE_DIRECTORY (116)
1570#define NMERR_UPLEVEL_CAPTURE_FILE (117)
1571#define NMERR_LOAD_EXPERT_FAILED (118)
1572#define NMERR_EXPERT_REPORT_FAILED (119)
1573#define NMERR_REG_OPERATION_FAILED (120)
1574#define NMERR_NO_DLLS_FOUND (121)
1575#define NMERR_NO_CONVERSATION_STATS (122)
1576#define NMERR_SECURITY_BREACH_CAPTURE_DELETED (123)
1577#define NMERR_FRAME_FAILED_FILTER (124)
1578#define NMERR_EXPERT_TERMINATE (125)
1579#define NMERR_REMOTE_NOT_A_SERVER (126)
1580#define NMERR_REMOTE_VERSION_OUTOFSYNC (127)
1581#define NMERR_INVALID_EXPERT_GROUP (128)
1582#define NMERR_INVALID_EXPERT_NAME (129)
1583#define NMERR_INVALID_EXPERT_HANDLE (130)
1584#define NMERR_GROUP_NAME_ALREADY_EXISTS (131)
1585#define NMERR_INVALID_GROUP_NAME (132)
1586#define NMERR_EXPERT_ALREADY_IN_GROUP (133)
1587#define NMERR_EXPERT_NOT_IN_GROUP (134)
1588#define NMERR_NOT_INITIALIZED (135)
1589#define NMERR_INVALID_GROUP_ROOT (136)
1590#define NMERR_BAD_VERSION (137)
1591#define NMERR_ESP (138)
1592#define NMERR_NOT_ESP (139)
1593#define NMERR_BLOB_NOT_INITIALIZED (1000)
1594#define NMERR_INVALID_BLOB (1001)
1595#define NMERR_UPLEVEL_BLOB (1002)
1596#define NMERR_BLOB_ENTRY_ALREADY_EXISTS (1003)
1597#define NMERR_BLOB_ENTRY_DOES_NOT_EXIST (1004)
1598#define NMERR_AMBIGUOUS_SPECIFIER (1005)
1599#define NMERR_BLOB_OWNER_NOT_FOUND (1006)
1600#define NMERR_BLOB_CATEGORY_NOT_FOUND (1007)
1601#define NMERR_UNKNOWN_CATEGORY (1008)
1602#define NMERR_UNKNOWN_TAG (1009)
1603#define NMERR_BLOB_CONVERSION_ERROR (1010)
1604#define NMERR_ILLEGAL_TRIGGER (1011)
1605#define NMERR_BLOB_STRING_INVALID (1012)
1606#define NMERR_UNABLE_TO_LOAD_LIBRARY (1013)
1607#define NMERR_UNABLE_TO_GET_PROCADDR (1014)
1608#define NMERR_CLASS_NOT_REGISTERED (1015)
1609#define NMERR_INVALID_REMOTE_COMPUTERNAME (1016)
1610#define NMERR_RPC_REMOTE_FAILURE (1017)
1611#define NMERR_NO_NPPS (3016)
1612#define NMERR_NO_MATCHING_NPPS (3017)
1613#define NMERR_NO_NPP_SELECTED (3018)
1614#define NMERR_NO_INPUT_BLOBS (3019)
1615#define NMERR_NO_NPP_DLLS (3020)
1616#define NMERR_NO_VALID_NPP_DLLS (3021)
1617
1618#ifndef INLINE
1619#define INLINE __CRT_INLINE
1620#endif
1621 typedef LONG HRESULT;
1622
1623 INLINE HRESULT NMERR_TO_HRESULT(DWORD nmerror) {
1624 HRESULT hResult;
1625 if(nmerror==NMERR_SUCCESS) hResult = NOERROR;
1626 else hResult = MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,(WORD)nmerror);
1627 return hResult;
1628 }
1629
1630 INLINE DWORD HRESULT_TO_NMERR(HRESULT hResult) { return HRESULT_CODE(hResult); }
1631
1632 typedef HFILTER *LPHFILTER;
1633 typedef DWORD FILTERACTIONTYPE;
1634 typedef DWORD VALUETYPE;
1635
1636#define PROTOCOL_NUM_ANY (-1)
1637
1638 typedef PROTOCOLTABLE PROTOCOLTABLETYPE;
1639 typedef PROTOCOLTABLETYPE *LPPROTOCOLTABLETYPE;
1640 typedef DWORD FILTERBITS;
1641 typedef FILTERBITS *LPFILTERBITS;
1642 typedef SYSTEMTIME *LPTIME;
1643 typedef SYSTEMTIME UNALIGNED *ULPTIME;
1644
1645 typedef struct _FILTEROBJECT2 {
1646 FILTERACTIONTYPE Action;
1647 HPROPERTY hProperty;
1648 __C89_NAMELESS union {
1649 VALUETYPE Value;
1650 HPROTOCOL hProtocol;
1651 LPVOID lpArray;
1652 LPPROTOCOLTABLETYPE lpProtocolTable;
1653 LPADDRESS2 lpAddress;
1654 ULPLARGEINT lpLargeInt;
1655 ULPTIME lpTime;
1656 LPOBJECT_IDENTIFIER lpOID;
1657 };
1658 __C89_NAMELESS union {
1659 WORD ByteCount;
1660 WORD ByteOffset;
1661 };
1662 struct _FILTEROBJECT2 *pNext;
1663 } FILTEROBJECT2;
1664
1665 typedef FILTEROBJECT2 *LPFILTEROBJECT2;
1666
1667#define FILTERINFO_SIZE (sizeof(FILTEROBJECT2))
1668
1669 typedef struct _FILTERDESC2 {
1670 WORD NumEntries;
1671 WORD Flags;
1672 LPFILTEROBJECT2 lpStack;
1673 LPFILTEROBJECT2 lpKeepLast;
1674 LPVOID UIInstanceData;
1675 LPFILTERBITS lpFilterBits;
1676 LPFILTERBITS lpCheckBits;
1677 } FILTERDESC2;
1678
1679 typedef FILTERDESC2 *LPFILTERDESC2;
1680
1681#define FILTERDESC2_SIZE sizeof(FILTERDESC2)
1682
1683 typedef struct _FILTEROBJECT {
1684 FILTERACTIONTYPE Action;
1685 HPROPERTY hProperty;
1686 __C89_NAMELESS union {
1687 VALUETYPE Value;
1688 HPROTOCOL hProtocol;
1689 LPVOID lpArray;
1690 LPPROTOCOLTABLETYPE lpProtocolTable;
1691 LPADDRESS lpAddress;
1692 ULPLARGEINT lpLargeInt;
1693 ULPTIME lpTime;
1694 LPOBJECT_IDENTIFIER lpOID;
1695 };
1696 __C89_NAMELESS union {
1697 WORD ByteCount;
1698 WORD ByteOffset;
1699 };
1700 struct _FILTEROBJECT *pNext;
1701 } FILTEROBJECT;
1702 typedef FILTEROBJECT *LPFILTEROBJECT;
1703
1704 typedef struct _FILTERDESC {
1705 WORD NumEntries;
1706 WORD Flags;
1707 LPFILTEROBJECT lpStack;
1708 LPFILTEROBJECT lpKeepLast;
1709 LPVOID UIInstanceData;
1710 LPFILTERBITS lpFilterBits;
1711 LPFILTERBITS lpCheckBits;
1712 } FILTERDESC;
1713
1714 typedef FILTERDESC *LPFILTERDESC;
1715
1716#define FILTERDESC_SIZE sizeof(FILTERDESC)
1717
1718#define FilterGetUIInstanceData(hfilt) (((LPFILTERDESC2)hfilt)->UIInstanceData)
1719#define FilterSetUIInstanceData(hfilt,inst) (((LPFILTERDESC2)hfilt)->UIInstanceData = (LPVOID)inst)
1720
1721#define FILTERFREEPOOLSTART (20)
1722
1723#define INVALIDELEMENT (-1)
1724#define INVALIDVALUE ((VALUETYPE)-9999)
1725#define FILTER_FAIL_WITH_ERROR (-1)
1726#define FILTER_PASSED (TRUE)
1727#define FILTER_FAILED (FALSE)
1728
1729#define FILTERACTION_INVALID (0)
1730#define FILTERACTION_PROPERTY (1)
1731#define FILTERACTION_VALUE (2)
1732#define FILTERACTION_STRING (3)
1733#define FILTERACTION_ARRAY (4)
1734#define FILTERACTION_AND (5)
1735#define FILTERACTION_OR (6)
1736#define FILTERACTION_XOR (7)
1737#define FILTERACTION_PROPERTYEXIST (8)
1738#define FILTERACTION_CONTAINSNC (9)
1739#define FILTERACTION_CONTAINS (10)
1740#define FILTERACTION_NOT (11)
1741#define FILTERACTION_EQUALNC (12)
1742#define FILTERACTION_EQUAL (13)
1743#define FILTERACTION_NOTEQUALNC (14)
1744#define FILTERACTION_NOTEQUAL (15)
1745#define FILTERACTION_GREATERNC (16)
1746#define FILTERACTION_GREATER (17)
1747#define FILTERACTION_LESSNC (18)
1748#define FILTERACTION_LESS (19)
1749#define FILTERACTION_GREATEREQUALNC (20)
1750#define FILTERACTION_GREATEREQUAL (21)
1751#define FILTERACTION_LESSEQUALNC (22)
1752#define FILTERACTION_LESSEQUAL (23)
1753#define FILTERACTION_PLUS (24)
1754#define FILTERACTION_MINUS (25)
1755#define FILTERACTION_ADDRESS (26)
1756#define FILTERACTION_ADDRESSANY (27)
1757#define FILTERACTION_FROM (28)
1758#define FILTERACTION_TO (29)
1759#define FILTERACTION_FROMTO (30)
1760#define FILTERACTION_AREBITSON (31)
1761#define FILTERACTION_AREBITSOFF (32)
1762#define FILTERACTION_PROTOCOLSEXIST (33)
1763#define FILTERACTION_PROTOCOLEXIST (34)
1764#define FILTERACTION_ARRAYEQUAL (35)
1765#define FILTERACTION_DEREFPROPERTY (36)
1766#define FILTERACTION_LARGEINT (37)
1767#define FILTERACTION_TIME (38)
1768#define FILTERACTION_ADDR_ETHER (39)
1769#define FILTERACTION_ADDR_TOKEN (40)
1770#define FILTERACTION_ADDR_FDDI (41)
1771#define FILTERACTION_ADDR_IPX (42)
1772#define FILTERACTION_ADDR_IP (43)
1773#define FILTERACTION_OID (44)
1774#define FILTERACTION_OID_CONTAINS (45)
1775#define FILTERACTION_OID_BEGINS_WITH (46)
1776#define FILTERACTION_OID_ENDS_WITH (47)
1777#define FILTERACTION_ADDR_VINES (48)
1778#define FILTERACTION_ADDR_IP6 (49)
1779#define FILTERACTION_EXPRESSION (97)
1780#define FILTERACTION_BOOL (98)
1781#define FILTERACTION_NOEVAL (99)
1782#define FILTER_NO_MORE_FRAMES (0xffffffff)
1783#define FILTER_CANCELED (0xfffffffe)
1784#define FILTER_DIRECTION_NEXT (TRUE)
1785#define FILTER_DIRECTION_PREV (FALSE)
1786
1787 typedef WINBOOL (WINAPI *STATUSPROC)(DWORD,HCAPTURE,HFILTER,LPVOID);
1788
1789 HFILTER WINAPI CreateFilter(VOID);
1790 DWORD WINAPI DestroyFilter(HFILTER hFilter);
1791 HFILTER WINAPI FilterDuplicate(HFILTER hFilter);
1792 DWORD WINAPI DisableParserFilter(HFILTER hFilter,HPARSER hParser);
1793 DWORD WINAPI EnableParserFilter(HFILTER hFilter,HPARSER hParser);
1794 DWORD WINAPI FilterAddObject(HFILTER hFilter,LPFILTEROBJECT2 lpFilterObject);
1795 VOID WINAPI FilterFlushBits(HFILTER hFilter);
1796 DWORD WINAPI FilterFrame(HFRAME hFrame,HFILTER hFilter,HCAPTURE hCapture);
1797 WINBOOL WINAPI FilterAttachesProperties(HFILTER hFilter);
1798 DWORD WINAPI FilterFindFrame (HFILTER hFilter,HCAPTURE hCapture,DWORD nFrame,STATUSPROC StatusProc,LPVOID UIInstance,DWORD TimeDelta,WINBOOL FilterDirection);
1799 HFRAME FilterFindPropertyInstance (HFRAME hFrame,HFILTER hMasterFilter,HCAPTURE hCapture,HFILTER hInstanceFilter,LPPROPERTYINST *lpPropRestartKey,STATUSPROC StatusProc,LPVOID UIInstance,DWORD TimeDelta,WINBOOL FilterForward);
1800 VOID WINAPI SetCurrentFilter(HFILTER);
1801 HFILTER WINAPI GetCurrentFilter(VOID);
1802
1803 typedef struct _ETHERNET {
1804 BYTE DstAddr[MAX_ADDR_LENGTH];
1805 BYTE SrcAddr[MAX_ADDR_LENGTH];
1806 __C89_NAMELESS union {
1807 WORD Length;
1808 WORD Type;
1809 };
1810 BYTE Info[0];
1811 } ETHERNET;
1812
1813 typedef ETHERNET *LPETHERNET;
1814 typedef ETHERNET UNALIGNED *ULPETHERNET;
1815
1816#define ETHERNET_SIZE sizeof(ETHERNET)
1817#define ETHERNET_HEADER_LENGTH (14)
1818
1819#define ETHERNET_DATA_LENGTH (0x5dc)
1820#define ETHERNET_FRAME_LENGTH (0x5ea)
1821#define ETHERNET_FRAME_TYPE (0x600)
1822
1823 typedef struct _NM_ATM {
1824 UCHAR DstAddr[6];
1825 UCHAR SrcAddr[6];
1826 ULONG Vpi;
1827 ULONG Vci;
1828 } NM_ATM;
1829
1830 typedef NM_ATM *PNM_ATM;
1831 typedef NM_ATM *UPNM_ATM;
1832
1833#define NM_ATM_HEADER_LENGTH sizeof(NM_ATM)
1834
1835#pragma pack(push,1)
1836
1837 typedef struct _NM_1394 {
1838 UCHAR DstAddr[6];
1839 UCHAR SrcAddr[6];
1840 ULONGLONG VcId;
1841 } NM_1394;
1842
1843 typedef NM_1394 *PNM_1394;
1844 typedef NM_1394 *UPNM_1394;
1845
1846#define NM_1394_HEADER_LENGTH sizeof(NM_1394)
1847
1848 typedef struct _TOKENRING {
1849 BYTE AccessCtrl;
1850 BYTE FrameCtrl;
1851 BYTE DstAddr[MAX_ADDR_LENGTH];
1852 BYTE SrcAddr[MAX_ADDR_LENGTH];
1853 __C89_NAMELESS union {
1854 BYTE Info[0];
1855 WORD RoutingInfo[0];
1856 };
1857 } TOKENRING;
1858
1859 typedef TOKENRING *LPTOKENRING;
1860 typedef TOKENRING UNALIGNED *ULPTOKENRING;
1861#define TOKENRING_SIZE sizeof(TOKENRING)
1862#define TOKENRING_HEADER_LENGTH (14)
1863
1864#define TOKENRING_SA_ROUTING_INFO (0x80)
1865
1866#define TOKENRING_SA_LOCAL (0x40)
1867#define TOKENRING_DA_LOCAL (0x40)
1868#define TOKENRING_DA_GROUP (0x80)
1869#define TOKENRING_RC_LENGTHMASK (0x1f)
1870#define TOKENRING_BC_MASK (0xe0)
1871#define TOKENRING_TYPE_MAC (0)
1872#define TOKENRING_TYPE_LLC (0x40)
1873
1874#pragma pack(pop)
1875
1876#pragma pack(push,1)
1877
1878 typedef struct _FDDI {
1879 BYTE FrameCtrl;
1880 BYTE DstAddr[MAX_ADDR_LENGTH];
1881 BYTE SrcAddr[MAX_ADDR_LENGTH];
1882 BYTE Info[0];
1883 } FDDI;
1884
1885#define FDDI_SIZE sizeof(FDDI)
1886
1887 typedef FDDI *LPFDDI;
1888 typedef FDDI UNALIGNED *ULPFDDI;
1889
1890#define FDDI_HEADER_LENGTH (13)
1891#define FDDI_TYPE_MAC (0)
1892#define FDDI_TYPE_LLC (0x10)
1893#define FDDI_TYPE_LONG_ADDRESS (0x40)
1894
1895#pragma pack(pop)
1896
1897#pragma pack(push,1)
1898
1899 typedef struct _LLC {
1900 BYTE dsap;
1901 BYTE ssap;
1902 struct {
1903 __C89_NAMELESS union {
1904 BYTE Command;
1905 BYTE NextSend;
1906 };
1907 __C89_NAMELESS union {
1908 BYTE NextRecv;
1909 BYTE Data[1];
1910 };
1911 } ControlField;
1912 } LLC;
1913
1914 typedef LLC *LPLLC;
1915 typedef LLC UNALIGNED *ULPLLC;
1916
1917#define LLC_SIZE (sizeof(LLC))
1918
1919#pragma pack(pop)
1920
1921#define IsRoutingInfoPresent(f) ((((ULPTOKENRING) (f))->SrcAddr[0] & TOKENRING_SA_ROUTING_INFO) ? TRUE : FALSE)
1922#define GetRoutingInfoLength(f) (IsRoutingInfoPresent(f) ? (((ULPTOKENRING) (f))->RoutingInfo[0] & TOKENRING_RC_LENGTHMASK) : 0)
1923
1924 typedef VOID (WINAPIV *FORMAT)(LPPROPERTYINST,...);
1925
1926#define PROTOCOL_STATUS_RECOGNIZED (0)
1927#define PROTOCOL_STATUS_NOT_RECOGNIZED (1)
1928#define PROTOCOL_STATUS_CLAIMED (2)
1929#define PROTOCOL_STATUS_NEXT_PROTOCOL (3)
1930
1931 extern BYTE HexTable[];
1932
1933#define XCHG(x) MAKEWORD(HIBYTE(x),LOBYTE(x))
1934#define DXCHG(x) MAKELONG(XCHG(HIWORD(x)),XCHG(LOWORD(x)))
1935#define LONIBBLE(b) ((BYTE) ((b) & 0x0F))
1936#define HINIBBLE(b) ((BYTE) ((b) >> 4))
1937#define HEX(b) (HexTable[LONIBBLE(b)])
1938#define SWAPBYTES(w) ((w) = XCHG(w))
1939#define SWAPWORDS(d) ((d) = DXCHG(d))
1940
1941 typedef union _MACFRAME {
1942 LPBYTE MacHeader;
1943 LPETHERNET Ethernet;
1944 LPTOKENRING Tokenring;
1945 LPFDDI Fddi;
1946 } MACFRAME;
1947
1948 typedef MACFRAME *LPMACFRAME;
1949
1950#define HOT_SIGNATURE MAKE_IDENTIFIER('H','O','T','$')
1951#define HOE_SIGNATURE MAKE_IDENTIFIER('H','O','E','$')
1952
1953 typedef struct _HANDOFFENTRY {
1954 DWORD hoe_sig;
1955 DWORD hoe_ProtIdentNumber;
1956 HPROTOCOL hoe_ProtocolHandle;
1957 DWORD hoe_ProtocolData;
1958 } HANDOFFENTRY;
1959
1960 typedef HANDOFFENTRY *LPHANDOFFENTRY;
1961
1962 typedef struct _HANDOFFTABLE {
1963 DWORD hot_sig;
1964 DWORD hot_NumEntries;
1965 LPHANDOFFENTRY hot_Entries;
1966 } HANDOFFTABLE;
1967
1968 typedef struct _HANDOFFTABLE *LPHANDOFFTABLE;
1969
1970 INLINE LPVOID GetPropertyInstanceData(LPPROPERTYINST PropertyInst) {
1971 if(PropertyInst->DataLength!=(WORD) -1) return PropertyInst->lpData;
1972 return (LPVOID) PropertyInst->lpPropertyInstEx->Byte;
1973 }
1974
1975#define GetPropertyInstanceDataValue(p,type) ((type *) GetPropertyInstanceData(p))[0]
1976
1977 INLINE DWORD GetPropertyInstanceFrameDataLength(LPPROPERTYINST PropertyInst) {
1978 if(PropertyInst->DataLength!=(WORD) -1) return PropertyInst->DataLength;
1979 return PropertyInst->lpPropertyInstEx->Length;
1980 }
1981
1982 INLINE DWORD GetPropertyInstanceExDataLength(LPPROPERTYINST PropertyInst) {
1983 if(PropertyInst->DataLength==(WORD) -1) {
1984 PropertyInst->lpPropertyInstEx->Length;
1985 }
1986 return (WORD) -1;
1987 }
1988
1989 LPLABELED_WORD WINAPI GetProtocolDescriptionTable(LPDWORD TableSize);
1990 LPLABELED_WORD WINAPI GetProtocolDescription(DWORD ProtocolID);
1991 DWORD WINAPI GetMacHeaderLength(LPVOID MacHeader,DWORD MacType);
1992 DWORD WINAPI GetLLCHeaderLength(LPLLC Frame);
1993 DWORD WINAPI GetEtype(LPVOID MacHeader,DWORD MacType);
1994 DWORD WINAPI GetSaps(LPVOID MacHeader,DWORD MacType);
1995 WINBOOL WINAPI IsLLCPresent(LPVOID MacHeader,DWORD MacType);
1996 VOID WINAPI CanonicalizeHexString(LPSTR hex,LPSTR dest,DWORD len);
1997 void WINAPI CanonHex(UCHAR *pDest,UCHAR *pSource,int iLen,WINBOOL fOx);
1998 DWORD WINAPI ByteToBinary(LPSTR string,DWORD ByteValue);
1999 DWORD WINAPI WordToBinary(LPSTR string,DWORD WordValue);
2000 DWORD WINAPI DwordToBinary(LPSTR string,DWORD DwordValue);
2001 LPSTR WINAPI AddressToString(LPSTR string,BYTE *lpAddress);
2002 LPBYTE WINAPI StringToAddress(BYTE *lpAddress,LPSTR string);
2003 LPDWORD WINAPI VarLenSmallIntToDword(LPBYTE pValue,WORD ValueLen,WINBOOL fIsByteswapped,LPDWORD lpDword);
2004 LPBYTE WINAPI LookupByteSetString (LPSET lpSet,BYTE Value);
2005 LPBYTE WINAPI LookupWordSetString (LPSET lpSet,WORD Value);
2006 LPBYTE WINAPI LookupDwordSetString (LPSET lpSet,DWORD Value);
2007 DWORD WINAPIV FormatByteFlags(LPSTR string,DWORD ByteValue,DWORD BitMask);
2008 DWORD WINAPIV FormatWordFlags(LPSTR string,DWORD WordValue,DWORD BitMask);
2009 DWORD WINAPIV FormatDwordFlags(LPSTR string,DWORD DwordValue,DWORD BitMask);
2010 LPSTR WINAPIV FormatTimeAsString(SYSTEMTIME *time,LPSTR string);
2011 VOID WINAPIV FormatLabeledByteSetAsFlags(LPPROPERTYINST lpPropertyInst);
2012 VOID WINAPIV FormatLabeledWordSetAsFlags(LPPROPERTYINST lpPropertyInst);
2013 VOID WINAPIV FormatLabeledDwordSetAsFlags(LPPROPERTYINST lpPropertyInst);
2014 VOID WINAPIV FormatPropertyDataAsByte(LPPROPERTYINST lpPropertyInst,DWORD Base);
2015 VOID WINAPIV FormatPropertyDataAsWord(LPPROPERTYINST lpPropertyInst,DWORD Base);
2016 VOID WINAPIV FormatPropertyDataAsDword(LPPROPERTYINST lpPropertyInst,DWORD Base);
2017 VOID WINAPIV FormatLabeledByteSet(LPPROPERTYINST lpPropertyInst);
2018 VOID WINAPIV FormatLabeledWordSet(LPPROPERTYINST lpPropertyInst);
2019 VOID WINAPIV FormatLabeledDwordSet(LPPROPERTYINST lpPropertyInst);
2020 VOID WINAPIV FormatPropertyDataAsInt64(LPPROPERTYINST lpPropertyInst,DWORD Base);
2021 VOID WINAPIV FormatPropertyDataAsTime(LPPROPERTYINST lpPropertyInst);
2022 VOID WINAPIV FormatPropertyDataAsString(LPPROPERTYINST lpPropertyInst);
2023 VOID WINAPIV FormatPropertyDataAsHexString(LPPROPERTYINST lpPropertyInst);
2024 ULPBYTE WINAPI ParserTemporaryLockFrame(HFRAME hFrame);
2025 LPVOID WINAPI GetCCInstPtr(VOID);
2026 VOID WINAPI SetCCInstPtr(LPVOID lpCurCaptureInst);
2027 LPVOID WINAPI CCHeapAlloc(DWORD dwBytes,WINBOOL bZeroInit);
2028 LPVOID WINAPI CCHeapReAlloc(LPVOID lpMem,DWORD dwBytes,WINBOOL bZeroInit);
2029 WINBOOL WINAPI CCHeapFree(LPVOID lpMem);
2030 SIZE_T WINAPI CCHeapSize(LPVOID lpMem);
2031 WINBOOL __cdecl BERGetInteger(ULPBYTE pCurrentPointer,ULPBYTE *ppValuePointer,LPDWORD pHeaderLength,LPDWORD pDataLength,ULPBYTE *ppNext);
2032 WINBOOL __cdecl BERGetString(ULPBYTE pCurrentPointer,ULPBYTE *ppValuePointer,LPDWORD pHeaderLength,LPDWORD pDataLength,ULPBYTE *ppNext);
2033 WINBOOL __cdecl BERGetHeader(ULPBYTE pCurrentPointer,ULPBYTE pTag,LPDWORD pHeaderLength,LPDWORD pDataLength,ULPBYTE *ppNext);
2034
2035#define MAX_PROTOCOL_COMMENT_LEN (256)
2036
2037#define NETMON_MAX_PROTOCOL_NAME_LEN (16)
2038
2039#ifndef MAX_PROTOCOL_NAME_LEN
2040#define MAX_PROTOCOL_NAME_LEN (NETMON_MAX_PROTOCOL_NAME_LEN)
2041#else
2042#undef MAX_PROTOCOL_NAME_LEN
2043#endif
2044
2045 typedef enum __MIDL___MIDL_itf_netmon_0000_0015 {
2046 HANDOFF_VALUE_FORMAT_BASE_UNKNOWN = 0,HANDOFF_VALUE_FORMAT_BASE_DECIMAL = 10,HANDOFF_VALUE_FORMAT_BASE_HEX = 16
2047 } PF_HANDOFFVALUEFORMATBASE;
2048
2049 typedef struct _PF_HANDOFFENTRY {
2050 char szIniFile[260];
2051 char szIniSection[260];
2052 char szProtocol[16];
2053 DWORD dwHandOffValue;
2054 PF_HANDOFFVALUEFORMATBASE ValueFormatBase;
2055 } PF_HANDOFFENTRY;
2056
2057 typedef PF_HANDOFFENTRY *PPF_HANDOFFENTRY;
2058
2059 typedef struct _PF_HANDOFFSET {
2060 DWORD nEntries;
2061 PF_HANDOFFENTRY Entry[0];
2062 } PF_HANDOFFSET;
2063
2064 typedef PF_HANDOFFSET *PPF_HANDOFFSET;
2065
2066 typedef struct _PF_FOLLOWENTRY {
2067 char szProtocol[16];
2068 } PF_FOLLOWENTRY;
2069
2070 typedef PF_FOLLOWENTRY *PPF_FOLLOWENTRY;
2071
2072 typedef struct _PF_FOLLOWSET {
2073 DWORD nEntries;
2074 PF_FOLLOWENTRY Entry[0];
2075 } PF_FOLLOWSET;
2076
2077 typedef PF_FOLLOWSET *PPF_FOLLOWSET;
2078
2079 typedef struct _PF_PARSERINFO {
2080 char szProtocolName[NETMON_MAX_PROTOCOL_NAME_LEN];
2081 char szComment[MAX_PROTOCOL_COMMENT_LEN];
2082 char szHelpFile[MAX_PATH];
2083 PPF_FOLLOWSET pWhoCanPrecedeMe;
2084 PPF_FOLLOWSET pWhoCanFollowMe;
2085 PPF_HANDOFFSET pWhoHandsOffToMe;
2086 PPF_HANDOFFSET pWhoDoIHandOffTo;
2087 } PF_PARSERINFO;
2088
2089 typedef PF_PARSERINFO *PPF_PARSERINFO;
2090
2091 typedef struct _PF_PARSERDLLINFO {
2092 DWORD nParsers;
2093 PF_PARSERINFO ParserInfo[0];
2094 } PF_PARSERDLLINFO;
2095
2096 typedef PF_PARSERDLLINFO *PPF_PARSERDLLINFO;
2097
2098#define INI_PATH_LENGTH (256)
2099
2100#define MAX_HANDOFF_ENTRY_LENGTH (80)
2101#define MAX_PROTOCOL_NAME (40)
2102#define NUMALLOCENTRIES (10)
2103#define RAW_INI_STR_LEN (200)
2104
2105#define PARSERS_SUBDIR "PARSERS"
2106#define INI_EXTENSION "INI"
2107#define BASE10_FORMAT_STR "%ld=%s %ld"
2108#define BASE16_FORMAT_STR "%lx=%s %lx"
2109
2110 LPSTR __cdecl BuildINIPath(char *FullPath,char *IniFileName);
2111 DWORD WINAPI CreateHandoffTable(LPSTR secName,LPSTR iniFile,LPHANDOFFTABLE *hTable,DWORD nMaxProtocolEntries,DWORD base);
2112 HPROTOCOL WINAPI GetProtocolFromTable(LPHANDOFFTABLE hTable,DWORD ItemToFind,PDWORD_PTR lpInstData);
2113 VOID WINAPI DestroyHandoffTable(LPHANDOFFTABLE hTable);
2114 BOOLEAN WINAPI IsRawIPXEnabled(LPSTR secName,LPSTR iniFile,LPSTR CurProtocol);
2115
2116#define EXPERTSTRINGLENGTH (260)
2117#define EXPERTGROUPNAMELENGTH (25)
2118
2119 typedef LPVOID HEXPERTKEY;
2120 typedef HEXPERTKEY *PHEXPERTKEY;
2121 typedef LPVOID HEXPERT;
2122 typedef HEXPERT *PHEXPERT;
2123 typedef LPVOID HRUNNINGEXPERT;
2124 typedef HRUNNINGEXPERT *PHRUNNINGEXPERT;
2125 typedef struct _EXPERTENUMINFO *PEXPERTENUMINFO;
2126 typedef struct _EXPERTCONFIG *PEXPERTCONFIG;
2127 typedef struct _EXPERTSTARTUPINFO *PEXPERTSTARTUPINFO;
2128
2129#define EXPERTENTRY_REGISTER "Register"
2130#define EXPERTENTRY_CONFIGURE "Configure"
2131#define EXPERTENTRY_RUN "Run"
2132 typedef WINBOOL (WINAPI *PEXPERTREGISTERPROC)(PEXPERTENUMINFO);
2133 typedef WINBOOL (WINAPI *PEXPERTCONFIGPROC) (HEXPERTKEY,PEXPERTCONFIG*,PEXPERTSTARTUPINFO,DWORD,HWND);
2134 typedef WINBOOL (WINAPI *PEXPERTRUNPROC) (HEXPERTKEY,PEXPERTCONFIG,PEXPERTSTARTUPINFO,DWORD,HWND);
2135
2136 typedef struct _EXPERTENUMINFO {
2137 char szName[EXPERTSTRINGLENGTH];
2138 char szVendor[EXPERTSTRINGLENGTH];
2139 char szDescription[EXPERTSTRINGLENGTH];
2140 DWORD Version;
2141 DWORD Flags;
2142 char szDllName[MAX_PATH];
2143 HEXPERT hExpert;
2144 HINSTANCE hModule;
2145 PEXPERTREGISTERPROC pRegisterProc;
2146 PEXPERTCONFIGPROC pConfigProc;
2147 PEXPERTRUNPROC pRunProc;
2148 } EXPERTENUMINFO;
2149
2150 typedef EXPERTENUMINFO *PEXPERTENUMINFO;
2151
2152#define EXPERT_ENUM_FLAG_CONFIGURABLE (0x1)
2153#define EXPERT_ENUM_FLAG_VIEWER_PRIVATE (0x2)
2154#define EXPERT_ENUM_FLAG_NO_VIEWER (0x4)
2155#define EXPERT_ENUM_FLAG_ADD_ME_TO_RMC_IN_SUMMARY (0x10)
2156#define EXPERT_ENUM_FLAG_ADD_ME_TO_RMC_IN_DETAIL (0x20)
2157
2158 typedef struct _EXPERTSTARTUPINFO {
2159 DWORD Flags;
2160 HCAPTURE hCapture;
2161 char szCaptureFile[MAX_PATH];
2162 DWORD dwFrameNumber;
2163 HPROTOCOL hProtocol;
2164 LPPROPERTYINST lpPropertyInst;
2165 struct {
2166 BYTE BitNumber;
2167 WINBOOL bOn;
2168 } sBitfield;
2169 } EXPERTSTARTUPINFO;
2170
2171 typedef struct _EXPERTCONFIG {
2172 DWORD RawConfigLength;
2173 BYTE RawConfigData[0];
2174 } EXPERTCONFIG;
2175
2176 typedef EXPERTCONFIG *PEXPERTCONFIG;
2177
2178 typedef struct {
2179 HEXPERT hExpert;
2180 DWORD StartupFlags;
2181 PEXPERTCONFIG pConfig;
2182 } CONFIGUREDEXPERT;
2183
2184 typedef CONFIGUREDEXPERT *PCONFIGUREDEXPERT;
2185
2186 typedef struct {
2187 DWORD FrameNumber;
2188 HFRAME hFrame;
2189 ULPFRAME pFrame;
2190 LPRECOGNIZEDATATABLE lpRecognizeDataTable;
2191 LPPROPERTYTABLE lpPropertyTable;
2192 } EXPERTFRAMEDESCRIPTOR;
2193
2194 typedef EXPERTFRAMEDESCRIPTOR *LPEXPERTFRAMEDESCRIPTOR;
2195
2196#define GET_SPECIFIED_FRAME (0)
2197#define GET_FRAME_NEXT_FORWARD (1)
2198#define GET_FRAME_NEXT_BACKWARD (2)
2199#define FLAGS_DEFER_TO_UI_FILTER (0x1)
2200#define FLAGS_ATTACH_PROPERTIES (0x2)
2201
2202 typedef enum __MIDL___MIDL_itf_netmon_0000_0016 {
2203 EXPERTSTATUS_INACTIVE = 0,EXPERTSTATUS_STARTING,EXPERTSTATUS_RUNNING,
2204 EXPERTSTATUS_PROBLEM,EXPERTSTATUS_ABORTED,EXPERTSTATUS_DONE
2205 } EXPERTSTATUSENUMERATION;
2206
2207#define EXPERTSUBSTATUS_ABORTED_USER (0x1)
2208#define EXPERTSUBSTATUS_ABORTED_LOAD_FAIL (0x2)
2209#define EXPERTSUBSTATUS_ABORTED_THREAD_FAIL (0x4)
2210#define EXPERTSUBSTATUS_ABORTED_BAD_ENTRY (0x8)
2211
2212 typedef struct __MIDL___MIDL_itf_netmon_0000_0017 {
2213 EXPERTSTATUSENUMERATION Status;
2214 DWORD SubStatus;
2215 DWORD PercentDone;
2216 DWORD Frame;
2217 char szStatusText[260];
2218 } EXPERTSTATUS;
2219
2220 typedef EXPERTSTATUS *PEXPERTSTATUS;
2221
2222#define EXPERT_STARTUP_FLAG_USE_STARTUP_DATA_OVER_CONFIG_DATA (0x1)
2223#define INVALID_FRAME_NUMBER ((DWORD)-1)
2224#define CAPTUREFILE_OPEN OPEN_EXISTING
2225#define CAPTUREFILE_CREATE CREATE_NEW
2226
2227 LPSYSTEMTIME WINAPI GetCaptureTimeStamp(HCAPTURE hCapture);
2228 DWORD WINAPI GetCaptureMacType(HCAPTURE hCapture);
2229 DWORD WINAPI GetCaptureTotalFrames(HCAPTURE hCapture);
2230 LPSTR WINAPI GetCaptureComment(HCAPTURE hCapture);
2231 DWORD WINAPI MacTypeToAddressType(DWORD MacType);
2232 DWORD WINAPI AddressTypeToMacType(DWORD AddressType);
2233 DWORD WINAPI GetFrameDstAddressOffset(HFRAME hFrame,DWORD AddressType,LPDWORD AddressLength);
2234 DWORD WINAPI GetFrameSrcAddressOffset(HFRAME hFrame,DWORD AddressType,LPDWORD AddressLength);
2235 HCAPTURE WINAPI GetFrameCaptureHandle(HFRAME hFrame);
2236 DWORD WINAPI GetFrameDestAddress(HFRAME hFrame,LPADDRESS2 lpAddress,DWORD AddressType,DWORD Flags);
2237 DWORD WINAPI GetFrameSourceAddress(HFRAME hFrame,LPADDRESS2 lpAddress,DWORD AddressType,DWORD Flags);
2238 DWORD WINAPI GetFrameMacHeaderLength(HFRAME hFrame);
2239 WINBOOL WINAPI CompareFrameDestAddress(HFRAME hFrame,LPADDRESS2 lpAddress);
2240 WINBOOL WINAPI CompareFrameSourceAddress(HFRAME hFrame,LPADDRESS2 lpAddress);
2241 DWORD WINAPI GetFrameLength(HFRAME hFrame);
2242 DWORD WINAPI GetFrameStoredLength(HFRAME hFrame);
2243 DWORD WINAPI GetFrameMacType(HFRAME hFrame);
2244 DWORD WINAPI GetFrameMacHeaderLength(HFRAME hFrame);
2245 DWORD WINAPI GetFrameNumber(HFRAME hFrame);
2246 __MINGW_EXTENSION __int64 WINAPI GetFrameTimeStamp(HFRAME hFrame);
2247 ULPFRAME WINAPI GetFrameFromFrameHandle(HFRAME hFrame);
2248 __MINGW_EXTENSION HFRAME WINAPI ModifyFrame(HCAPTURE hCapture,DWORD FrameNumber,LPBYTE FrameData,DWORD FrameLength,__int64 TimeStamp);
2249 HFRAME WINAPI FindNextFrame(HFRAME hCurrentFrame,LPSTR ProtocolName,LPADDRESS2 lpDestAddress,LPADDRESS2 lpSrcAddress,LPWORD ProtocolOffset,DWORD OriginalFrameNumber,DWORD nHighestFrame);
2250 HFRAME WINAPI FindPreviousFrame(HFRAME hCurrentFrame,LPSTR ProtocolName,LPADDRESS2 lpDstAddress,LPADDRESS2 lpSrcAddress,LPWORD ProtocolOffset,DWORD OriginalFrameNumber,DWORD nLowestFrame);
2251 HCAPTURE WINAPI GetFrameCaptureHandle(HFRAME);
2252 HFRAME WINAPI GetFrame(HCAPTURE hCapture,DWORD FrameNumber);
2253 LPRECOGNIZEDATATABLE WINAPI GetFrameRecognizeData(HFRAME hFrame);
2254 HPROTOCOL WINAPI CreateProtocol(LPSTR ProtocolName,LPENTRYPOINTS lpEntryPoints,DWORD cbEntryPoints);
2255 VOID WINAPI DestroyProtocol(HPROTOCOL hProtocol);
2256 LPPROTOCOLINFO WINAPI GetProtocolInfo(HPROTOCOL hProtocol);
2257 HPROPERTY WINAPI GetProperty(HPROTOCOL hProtocol,LPSTR PropertyName);
2258 HPROTOCOL WINAPI GetProtocolFromName(LPSTR ProtocolName);
2259 DWORD WINAPI GetProtocolStartOffset(HFRAME hFrame,LPSTR ProtocolName);
2260 DWORD WINAPI GetProtocolStartOffsetHandle(HFRAME hFrame,HPROTOCOL hProtocol);
2261 DWORD WINAPI GetPreviousProtocolOffsetByName(HFRAME hFrame,DWORD dwStartOffset,LPSTR szProtocolName,DWORD *pdwPreviousOffset);
2262 LPPROTOCOLTABLE WINAPI GetEnabledProtocols(HCAPTURE hCapture);
2263 DWORD WINAPI CreatePropertyDatabase(HPROTOCOL hProtocol,DWORD nProperties);
2264 DWORD WINAPI DestroyPropertyDatabase(HPROTOCOL hProtocol);
2265 HPROPERTY WINAPI AddProperty(HPROTOCOL hProtocol,LPPROPERTYINFO PropertyInfo);
2266 WINBOOL WINAPI AttachPropertyInstance(HFRAME hFrame,HPROPERTY hProperty,DWORD Length,ULPVOID lpData,DWORD HelpID,DWORD Level,DWORD IFlags);
2267 WINBOOL WINAPI AttachPropertyInstanceEx(HFRAME hFrame,HPROPERTY hProperty,DWORD Length,ULPVOID lpData,DWORD ExLength,ULPVOID lpExData,DWORD HelpID,DWORD Level,DWORD IFlags);
2268 LPPROPERTYINST WINAPI FindPropertyInstance(HFRAME hFrame,HPROPERTY hProperty);
2269 LPPROPERTYINST WINAPI FindPropertyInstanceRestart (HFRAME hFrame,HPROPERTY hProperty,LPPROPERTYINST *lpRestartKey,WINBOOL DirForward);
2270 LPPROPERTYINFO WINAPI GetPropertyInfo(HPROPERTY hProperty);
2271 LPSTR WINAPI GetPropertyText(HFRAME hFrame,LPPROPERTYINST lpPI,LPSTR szBuffer,DWORD BufferSize);
2272 DWORD WINAPI ResetPropertyInstanceLength(LPPROPERTYINST lpProp,WORD nOrgLen,WORD nNewLen);
2273 DWORD WINAPI GetCaptureCommentFromFilename(LPSTR lpFilename,LPSTR lpComment,DWORD BufferSize);
2274 int WINAPI CompareAddresses(LPADDRESS2 lpAddress1,LPADDRESS2 lpAddress2);
2275 DWORD WINAPIV FormatPropertyInstance(LPPROPERTYINST lpPropertyInst,...);
2276 __MINGW_EXTENSION SYSTEMTIME *WINAPI AdjustSystemTime(SYSTEMTIME *SystemTime,__int64 TimeDelta);
2277 LPSTR WINAPI NMRtlIpv6AddressToStringA(const BYTE IP6Addr[],LPSTR S);
2278 LPWSTR WINAPI NMRtlIpv6AddressToStringW(const BYTE IP6Addr[],LPWSTR S);
2279 ULONG WINAPI NMRtlIpv6StringToAddressA(LPCSTR S,LPCSTR *Terminator,BYTE IP6Addr[]);
2280 ULONG WINAPI NMRtlIpv6StringToAddressW(LPCWSTR S,LPCWSTR *Terminator,BYTE IP6Addr[]);
2281 DWORD WINAPI ExpertGetFrame(HEXPERTKEY hExpertKey,DWORD Direction,DWORD RequestFlags,DWORD RequestedFrameNumber,HFILTER hFilter,LPEXPERTFRAMEDESCRIPTOR pEFrameDescriptor);
2282 LPVOID WINAPI ExpertAllocMemory(HEXPERTKEY hExpertKey,SIZE_T nBytes,DWORD *pError);
2283 LPVOID WINAPI ExpertReallocMemory(HEXPERTKEY hExpertKey,LPVOID pOriginalMemory,SIZE_T nBytes,DWORD *pError);
2284 DWORD WINAPI ExpertFreeMemory(HEXPERTKEY hExpertKey,LPVOID pOriginalMemory);
2285 SIZE_T WINAPI ExpertMemorySize(HEXPERTKEY hExpertKey,LPVOID pOriginalMemory);
2286 DWORD WINAPI ExpertIndicateStatus(HEXPERTKEY hExpertKey,EXPERTSTATUSENUMERATION Status,DWORD SubStatus,const char *szText,LONG PercentDone);
2287 DWORD WINAPI ExpertSubmitEvent(HEXPERTKEY hExpertKey,PNMEVENTDATA pExpertEvent);
2288 DWORD WINAPI ExpertGetStartupInfo(HEXPERTKEY hExpertKey,PEXPERTSTARTUPINFO pExpertStartupInfo);
2289
2290#define INITIAL_RESTART_KEY (0xffffffff)
2291
2292 DWORD __cdecl CreateBlob(HBLOB *phBlob);
2293 DWORD __cdecl DestroyBlob(HBLOB hBlob);
2294 DWORD __cdecl SetStringInBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,const char *pString);
2295 DWORD __cdecl SetWStringInBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,const WCHAR *pwString);
2296 DWORD __cdecl ConvertWStringToHexString(const WCHAR *pwsz,char **ppsz);
2297 DWORD __cdecl GetStringFromBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,const char **ppString);
2298 DWORD __cdecl ConvertHexStringToWString(CHAR *psz,WCHAR **ppwsz);
2299 DWORD __cdecl GetWStringFromBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,WCHAR **ppwString);
2300 DWORD __cdecl GetStringsFromBlob(HBLOB hBlob,const char *pRequestedOwnerName,const char *pRequestedCategoryName,const char *pRequestedTagName,const char **ppReturnedOwnerName,const char **ppReturnedCategoryName,const char **ppReturnedTagName,const char **ppReturnedString,DWORD *pRestartKey);
2301 DWORD __cdecl RemoveFromBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName);
2302 DWORD __cdecl LockBlob(HBLOB hBlob);
2303 DWORD __cdecl UnlockBlob(HBLOB hBlob);
2304 DWORD __cdecl FindUnknownBlobCategories(HBLOB hBlob,const char *pOwnerName,const char *pKnownCategoriesTable[],HBLOB hUnknownCategoriesBlob);
2305 DWORD __cdecl MergeBlob(HBLOB hDstBlob,HBLOB hSrcBlob);
2306 DWORD __cdecl DuplicateBlob (HBLOB hSrcBlob,HBLOB *hBlobThatWillBeCreated);
2307 DWORD __cdecl WriteBlobToFile(HBLOB hBlob,const char *pFileName);
2308 DWORD __cdecl ReadBlobFromFile(HBLOB *phBlob,const char *pFileName);
2309 DWORD __cdecl RegCreateBlobKey(HKEY hkey,const char *szBlobName,HBLOB hBlob);
2310 DWORD __cdecl RegOpenBlobKey(HKEY hkey,const char *szBlobName,HBLOB *phBlob);
2311 DWORD __cdecl MarshalBlob(HBLOB hBlob,DWORD *pSize,BYTE **ppBytes);
2312 DWORD __cdecl UnMarshalBlob(HBLOB *phBlob,DWORD Size,BYTE *pBytes);
2313 DWORD __cdecl SetDwordInBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,DWORD Dword);
2314 DWORD __cdecl GetDwordFromBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,DWORD *pDword);
2315 DWORD __cdecl SetBoolInBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,WINBOOL Bool);
2316 DWORD __cdecl GetBoolFromBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,WINBOOL *pBool);
2317 DWORD __cdecl GetMacAddressFromBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,BYTE *pMacAddress);
2318 DWORD __cdecl SetMacAddressInBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,const BYTE *pMacAddress);
2319 DWORD __cdecl FindUnknownBlobTags(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pKnownTagsTable[],HBLOB hUnknownTagsBlob);
2320 DWORD __cdecl SetNetworkInfoInBlob(HBLOB hBlob,LPNETWORKINFO lpNetworkInfo);
2321 DWORD __cdecl GetNetworkInfoFromBlob(HBLOB hBlob,LPNETWORKINFO lpNetworkInfo);
2322 DWORD __cdecl CreateNPPInterface (HBLOB hBlob,REFIID iid,void **ppvObject);
2323 DWORD __cdecl SetClassIDInBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,const CLSID *pClsID);
2324 DWORD __cdecl GetClassIDFromBlob(HBLOB hBlob,const char *pOwnerName,const char *pCategoryName,const char *pTagName,CLSID *pClsID);
2325 DWORD __cdecl SetNPPPatternFilterInBlob(HBLOB hBlob,LPEXPRESSION pExpression,HBLOB hErrorBlob);
2326 DWORD __cdecl GetNPPPatternFilterFromBlob(HBLOB hBlob,LPEXPRESSION pExpression,HBLOB hErrorBlob);
2327 DWORD __cdecl SetNPPAddress2FilterInBlob(HBLOB hBlob,LPADDRESSTABLE2 pAddressTable);
2328 DWORD __cdecl GetNPPAddress2FilterFromBlob(HBLOB hBlob,LPADDRESSTABLE2 pAddressTable,HBLOB hErrorBlob);
2329 DWORD __cdecl SetNPPTriggerInBlob(HBLOB hBlob,LPTRIGGER pTrigger,HBLOB hErrorBlob);
2330 DWORD __cdecl GetNPPTriggerFromBlob(HBLOB hBlob,LPTRIGGER pTrigger,HBLOB hErrorBlob);
2331 DWORD __cdecl SetNPPEtypeSapFilter(HBLOB hBlob,WORD nSaps,WORD nEtypes,LPBYTE lpSapTable,LPWORD lpEtypeTable,DWORD FilterFlags,HBLOB hErrorBlob);
2332 DWORD __cdecl GetNPPEtypeSapFilter(HBLOB hBlob,WORD *pnSaps,WORD *pnEtypes,LPBYTE *ppSapTable,LPWORD *ppEtypeTable,DWORD *pFilterFlags,HBLOB hErrorBlob);
2333 DWORD __cdecl GetNPPMacTypeAsNumber(HBLOB hBlob,LPDWORD lpMacType);
2334 WINBOOL __cdecl IsRemoteNPP (HBLOB hBLOB);
2335
2336#define OWNER_NPP "NPP"
2337
2338#define CATEGORY_NETWORKINFO "NetworkInfo"
2339#define TAG_MACTYPE "MacType"
2340#define TAG_CURRENTADDRESS "CurrentAddress"
2341#define TAG_LINKSPEED "LinkSpeed"
2342#define TAG_MAXFRAMESIZE "MaxFrameSize"
2343#define TAG_FLAGS "Flags"
2344#define TAG_TIMESTAMPSCALEFACTOR "TimeStampScaleFactor"
2345#define TAG_COMMENT "Comment"
2346#define TAG_NODENAME "NodeName"
2347#define TAG_NAME "Name"
2348#define TAG_FAKENPP "Fake"
2349#define TAG_PROMISCUOUS_MODE "PMode"
2350
2351#define CATEGORY_LOCATION "Location"
2352#define TAG_RAS "Dial-up Connection"
2353#define TAG_MACADDRESS "MacAddress"
2354#define TAG_CLASSID "ClassID"
2355#define TAG_NAME "Name"
2356#define TAG_CONNECTIONNAME "Connection Name"
2357#define TAG_FRIENDLYNAME "Friendly Name"
2358
2359#define CATEGORY_CONFIG "Config"
2360#define TAG_FRAME_SIZE "FrameSize"
2361#define TAG_UPDATE_FREQUENCY "UpdateFreq"
2362#define TAG_BUFFER_SIZE "BufferSize"
2363#define TAG_PATTERN_DESIGNATOR "PatternMatch"
2364#define TAG_PATTERN "Pattern"
2365#define TAG_ADDRESS_PAIR "AddressPair"
2366#define TAG_CONNECTIONFLAGS "ConnectionFlags"
2367#define TAG_ETYPES "Etypes"
2368#define TAG_SAPS "Saps"
2369#define TAG_NO_CONVERSATION_STATS "NoConversationStats"
2370#define TAG_NO_STATS_FRAME "NoStatsFrame"
2371#define TAG_DONT_DELETE_EMPTY_CAPTURE "DontDeleteEmptyCapture"
2372#define TAG_WANT_PROTOCOL_INFO "WantProtocolInfo"
2373#define TAG_INTERFACE_DELAYED_CAPTURE "IDdC"
2374#define TAG_INTERFACE_REALTIME_CAPTURE "IRTC"
2375#define TAG_INTERFACE_STATS "ISts"
2376#define TAG_INTERFACE_TRANSMIT "IXmt"
2377#define TAG_LOCAL_ONLY "LocalOnly"
2378
2379#define TAG_IS_REMOTE "IsRemote"
2380
2381#define CATEGORY_TRIGGER "Trigger"
2382#define TAG_TRIGGER "Trigger"
2383
2384#define CATEGORY_FINDER "Finder"
2385#define TAG_ROOT "Root"
2386#define TAG_PROCNAME "ProcName"
2387#define TAG_DISP_STRING "Display"
2388#define TAG_DLL_FILENAME "DLLName"
2389#define TAG_GET_SPECIAL_BLOBS "Specials"
2390
2391#define CATEGORY_REMOTE "Remote"
2392#define TAG_REMOTECOMPUTER "RemoteComputer"
2393#define TAG_REMOTECLASSID "ClassID"
2394
2395#define PROTOCOL_STRING_ETHERNET_TXT "ETHERNET"
2396#define PROTOCOL_STRING_TOKENRING_TXT "TOKENRING"
2397#define PROTOCOL_STRING_FDDI_TXT "FDDI"
2398#define PROTOCOL_STRING_ATM_TXT "ATM"
2399#define PROTOCOL_STRING_1394_TXT "IP/1394"
2400
2401#define PROTOCOL_STRING_IP_TXT "IP"
2402#define PROTOCOL_STRING_IP6_TXT "IP6"
2403#define PROTOCOL_STRING_IPX_TXT "IPX"
2404#define PROTOCOL_STRING_XNS_TXT "XNS"
2405#define PROTOCOL_STRING_VINES_IP_TXT "VINES IP"
2406
2407#define PROTOCOL_STRING_ICMP_TXT "ICMP"
2408#define PROTOCOL_STRING_TCP_TXT "TCP"
2409#define PROTOCOL_STRING_UDP_TXT "UDP"
2410#define PROTOCOL_STRING_SPX_TXT "SPX"
2411#define PROTOCOL_STRING_NCP_TXT "NCP"
2412
2413#define PROTOCOL_STRING_ANY_TXT "ANY"
2414#define PROTOCOL_STRING_ANY_GROUP_TXT "ANY GROUP"
2415#define PROTOCOL_STRING_HIGHEST_TXT "HIGHEST"
2416#define PROTOCOL_STRING_LOCAL_ONLY_TXT "LOCAL ONLY"
2417#define PROTOCOL_STRING_UNKNOWN_TXT "UNKNOWN"
2418#define PROTOCOL_STRING_DATA_TXT "DATA"
2419#define PROTOCOL_STRING_FRAME_TXT "FRAME"
2420#define PROTOCOL_STRING_NONE_TXT "NONE"
2421#define PROTOCOL_STRING_EFFECTIVE_TXT "EFFECTIVE"
2422
2423#define ADDRESS_PAIR_INCLUDE_TXT "INCLUDE"
2424#define ADDRESS_PAIR_EXCLUDE_TXT "EXCLUDE"
2425
2426#define INCLUDE_ALL_EXCEPT_TXT "INCLUDE ALL EXCEPT"
2427#define EXCLUDE_ALL_EXCEPT_TXT "EXCLUDE ALL EXCEPT"
2428
2429#define PATTERN_MATCH_OR_TXT "OR("
2430#define PATTERN_MATCH_AND_TXT "AND("
2431
2432#define TRIGGER_PATTERN_TXT "PATTERN MATCH"
2433#define TRIGGER_BUFFER_TXT "BUFFER CONTENT"
2434
2435#define TRIGGER_NOTIFY_TXT "NOTIFY"
2436#define TRIGGER_STOP_TXT "STOP"
2437#define TRIGGER_PAUSE_TXT "PAUSE"
2438
2439#define TRIGGER_25_PERCENT_TXT "25 PERCENT"
2440#define TRIGGER_50_PERCENT_TXT "50 PERCENT"
2441#define TRIGGER_75_PERCENT_TXT "75 PERCENT"
2442#define TRIGGER_100_PERCENT_TXT "100 PERCENT"
2443
2444#define PATTERN_MATCH_NOT_TXT "NOT"
2445
2446 LPCSTR __cdecl FindOneOf(LPCSTR p1,LPCSTR p2);
2447 LONG __cdecl recursiveDeleteKey(HKEY hKeyParent,const char *lpszKeyChild);
2448 WINBOOL __cdecl SubkeyExists(const char *pszPath,const char *szSubkey);
2449 WINBOOL __cdecl setKeyAndValue(const char *szKey,const char *szSubkey,const char *szValue,const char *szName);
2450
2451#pragma pack(push,1)
2452
2453 typedef struct _IP {
2454 __C89_NAMELESS union {
2455 BYTE Version;
2456 BYTE HdrLen;
2457 };
2458 BYTE ServiceType;
2459 WORD TotalLen;
2460 WORD ID;
2461 __C89_NAMELESS union {
2462 WORD Flags;
2463 WORD FragOff;
2464 };
2465 BYTE TimeToLive;
2466 BYTE Protocol;
2467 WORD HdrChksum;
2468 DWORD SrcAddr;
2469 DWORD DstAddr;
2470 BYTE Options[0];
2471 } IP;
2472
2473 typedef IP *LPIP;
2474 typedef IP UNALIGNED *ULPIP;
2475
2476 typedef struct _PSUHDR {
2477 DWORD ph_SrcIP;
2478 DWORD ph_DstIP;
2479 UCHAR ph_Zero;
2480 UCHAR ph_Proto;
2481 WORD ph_ProtLen;
2482 } PSUHDR;
2483
2484 typedef PSUHDR UNALIGNED *LPPSUHDR;
2485
2486#define IP_VERSION_MASK ((BYTE) 0xf0)
2487#define IP_VERSION_SHIFT (4)
2488#define IP_HDRLEN_MASK ((BYTE) 0x0f)
2489#define IP_HDRLEN_SHIFT (0)
2490#define IP_PRECEDENCE_MASK ((BYTE) 0xE0)
2491#define IP_PRECEDENCE_SHIFT (5)
2492#define IP_TOS_MASK ((BYTE) 0x1E)
2493#define IP_TOS_SHIFT (1)
2494#define IP_DELAY_MASK ((BYTE) 0x10)
2495#define IP_THROUGHPUT_MASK ((BYTE) 0x08)
2496#define IP_RELIABILITY_MASK ((BYTE) 0x04)
2497#define IP_FLAGS_MASK ((BYTE) 0xE0)
2498#define IP_FLAGS_SHIFT (13)
2499#define IP_DF_MASK ((BYTE) 0x40)
2500#define IP_MF_MASK ((BYTE) 0x20)
2501#define IP_MF_SHIFT (5)
2502#define IP_FRAGOFF_MASK ((WORD) 0x1FFF)
2503#define IP_FRAGOFF_SHIFT (3)
2504#define IP_TCC_MASK ((DWORD) 0xFFFFFF00)
2505#define IP_TIME_OPTS_MASK ((BYTE) 0x0F)
2506#define IP_MISS_STNS_MASK ((BYTE) 0xF0)
2507
2508#define IP_TIME_OPTS_SHIFT (0)
2509#define IP_MISS_STNS_SHIFT (4)
2510
2511#define IP_CHKSUM_OFF 10
2512
2513#ifndef __CRT__NO_INLINE
2514 INLINE BYTE IP_Version(ULPIP pIP) { return (pIP->Version & IP_VERSION_MASK) >> IP_VERSION_SHIFT; }
2515 INLINE DWORD IP_HdrLen(ULPIP pIP) { return ((pIP->HdrLen & IP_HDRLEN_MASK) >> IP_HDRLEN_SHIFT) << 2; }
2516 INLINE WORD IP_FragOff(ULPIP pIP) { return (XCHG(pIP->FragOff) & IP_FRAGOFF_MASK) << IP_FRAGOFF_SHIFT; }
2517 INLINE DWORD IP_TotalLen(ULPIP pIP) { return XCHG(pIP->TotalLen); }
2518 INLINE DWORD IP_MoreFragments(ULPIP pIP) { return (pIP->Flags & IP_MF_MASK) >> IP_MF_SHIFT; }
2519#endif
2520
2521#define PORT_TCPMUX 1
2522#define PORT_RJE 5
2523#define PORT_ECHO 7
2524#define PORT_DISCARD 9
2525#define PORT_USERS 11
2526#define PORT_DAYTIME 13
2527#define PORT_NETSTAT 15
2528#define PORT_QUOTE 17
2529#define PORT_CHARGEN 19
2530#define PORT_FTPDATA 20
2531#define PORT_FTP 21
2532#define PORT_TELNET 23
2533#define PORT_SMTP 25
2534#define PORT_NSWFE 27
2535#define PORT_MSGICP 29
2536#define PORT_MSGAUTH 31
2537#define PORT_DSP 33
2538#define PORT_PRTSERVER 35
2539#define PORT_TIME 37
2540#define PORT_RLP 39
2541#define PORT_GRAPHICS 41
2542#define PORT_NAMESERVER 42
2543#define PORT_NICNAME 43
2544#define PORT_MPMFLAGS 44
2545#define PORT_MPM 45
2546#define PORT_MPMSND 46
2547#define PORT_NIFTP 47
2548#define PORT_LOGIN 49
2549#define PORT_LAMAINT 51
2550#define PORT_DOMAIN 53
2551#define PORT_ISIGL 55
2552#define PORT_ANYTERMACC 57
2553#define PORT_ANYFILESYS 59
2554#define PORT_NIMAIL 61
2555#define PORT_VIAFTP 63
2556#define PORT_TACACSDS 65
2557#define PORT_BOOTPS 67
2558#define PORT_BOOTPC 68
2559#define PORT_TFTP 69
2560#define PORT_NETRJS1 71
2561#define PORT_NETRJS2 72
2562#define PORT_NETRJS3 73
2563#define PORT_NETRJS4 74
2564#define PORT_ANYDIALOUT 75
2565#define PORT_ANYRJE 77
2566#define PORT_FINGER 79
2567#define PORT_HTTP 80
2568#define PORT_HOSTS2NS 81
2569#define PORT_MITMLDEV1 83
2570#define PORT_MITMLDEV2 85
2571#define PORT_ANYTERMLINK 87
2572#define PORT_SUMITTG 89
2573#define PORT_MITDOV 91
2574#define PORT_DCP 93
2575#define PORT_SUPDUP 95
2576#define PORT_SWIFTRVF 97
2577#define PORT_TACNEWS 98
2578#define PORT_METAGRAM 99
2579#define PORT_NEWACCT 100
2580#define PORT_HOSTNAME 101
2581#define PORT_ISOTSAP 102
2582#define PORT_X400 103
2583#define PORT_X400SND 104
2584#define PORT_CSNETNS 105
2585#define PORT_RTELNET 107
2586#define PORT_POP2 109
2587#define PORT_POP3 110
2588#define PORT_SUNRPC 111
2589#define PORT_AUTH 113
2590#define PORT_SFTP 115
2591#define PORT_UUCPPATH 117
2592#define PORT_NNTP 119
2593#define PORT_ERPC 121
2594#define PORT_NTP 123
2595#define PORT_LOCUSMAP 125
2596#define PORT_LOCUSCON 127
2597#define PORT_PWDGEN 129
2598#define PORT_CISCOFNA 130
2599#define PORT_CISCOTNA 131
2600#define PORT_CISCOSYS 132
2601#define PORT_STATSRV 133
2602#define PORT_INGRESNET 134
2603#define PORT_LOCSRV 135
2604#define PORT_PROFILE 136
2605#define PORT_NETBIOSNS 137
2606#define PORT_NETBIOSDGM 138
2607#define PORT_NETBIOSSSN 139
2608#define PORT_EMFISDATA 140
2609#define PORT_EMFISCNTL 141
2610#define PORT_BLIDM 142
2611#define PORT_IMAP2 143
2612#define PORT_NEWS 144
2613#define PORT_UAAC 145
2614#define PORT_ISOTP0 146
2615#define PORT_ISOIP 147
2616#define PORT_CRONUS 148
2617#define PORT_AED512 149
2618#define PORT_SQLNET 150
2619#define PORT_HEMS 151
2620#define PORT_BFTP 152
2621#define PORT_SGMP 153
2622#define PORT_NETSCPROD 154
2623#define PORT_NETSCDEV 155
2624#define PORT_SQLSRV 156
2625#define PORT_KNETCMP 157
2626#define PORT_PCMAILSRV 158
2627#define PORT_NSSROUTING 159
2628#define PORT_SGMPTRAPS 160
2629#define PORT_SNMP 161
2630#define PORT_SNMPTRAP 162
2631#define PORT_CMIPMANAGE 163
2632#define PORT_CMIPAGENT 164
2633#define PORT_XNSCOURIER 165
2634#define PORT_SNET 166
2635#define PORT_NAMP 167
2636#define PORT_RSVD 168
2637#define PORT_SEND 169
2638#define PORT_PRINTSRV 170
2639#define PORT_MULTIPLEX 171
2640#define PORT_CL1 172
2641#define PORT_XYPLEXMUX 173
2642#define PORT_MAILQ 174
2643#define PORT_VMNET 175
2644#define PORT_GENRADMUX 176
2645#define PORT_XDMCP 177
2646#define PORT_NEXTSTEP 178
2647#define PORT_BGP 179
2648#define PORT_RIS 180
2649#define PORT_UNIFY 181
2650#define PORT_UNISYSCAM 182
2651#define PORT_OCBINDER 183
2652#define PORT_OCSERVER 184
2653#define PORT_REMOTEKIS 185
2654#define PORT_KIS 186
2655#define PORT_ACI 187
2656#define PORT_MUMPS 188
2657#define PORT_QFT 189
2658#define PORT_GACP 190
2659#define PORT_PROSPERO 191
2660#define PORT_OSUNMS 192
2661#define PORT_SRMP 193
2662#define PORT_IRC 194
2663#define PORT_DN6NLMAUD 195
2664#define PORT_DN6SMMRED 196
2665#define PORT_DLS 197
2666#define PORT_DLSMON 198
2667#define PORT_ATRMTP 201
2668#define PORT_ATNBP 202
2669#define PORT_AT3 203
2670#define PORT_ATECHO 204
2671#define PORT_AT5 205
2672#define PORT_ATZIS 206
2673#define PORT_AT7 207
2674#define PORT_AT8 208
2675#define PORT_SURMEAS 243
2676#define PORT_LINK 245
2677#define PORT_DSP3270 246
2678#define PORT_LDAP1 389
2679#define PORT_ISAKMP 500
2680#define PORT_REXEC 512
2681#define PORT_RLOGIN 513
2682#define PORT_RSH 514
2683#define PORT_LPD 515
2684#define PORT_RIP 520
2685#define PORT_TEMPO 526
2686#define PORT_COURIER 530
2687#define PORT_NETNEWS 532
2688#define PORT_UUCPD 540
2689#define PORT_KLOGIN 543
2690#define PORT_KSHELL 544
2691#define PORT_DSF 555
2692#define PORT_REMOTEEFS 556
2693#define PORT_CHSHELL 562
2694#define PORT_METER 570
2695#define PORT_PCSERVER 600
2696#define PORT_NQS 607
2697#define PORT_HMMP_INDICATION 612
2698#define PORT_HMMP_OPERATION 613
2699#define PORT_MDQS 666
2700#define PORT_LPD721 721
2701#define PORT_LPD722 722
2702#define PORT_LPD723 723
2703#define PORT_LPD724 724
2704#define PORT_LPD725 725
2705#define PORT_LPD726 726
2706#define PORT_LPD727 727
2707#define PORT_LPD728 728
2708#define PORT_LPD729 729
2709#define PORT_LPD730 730
2710#define PORT_LPD731 731
2711#define PORT_RFILE 750
2712#define PORT_PUMP 751
2713#define PORT_QRH 752
2714#define PORT_RRH 753
2715#define PORT_TELL 754
2716#define PORT_NLOGIN 758
2717#define PORT_CON 759
2718#define PORT_NS 760
2719#define PORT_RXE 761
2720#define PORT_QUOTAD 762
2721#define PORT_CYCLESERV 763
2722#define PORT_OMSERV 764
2723#define PORT_WEBSTER 765
2724#define PORT_PHONEBOOK 767
2725#define PORT_VID 769
2726#define PORT_RTIP 771
2727#define PORT_CYCLESERV2 772
2728#define PORT_SUBMIT 773
2729#define PORT_RPASSWD 774
2730#define PORT_ENTOMB 775
2731#define PORT_WPAGES 776
2732#define PORT_WPGS 780
2733#define PORT_MDBSDAEMON 800
2734#define PORT_DEVICE 801
2735#define PORT_MAITRD 997
2736#define PORT_BUSBOY 998
2737#define PORT_GARCON 999
2738#define PORT_NFS 2049
2739#define PORT_LDAP2 3268
2740#define PORT_PPTP 5678
2741
2742 typedef struct _RequestReplyFields {
2743 WORD ID;
2744 WORD SeqNo;
2745 } ReqReply;
2746
2747 typedef struct _ParameterProblemFields {
2748 BYTE Pointer;
2749 BYTE junk[3];
2750 } ParmProb;
2751
2752 typedef struct _TimestampFields {
2753 DWORD tsOrig;
2754 DWORD tsRecv;
2755 DWORD tsXmit;
2756 } TS;
2757
2758 typedef struct _RouterAnnounceHeaderFields {
2759 BYTE NumAddrs;
2760 BYTE AddrEntrySize;
2761 WORD Lifetime;
2762 } RouterAH;
2763
2764 typedef struct _RouterAnnounceEntry {
2765 DWORD Address;
2766 DWORD PreferenceLevel;
2767 } RouterAE;
2768
2769 typedef struct _ICMP {
2770 BYTE Type;
2771 BYTE Code;
2772 WORD Checksum;
2773 __C89_NAMELESS union {
2774 DWORD Unused;
2775 DWORD Address;
2776 ReqReply RR;
2777 ParmProb PP;
2778 RouterAH RAH;
2779 };
2780 __C89_NAMELESS union {
2781 TS Time;
2782 IP IP;
2783 RouterAE RAE[0];
2784 };
2785 } ICMP;
2786
2787 typedef ICMP *LPICMP;
2788 typedef ICMP UNALIGNED *ULPICMP;
2789#define ICMP_HEADER_LENGTH (8)
2790
2791#define ICMP_IP_DATA_LENGTH (8)
2792
2793#define ECHO_REPLY (0)
2794#define DESTINATION_UNREACHABLE (3)
2795#define SOURCE_QUENCH (4)
2796#define REDIRECT (5)
2797#define ECHO (8)
2798#define ROUTER_ADVERTISEMENT (9)
2799#define ROUTER_SOLICITATION (10)
2800#define TIME_EXCEEDED (11)
2801#define PARAMETER_PROBLEM (12)
2802#define TIMESTAMP (13)
2803#define TIMESTAMP_REPLY (14)
2804#define INFORMATION_REQUEST (15)
2805#define INFORMATION_REPLY (16)
2806#define ADDRESS_MASK_REQUEST (17)
2807#define ADDRESS_MASK_REPLY (18)
2808
2809 typedef struct __MIDL___MIDL_itf_netmon_0000_0018 {
2810 UCHAR ha_address[6];
2811 } HOST_ADDRESS;
2812
2813 typedef struct _IPXADDRESS {
2814 ULONG ipx_NetNumber;
2815 HOST_ADDRESS ipx_HostAddr;
2816 } IPXADDRESS;
2817
2818 typedef IPXADDRESS UNALIGNED *PIPXADDRESS;
2819
2820 typedef struct _NET_ADDRESS {
2821 IPXADDRESS na_IPXAddr;
2822 USHORT na_socket;
2823 } NET_ADDRESS;
2824
2825 typedef NET_ADDRESS UNALIGNED *UPNET_ADDRESS;
2826
2827 typedef struct __MIDL___MIDL_itf_netmon_0000_0019 {
2828 USHORT ipx_checksum;
2829 USHORT ipx_length;
2830 UCHAR ipx_xport_control;
2831 UCHAR ipx_packet_type;
2832 NET_ADDRESS ipx_dest;
2833 NET_ADDRESS ipx_source;
2834 } IPX_HDR;
2835
2836 typedef IPX_HDR UNALIGNED *ULPIPX_HDR;
2837
2838 typedef struct _SPX_HDR {
2839 IPX_HDR spx_idp_hdr;
2840 UCHAR spx_conn_ctrl;
2841 UCHAR spx_data_type;
2842 USHORT spx_src_conn_id;
2843 USHORT spx_dest_conn_id;
2844 USHORT spx_sequence_num;
2845 USHORT spx_ack_num;
2846 USHORT spx_alloc_num;
2847 } SPX_HDR;
2848
2849 typedef SPX_HDR UNALIGNED *PSPX_HDR;
2850
2851 typedef struct _TCP {
2852 WORD SrcPort;
2853 WORD DstPort;
2854 DWORD SeqNum;
2855 DWORD AckNum;
2856 BYTE DataOff;
2857 BYTE Flags;
2858 WORD Window;
2859 WORD Chksum;
2860 WORD UrgPtr;
2861 } TCP;
2862
2863 typedef TCP *LPTCP;
2864
2865 typedef TCP UNALIGNED *ULPTCP;
2866
2867#ifndef __CRT__NO_INLINE
2868 INLINE DWORD TCP_HdrLen(ULPTCP pTCP) { return (pTCP->DataOff & 0xf0) >> 2; }
2869 INLINE DWORD TCP_SrcPort(ULPTCP pTCP) { return XCHG(pTCP->SrcPort); }
2870 INLINE DWORD TCP_DstPort(ULPTCP pTCP) { return XCHG(pTCP->DstPort); }
2871#endif
2872
2873#define TCP_OPTION_ENDOFOPTIONS (0)
2874#define TCP_OPTION_NOP (1)
2875#define TCP_OPTION_MAXSEGSIZE (2)
2876#define TCP_OPTION_WSCALE (3)
2877#define TCP_OPTION_SACK_PERMITTED (4)
2878#define TCP_OPTION_SACK (5)
2879#define TCP_OPTION_TIMESTAMPS (8)
2880
2881#define TCP_FLAG_URGENT (0x20)
2882#define TCP_FLAG_ACK (0x10)
2883#define TCP_FLAG_PUSH (0x8)
2884#define TCP_FLAG_RESET (0x4)
2885#define TCP_FLAG_SYN (0x2)
2886#define TCP_FLAG_FIN (0x1)
2887#define TCP_RESERVED_MASK (0xfc0)
2888
2889#pragma pack(pop)
2890
2891#define DEFAULT_DELAYED_BUFFER_SIZE (1)
2892#define USE_DEFAULT_DRIVE_LETTER (0)
2893#define RTC_FRAME_SIZE_FULL (0)
2894
2895 extern RPC_IF_HANDLE __MIDL_itf_netmon_0000_v0_0_c_ifspec;
2896 extern RPC_IF_HANDLE __MIDL_itf_netmon_0000_v0_0_s_ifspec;
2897
2898#ifndef __IDelaydC_INTERFACE_DEFINED__
2899#define __IDelaydC_INTERFACE_DEFINED__
2900 EXTERN_C const IID IID_IDelaydC;
2901#if defined(__cplusplus) && !defined(CINTERFACE)
2902 struct IDelaydC : public IUnknown {
2903 public:
2904 virtual HRESULT WINAPI Connect(HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID UserContext,HBLOB hErrorBlob) = 0;
2905 virtual HRESULT WINAPI Disconnect(void) = 0;
2906 virtual HRESULT WINAPI QueryStatus(NETWORKSTATUS *pNetworkStatus) = 0;
2907 virtual HRESULT WINAPI Configure(HBLOB hConfigurationBlob,HBLOB hErrorBlob) = 0;
2908 virtual HRESULT WINAPI Start(char *pFileName) = 0;
2909 virtual HRESULT WINAPI Pause(void) = 0;
2910 virtual HRESULT WINAPI Resume(void) = 0;
2911 virtual HRESULT WINAPI Stop(LPSTATISTICS lpStats) = 0;
2912 virtual HRESULT WINAPI GetControlState(WINBOOL *IsRunnning,WINBOOL *IsPaused) = 0;
2913 virtual HRESULT WINAPI GetTotalStatistics(LPSTATISTICS lpStats,WINBOOL fClearAfterReading) = 0;
2914 virtual HRESULT WINAPI GetConversationStatistics(DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading) = 0;
2915 virtual HRESULT WINAPI InsertSpecialFrame(DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength) = 0;
2916 virtual HRESULT WINAPI QueryStations(QUERYTABLE *lpQueryTable) = 0;
2917 };
2918#else
2919 typedef struct IDelaydCVtbl {
2920 BEGIN_INTERFACE
2921 HRESULT (WINAPI *QueryInterface)(IDelaydC *This,REFIID riid,void **ppvObject);
2922 ULONG (WINAPI *AddRef)(IDelaydC *This);
2923 ULONG (WINAPI *Release)(IDelaydC *This);
2924 HRESULT (WINAPI *Connect)(IDelaydC *This,HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID UserContext,HBLOB hErrorBlob);
2925 HRESULT (WINAPI *Disconnect)(IDelaydC *This);
2926 HRESULT (WINAPI *QueryStatus)(IDelaydC *This,NETWORKSTATUS *pNetworkStatus);
2927 HRESULT (WINAPI *Configure)(IDelaydC *This,HBLOB hConfigurationBlob,HBLOB hErrorBlob);
2928 HRESULT (WINAPI *Start)(IDelaydC *This,char *pFileName);
2929 HRESULT (WINAPI *Pause)(IDelaydC *This);
2930 HRESULT (WINAPI *Resume)(IDelaydC *This);
2931 HRESULT (WINAPI *Stop)(IDelaydC *This,LPSTATISTICS lpStats);
2932 HRESULT (WINAPI *GetControlState)(IDelaydC *This,WINBOOL *IsRunnning,WINBOOL *IsPaused);
2933 HRESULT (WINAPI *GetTotalStatistics)(IDelaydC *This,LPSTATISTICS lpStats,WINBOOL fClearAfterReading);
2934 HRESULT (WINAPI *GetConversationStatistics)(IDelaydC *This,DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading);
2935 HRESULT (WINAPI *InsertSpecialFrame)(IDelaydC *This,DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength);
2936 HRESULT (WINAPI *QueryStations)(IDelaydC *This,QUERYTABLE *lpQueryTable);
2937 END_INTERFACE
2938 } IDelaydCVtbl;
2939 struct IDelaydC {
2940 CONST_VTBL struct IDelaydCVtbl *lpVtbl;
2941 };
2942#ifdef COBJMACROS
2943#define IDelaydC_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
2944#define IDelaydC_AddRef(This) (This)->lpVtbl->AddRef(This)
2945#define IDelaydC_Release(This) (This)->lpVtbl->Release(This)
2946#define IDelaydC_Connect(This,hInputBlob,StatusCallbackProc,UserContext,hErrorBlob) (This)->lpVtbl->Connect(This,hInputBlob,StatusCallbackProc,UserContext,hErrorBlob)
2947#define IDelaydC_Disconnect(This) (This)->lpVtbl->Disconnect(This)
2948#define IDelaydC_QueryStatus(This,pNetworkStatus) (This)->lpVtbl->QueryStatus(This,pNetworkStatus)
2949#define IDelaydC_Configure(This,hConfigurationBlob,hErrorBlob) (This)->lpVtbl->Configure(This,hConfigurationBlob,hErrorBlob)
2950#define IDelaydC_Start(This,pFileName) (This)->lpVtbl->Start(This,pFileName)
2951#define IDelaydC_Pause(This) (This)->lpVtbl->Pause(This)
2952#define IDelaydC_Resume(This) (This)->lpVtbl->Resume(This)
2953#define IDelaydC_Stop(This,lpStats) (This)->lpVtbl->Stop(This,lpStats)
2954#define IDelaydC_GetControlState(This,IsRunnning,IsPaused) (This)->lpVtbl->GetControlState(This,IsRunnning,IsPaused)
2955#define IDelaydC_GetTotalStatistics(This,lpStats,fClearAfterReading) (This)->lpVtbl->GetTotalStatistics(This,lpStats,fClearAfterReading)
2956#define IDelaydC_GetConversationStatistics(This,nSessions,lpSessionStats,nStations,lpStationStats,fClearAfterReading) (This)->lpVtbl->GetConversationStatistics(This,nSessions,lpSessionStats,nStations,lpStationStats,fClearAfterReading)
2957#define IDelaydC_InsertSpecialFrame(This,FrameType,Flags,pUserData,UserDataLength) (This)->lpVtbl->InsertSpecialFrame(This,FrameType,Flags,pUserData,UserDataLength)
2958#define IDelaydC_QueryStations(This,lpQueryTable) (This)->lpVtbl->QueryStations(This,lpQueryTable)
2959#endif
2960#endif
2961 HRESULT WINAPI IDelaydC_Connect_Proxy(IDelaydC *This,HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID UserContext,HBLOB hErrorBlob);
2962 void __RPC_STUB IDelaydC_Connect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2963 HRESULT WINAPI IDelaydC_Disconnect_Proxy(IDelaydC *This);
2964 void __RPC_STUB IDelaydC_Disconnect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2965 HRESULT WINAPI IDelaydC_QueryStatus_Proxy(IDelaydC *This,NETWORKSTATUS *pNetworkStatus);
2966 void __RPC_STUB IDelaydC_QueryStatus_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2967 HRESULT WINAPI IDelaydC_Configure_Proxy(IDelaydC *This,HBLOB hConfigurationBlob,HBLOB hErrorBlob);
2968 void __RPC_STUB IDelaydC_Configure_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2969 HRESULT WINAPI IDelaydC_Start_Proxy(IDelaydC *This,char *pFileName);
2970 void __RPC_STUB IDelaydC_Start_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2971 HRESULT WINAPI IDelaydC_Pause_Proxy(IDelaydC *This);
2972 void __RPC_STUB IDelaydC_Pause_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2973 HRESULT WINAPI IDelaydC_Resume_Proxy(IDelaydC *This);
2974 void __RPC_STUB IDelaydC_Resume_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2975 HRESULT WINAPI IDelaydC_Stop_Proxy(IDelaydC *This,LPSTATISTICS lpStats);
2976 void __RPC_STUB IDelaydC_Stop_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2977 HRESULT WINAPI IDelaydC_GetControlState_Proxy(IDelaydC *This,WINBOOL *IsRunnning,WINBOOL *IsPaused);
2978 void __RPC_STUB IDelaydC_GetControlState_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2979 HRESULT WINAPI IDelaydC_GetTotalStatistics_Proxy(IDelaydC *This,LPSTATISTICS lpStats,WINBOOL fClearAfterReading);
2980 void __RPC_STUB IDelaydC_GetTotalStatistics_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2981 HRESULT WINAPI IDelaydC_GetConversationStatistics_Proxy(IDelaydC *This,DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading);
2982 void __RPC_STUB IDelaydC_GetConversationStatistics_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2983 HRESULT WINAPI IDelaydC_InsertSpecialFrame_Proxy(IDelaydC *This,DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength);
2984 void __RPC_STUB IDelaydC_InsertSpecialFrame_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2985 HRESULT WINAPI IDelaydC_QueryStations_Proxy(IDelaydC *This,QUERYTABLE *lpQueryTable);
2986 void __RPC_STUB IDelaydC_QueryStations_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
2987#endif
2988
2989#define DEFAULT_RTC_BUFFER_SIZE (0x100000)
2990
2991 extern RPC_IF_HANDLE __MIDL_itf_netmon_0010_v0_0_c_ifspec;
2992 extern RPC_IF_HANDLE __MIDL_itf_netmon_0010_v0_0_s_ifspec;
2993
2994#ifndef __IRTC_INTERFACE_DEFINED__
2995#define __IRTC_INTERFACE_DEFINED__
2996 EXTERN_C const IID IID_IRTC;
2997#if defined(__cplusplus) && !defined(CINTERFACE)
2998 struct IRTC : public IUnknown {
2999 public:
3000 virtual HRESULT WINAPI Connect(HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID FramesCallbackProc,LPVOID UserContext,HBLOB hErrorBlob) = 0;
3001 virtual HRESULT WINAPI Disconnect(void) = 0;
3002 virtual HRESULT WINAPI QueryStatus(NETWORKSTATUS *pNetworkStatus) = 0;
3003 virtual HRESULT WINAPI Configure(HBLOB hConfigurationBlob,HBLOB hErrorBlob) = 0;
3004 virtual HRESULT WINAPI Start(void) = 0;
3005 virtual HRESULT WINAPI Pause(void) = 0;
3006 virtual HRESULT WINAPI Resume(void) = 0;
3007 virtual HRESULT WINAPI Stop(void) = 0;
3008 virtual HRESULT WINAPI GetControlState(WINBOOL *IsRunnning,WINBOOL *IsPaused) = 0;
3009 virtual HRESULT WINAPI GetTotalStatistics(LPSTATISTICS lpStats,WINBOOL fClearAfterReading) = 0;
3010 virtual HRESULT WINAPI GetConversationStatistics(DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading) = 0;
3011 virtual HRESULT WINAPI InsertSpecialFrame(DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength) = 0;
3012 virtual HRESULT WINAPI QueryStations(QUERYTABLE *lpQueryTable) = 0;
3013 };
3014#else
3015 typedef struct IRTCVtbl {
3016 BEGIN_INTERFACE
3017 HRESULT (WINAPI *QueryInterface)(IRTC *This,REFIID riid,void **ppvObject);
3018 ULONG (WINAPI *AddRef)(IRTC *This);
3019 ULONG (WINAPI *Release)(IRTC *This);
3020 HRESULT (WINAPI *Connect)(IRTC *This,HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID FramesCallbackProc,LPVOID UserContext,HBLOB hErrorBlob);
3021 HRESULT (WINAPI *Disconnect)(IRTC *This);
3022 HRESULT (WINAPI *QueryStatus)(IRTC *This,NETWORKSTATUS *pNetworkStatus);
3023 HRESULT (WINAPI *Configure)(IRTC *This,HBLOB hConfigurationBlob,HBLOB hErrorBlob);
3024 HRESULT (WINAPI *Start)(IRTC *This);
3025 HRESULT (WINAPI *Pause)(IRTC *This);
3026 HRESULT (WINAPI *Resume)(IRTC *This);
3027 HRESULT (WINAPI *Stop)(IRTC *This);
3028 HRESULT (WINAPI *GetControlState)(IRTC *This,WINBOOL *IsRunnning,WINBOOL *IsPaused);
3029 HRESULT (WINAPI *GetTotalStatistics)(IRTC *This,LPSTATISTICS lpStats,WINBOOL fClearAfterReading);
3030 HRESULT (WINAPI *GetConversationStatistics)(IRTC *This,DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading);
3031 HRESULT (WINAPI *InsertSpecialFrame)(IRTC *This,DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength);
3032 HRESULT (WINAPI *QueryStations)(IRTC *This,QUERYTABLE *lpQueryTable);
3033 END_INTERFACE
3034 } IRTCVtbl;
3035 struct IRTC {
3036 CONST_VTBL struct IRTCVtbl *lpVtbl;
3037 };
3038#ifdef COBJMACROS
3039#define IRTC_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
3040#define IRTC_AddRef(This) (This)->lpVtbl->AddRef(This)
3041#define IRTC_Release(This) (This)->lpVtbl->Release(This)
3042#define IRTC_Connect(This,hInputBlob,StatusCallbackProc,FramesCallbackProc,UserContext,hErrorBlob) (This)->lpVtbl->Connect(This,hInputBlob,StatusCallbackProc,FramesCallbackProc,UserContext,hErrorBlob)
3043#define IRTC_Disconnect(This) (This)->lpVtbl->Disconnect(This)
3044#define IRTC_QueryStatus(This,pNetworkStatus) (This)->lpVtbl->QueryStatus(This,pNetworkStatus)
3045#define IRTC_Configure(This,hConfigurationBlob,hErrorBlob) (This)->lpVtbl->Configure(This,hConfigurationBlob,hErrorBlob)
3046#define IRTC_Start(This) (This)->lpVtbl->Start(This)
3047#define IRTC_Pause(This) (This)->lpVtbl->Pause(This)
3048#define IRTC_Resume(This) (This)->lpVtbl->Resume(This)
3049#define IRTC_Stop(This) (This)->lpVtbl->Stop(This)
3050#define IRTC_GetControlState(This,IsRunnning,IsPaused) (This)->lpVtbl->GetControlState(This,IsRunnning,IsPaused)
3051#define IRTC_GetTotalStatistics(This,lpStats,fClearAfterReading) (This)->lpVtbl->GetTotalStatistics(This,lpStats,fClearAfterReading)
3052#define IRTC_GetConversationStatistics(This,nSessions,lpSessionStats,nStations,lpStationStats,fClearAfterReading) (This)->lpVtbl->GetConversationStatistics(This,nSessions,lpSessionStats,nStations,lpStationStats,fClearAfterReading)
3053#define IRTC_InsertSpecialFrame(This,FrameType,Flags,pUserData,UserDataLength) (This)->lpVtbl->InsertSpecialFrame(This,FrameType,Flags,pUserData,UserDataLength)
3054#define IRTC_QueryStations(This,lpQueryTable) (This)->lpVtbl->QueryStations(This,lpQueryTable)
3055#endif
3056#endif
3057 HRESULT WINAPI IRTC_Connect_Proxy(IRTC *This,HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID FramesCallbackProc,LPVOID UserContext,HBLOB hErrorBlob);
3058 void __RPC_STUB IRTC_Connect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3059 HRESULT WINAPI IRTC_Disconnect_Proxy(IRTC *This);
3060 void __RPC_STUB IRTC_Disconnect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3061 HRESULT WINAPI IRTC_QueryStatus_Proxy(IRTC *This,NETWORKSTATUS *pNetworkStatus);
3062 void __RPC_STUB IRTC_QueryStatus_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3063 HRESULT WINAPI IRTC_Configure_Proxy(IRTC *This,HBLOB hConfigurationBlob,HBLOB hErrorBlob);
3064 void __RPC_STUB IRTC_Configure_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3065 HRESULT WINAPI IRTC_Start_Proxy(IRTC *This);
3066 void __RPC_STUB IRTC_Start_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3067 HRESULT WINAPI IRTC_Pause_Proxy(IRTC *This);
3068 void __RPC_STUB IRTC_Pause_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3069 HRESULT WINAPI IRTC_Resume_Proxy(IRTC *This);
3070 void __RPC_STUB IRTC_Resume_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3071 HRESULT WINAPI IRTC_Stop_Proxy(IRTC *This);
3072 void __RPC_STUB IRTC_Stop_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3073 HRESULT WINAPI IRTC_GetControlState_Proxy(IRTC *This,WINBOOL *IsRunnning,WINBOOL *IsPaused);
3074 void __RPC_STUB IRTC_GetControlState_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3075 HRESULT WINAPI IRTC_GetTotalStatistics_Proxy(IRTC *This,LPSTATISTICS lpStats,WINBOOL fClearAfterReading);
3076 void __RPC_STUB IRTC_GetTotalStatistics_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3077 HRESULT WINAPI IRTC_GetConversationStatistics_Proxy(IRTC *This,DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading);
3078 void __RPC_STUB IRTC_GetConversationStatistics_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3079 HRESULT WINAPI IRTC_InsertSpecialFrame_Proxy(IRTC *This,DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength);
3080 void __RPC_STUB IRTC_InsertSpecialFrame_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3081 HRESULT WINAPI IRTC_QueryStations_Proxy(IRTC *This,QUERYTABLE *lpQueryTable);
3082 void __RPC_STUB IRTC_QueryStations_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3083#endif
3084
3085 extern RPC_IF_HANDLE __MIDL_itf_netmon_0012_v0_0_c_ifspec;
3086 extern RPC_IF_HANDLE __MIDL_itf_netmon_0012_v0_0_s_ifspec;
3087
3088#ifndef __IStats_INTERFACE_DEFINED__
3089#define __IStats_INTERFACE_DEFINED__
3090 EXTERN_C const IID IID_IStats;
3091#if defined(__cplusplus) && !defined(CINTERFACE)
3092 struct IStats : public IUnknown {
3093 public:
3094 virtual HRESULT WINAPI Connect(HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID UserContext,HBLOB hErrorBlob) = 0;
3095 virtual HRESULT WINAPI Disconnect(void) = 0;
3096 virtual HRESULT WINAPI QueryStatus(NETWORKSTATUS *pNetworkStatus) = 0;
3097 virtual HRESULT WINAPI Configure(HBLOB hConfigurationBlob,HBLOB hErrorBlob) = 0;
3098 virtual HRESULT WINAPI Start(void) = 0;
3099 virtual HRESULT WINAPI Pause(void) = 0;
3100 virtual HRESULT WINAPI Resume(void) = 0;
3101 virtual HRESULT WINAPI Stop(void) = 0;
3102 virtual HRESULT WINAPI GetControlState(WINBOOL *IsRunnning,WINBOOL *IsPaused) = 0;
3103 virtual HRESULT WINAPI GetTotalStatistics(LPSTATISTICS lpStats,WINBOOL fClearAfterReading) = 0;
3104 virtual HRESULT WINAPI GetConversationStatistics(DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading) = 0;
3105 virtual HRESULT WINAPI InsertSpecialFrame(DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength) = 0;
3106 virtual HRESULT WINAPI QueryStations(QUERYTABLE *lpQueryTable) = 0;
3107 };
3108#else
3109 typedef struct IStatsVtbl {
3110 BEGIN_INTERFACE
3111 HRESULT (WINAPI *QueryInterface)(IStats *This,REFIID riid,void **ppvObject);
3112 ULONG (WINAPI *AddRef)(IStats *This);
3113 ULONG (WINAPI *Release)(IStats *This);
3114 HRESULT (WINAPI *Connect)(IStats *This,HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID UserContext,HBLOB hErrorBlob);
3115 HRESULT (WINAPI *Disconnect)(IStats *This);
3116 HRESULT (WINAPI *QueryStatus)(IStats *This,NETWORKSTATUS *pNetworkStatus);
3117 HRESULT (WINAPI *Configure)(IStats *This,HBLOB hConfigurationBlob,HBLOB hErrorBlob);
3118 HRESULT (WINAPI *Start)(IStats *This);
3119 HRESULT (WINAPI *Pause)(IStats *This);
3120 HRESULT (WINAPI *Resume)(IStats *This);
3121 HRESULT (WINAPI *Stop)(IStats *This);
3122 HRESULT (WINAPI *GetControlState)(IStats *This,WINBOOL *IsRunnning,WINBOOL *IsPaused);
3123 HRESULT (WINAPI *GetTotalStatistics)(IStats *This,LPSTATISTICS lpStats,WINBOOL fClearAfterReading);
3124 HRESULT (WINAPI *GetConversationStatistics)(IStats *This,DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading);
3125 HRESULT (WINAPI *InsertSpecialFrame)(IStats *This,DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength);
3126 HRESULT (WINAPI *QueryStations)(IStats *This,QUERYTABLE *lpQueryTable);
3127 END_INTERFACE
3128 } IStatsVtbl;
3129 struct IStats {
3130 CONST_VTBL struct IStatsVtbl *lpVtbl;
3131 };
3132#ifdef COBJMACROS
3133#define IStats_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
3134#define IStats_AddRef(This) (This)->lpVtbl->AddRef(This)
3135#define IStats_Release(This) (This)->lpVtbl->Release(This)
3136#define IStats_Connect(This,hInputBlob,StatusCallbackProc,UserContext,hErrorBlob) (This)->lpVtbl->Connect(This,hInputBlob,StatusCallbackProc,UserContext,hErrorBlob)
3137#define IStats_Disconnect(This) (This)->lpVtbl->Disconnect(This)
3138#define IStats_QueryStatus(This,pNetworkStatus) (This)->lpVtbl->QueryStatus(This,pNetworkStatus)
3139#define IStats_Configure(This,hConfigurationBlob,hErrorBlob) (This)->lpVtbl->Configure(This,hConfigurationBlob,hErrorBlob)
3140#define IStats_Start(This) (This)->lpVtbl->Start(This)
3141#define IStats_Pause(This) (This)->lpVtbl->Pause(This)
3142#define IStats_Resume(This) (This)->lpVtbl->Resume(This)
3143#define IStats_Stop(This) (This)->lpVtbl->Stop(This)
3144#define IStats_GetControlState(This,IsRunnning,IsPaused) (This)->lpVtbl->GetControlState(This,IsRunnning,IsPaused)
3145#define IStats_GetTotalStatistics(This,lpStats,fClearAfterReading) (This)->lpVtbl->GetTotalStatistics(This,lpStats,fClearAfterReading)
3146#define IStats_GetConversationStatistics(This,nSessions,lpSessionStats,nStations,lpStationStats,fClearAfterReading) (This)->lpVtbl->GetConversationStatistics(This,nSessions,lpSessionStats,nStations,lpStationStats,fClearAfterReading)
3147#define IStats_InsertSpecialFrame(This,FrameType,Flags,pUserData,UserDataLength) (This)->lpVtbl->InsertSpecialFrame(This,FrameType,Flags,pUserData,UserDataLength)
3148#define IStats_QueryStations(This,lpQueryTable) (This)->lpVtbl->QueryStations(This,lpQueryTable)
3149#endif
3150#endif
3151 HRESULT WINAPI IStats_Connect_Proxy(IStats *This,HBLOB hInputBlob,LPVOID StatusCallbackProc,LPVOID UserContext,HBLOB hErrorBlob);
3152 void __RPC_STUB IStats_Connect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3153 HRESULT WINAPI IStats_Disconnect_Proxy(IStats *This);
3154 void __RPC_STUB IStats_Disconnect_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3155 HRESULT WINAPI IStats_QueryStatus_Proxy(IStats *This,NETWORKSTATUS *pNetworkStatus);
3156 void __RPC_STUB IStats_QueryStatus_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3157 HRESULT WINAPI IStats_Configure_Proxy(IStats *This,HBLOB hConfigurationBlob,HBLOB hErrorBlob);
3158 void __RPC_STUB IStats_Configure_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3159 HRESULT WINAPI IStats_Start_Proxy(IStats *This);
3160 void __RPC_STUB IStats_Start_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3161 HRESULT WINAPI IStats_Pause_Proxy(IStats *This);
3162 void __RPC_STUB IStats_Pause_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3163 HRESULT WINAPI IStats_Resume_Proxy(IStats *This);
3164 void __RPC_STUB IStats_Resume_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3165 HRESULT WINAPI IStats_Stop_Proxy(IStats *This);
3166 void __RPC_STUB IStats_Stop_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3167 HRESULT WINAPI IStats_GetControlState_Proxy(IStats *This,WINBOOL *IsRunnning,WINBOOL *IsPaused);
3168 void __RPC_STUB IStats_GetControlState_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3169 HRESULT WINAPI IStats_GetTotalStatistics_Proxy(IStats *This,LPSTATISTICS lpStats,WINBOOL fClearAfterReading);
3170 void __RPC_STUB IStats_GetTotalStatistics_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3171 HRESULT WINAPI IStats_GetConversationStatistics_Proxy(IStats *This,DWORD *nSessions,LPSESSIONSTATS lpSessionStats,DWORD *nStations,LPSTATIONSTATS lpStationStats,WINBOOL fClearAfterReading);
3172 void __RPC_STUB IStats_GetConversationStatistics_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3173 HRESULT WINAPI IStats_InsertSpecialFrame_Proxy(IStats *This,DWORD FrameType,DWORD Flags,BYTE *pUserData,DWORD UserDataLength);
3174 void __RPC_STUB IStats_InsertSpecialFrame_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3175 HRESULT WINAPI IStats_QueryStations_Proxy(IStats *This,QUERYTABLE *lpQueryTable);
3176 void __RPC_STUB IStats_QueryStations_Stub(IRpcStubBuffer *This,IRpcChannelBuffer *_pRpcChannelBuffer,PRPC_MESSAGE _pRpcMessage,DWORD *_pdwStubPhase);
3177#endif
3178
3179#pragma pack()
3180
3181 extern RPC_IF_HANDLE __MIDL_itf_netmon_0014_v0_0_c_ifspec;
3182 extern RPC_IF_HANDLE __MIDL_itf_netmon_0014_v0_0_s_ifspec;
3183
3184#ifdef __cplusplus
3185}
3186#endif
3187#endif
Note: See TracBrowser for help on using the repository browser.