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

# __CPU_Private_Data Struct Reference
[NPF structures and definitions]

Kernel buffer of each CPU. More...

`#include <Packet.h>`

## Data Fields
ULONG | P
| Zero-based index of the producer in the buffer. It indicates the first free byte to be written.
ULONG | C
| Zero-based index of the consumer in the buffer. It indicates the first free byte to be read.
ULONG | Free
| Number of the free bytes in the buffer.
PUCHAR | Buffer
| Pointer to the kernel buffer used to capture packets.
ULONG | Accepted
ULONG | Received
ULONG | Dropped
ULONG | Processing
| Flag. If set to 1, it indicates that the tap is processing a packet on the CPU this structure is referring to.
PMDL | TransferMdl1
| MDL used to map the portion of the buffer that will contain an incoming packet.
PMDL | TransferMdl2
| Second MDL used to map the portion of the buffer that will contain an incoming packet.
ULONG | NewP
| Used by NdisTransferData() (when we call NdisTransferData, p index must be updated only in the TransferDataComplete.

## Detailed Description

Kernel buffer of each CPU.

Structure containing the kernel buffer (and other CPU related fields) used to capture packets.

Definition at line 281 of file Packet.h.

## Field Documentation

ULONG Accepted

| Number of packet that current capture instance acepted, from its opening. A packet is accepted if it passes the filter and fits in the buffer. Accepted packets are the ones that reach the application. This number is related to the particular CPU this structure is referring to. Definition at line 287 of file Packet.h. Referenced by NPF_IoControl(), NPF_tap(), and NPF_TransferDataComplete().

PUCHAR Buffer

| Pointer to the kernel buffer used to capture packets. Definition at line 286 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), and NPF_IoControl().

ULONG C

| Zero-based index of the consumer in the buffer. It indicates the first free byte to be read. Definition at line 284 of file Packet.h. Referenced by NPF_IoControl().

ULONG Dropped

| Number of packet that current instance had to drop, from its opening. A packet is dropped if there is no more space to store it in the circular buffer that the driver associates to current instance. This number is related to the particular CPU this structure is referring to. Definition at line 295 of file Packet.h. Referenced by NPF_IoControl(), and NPF_tap().

ULONG Free

| Number of the free bytes in the buffer. Definition at line 285 of file Packet.h. Referenced by NPF_IoControl(), and NPF_Read().

ULONG NewP

| Used by NdisTransferData() (when we call NdisTransferData, p index must be updated only in the TransferDataComplete. Definition at line 302 of file Packet.h.

ULONG P

| Zero-based index of the producer in the buffer. It indicates the first free byte to be written. Definition at line 283 of file Packet.h. Referenced by NPF_IoControl().

ULONG Processing

| Flag. If set to 1, it indicates that the tap is processing a packet on the CPU this structure is referring to. Definition at line 299 of file Packet.h. Referenced by NPF_IoControl(), and NPF_tap().

ULONG Received

| Number of packets received by current instance from its opening, i.e. number of packet received by the network adapter since the beginning of the capture/monitoring/dump session. This number is related to the particular CPU this structure is referring to. Definition at line 291 of file Packet.h. Referenced by NPF_IoControl(), and NPF_tap().

PMDL TransferMdl1

| MDL used to map the portion of the buffer that will contain an incoming packet. Definition at line 300 of file Packet.h. Referenced by NPF_TransferDataComplete().

PMDL TransferMdl2

| Second MDL used to map the portion of the buffer that will contain an incoming packet. Definition at line 301 of file Packet.h. Referenced by NPF_TransferDataComplete().

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

- Packet.h

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