Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

# _ADAPTER Struct Reference
[Packet.dll definitions and data structures]

Describes an opened network adapter. More...

`#include <Packet32.h>`

## Data Fields
HANDLE | hFile
| Handle to an open instance of the NPF driver.
CHAR | SymbolicLink [MAX_LINK_NAME_LENGTH]
| A string containing the name of the network adapter currently opened.
int | NumWrites
HANDLE | ReadEvent
UINT | ReadTimeOut
CHAR | Name [ADAPTER_NAME_LENGTH]
PWAN_ADAPTER | pWanAdapter
UINT | Flags
| Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API.

## Detailed Description

Describes an opened network adapter.

This structure is the most important for the functioning of packet.dll, but the great part of its fields should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters

Definition at line 249 of file Packet32.h.

## Field Documentation

UINT Flags

| Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. Definition at line 266 of file Packet32.h. Referenced by PacketCloseAdapter(), PacketGetStats(), PacketGetStatsEx(), PacketIsDumpEnded(), PacketOpenAdapter(), PacketRequest(), PacketSendPacket(), PacketSendPackets(), PacketSetBpf(), PacketSetBuff(), PacketSetDumpLimits(), PacketSetDumpName(), PacketSetHwFilter(), PacketSetMinToCopy(), PacketSetNumWrites(), PacketSetReadTimeout(), and PacketSetSnapLen().

HANDLE hFile

| Handle to an open instance of the NPF driver. Definition at line 250 of file Packet32.h. Referenced by main(), PacketCloseAdapter(), PacketGetStats(), PacketGetStatsEx(), PacketIsDumpEnded(), PacketOpenAdapterNPF(), PacketReceivePacket(), PacketRequest(), PacketSendPacket(), PacketSendPackets(), PacketSetBpf(), PacketSetBuff(), PacketSetDumpLimits(), PacketSetDumpName(), PacketSetMinToCopy(), PacketSetMode(), PacketSetNumWrites(), PacketSetReadEvt(), and PacketSetReadTimeout().

CHAR Name[ADAPTER_NAME_LENGTH]

| Definition at line 264 of file Packet32.h. Referenced by PacketCloseAdapter(), PacketGetNetType(), PacketOpenAdapter(), and PacketOpenAdapterNPF().

int NumWrites

| For internal use only. Number of times a packets written on this adapter will be repeated on the wire. Definition at line 252 of file Packet32.h. Referenced by PacketOpenAdapterNPF().

PWAN_ADAPTER pWanAdapter

| Definition at line 265 of file Packet32.h. Referenced by PacketCloseAdapter(), PacketGetStats(), PacketGetStatsEx(), PacketOpenAdapter(), PacketReceivePacket(), PacketSetBpf(), PacketSetBuff(), PacketSetMinToCopy(), PacketSetMode(), and PacketSetReadTimeout().

HANDLE ReadEvent

| A notification event associated with the read calls on the adapter. It can be passed to standard Win32 functions (like WaitForSingleObject or WaitForMultipleObjects) to wait until the driver's buffer contains some data. It is particularly useful in GUI applications that need to wait concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy() function can be used to define the minimum amount of data in the kernel buffer that will cause the event to be signalled. Definition at line 254 of file Packet32.h. Referenced by PacketCloseAdapter(), PacketGetReadEvent(), PacketIsDumpEnded(), PacketOpenAdapter(), PacketReceivePacket(), and PacketSetReadEvt().

UINT ReadTimeOut

| For internal use only. The amount of time after which a read on the driver will be released and ReadEvent will be signaled, also if no packets were captured Definition at line 262 of file Packet32.h. Referenced by PacketReceivePacket(), PacketSetReadEvt(), and PacketSetReadTimeout().

CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]

| A string containing the name of the network adapter currently opened. Definition at line 251 of file Packet32.h. Referenced by PacketOpenAdapterNPF().

The documentation for this struct was generated from the following file:

- Packet32.h

documentation. Copyright (c) 2002-2003 Politecnico di Torino. All rights reserved.