Header prepended to each packet during reception and transmission. More...
#include <TcApi.h>
Data Fields | |
ULONGLONG | Timestamp |
ULONG | Flags |
USHORT | Length |
USHORT | CapturedLength |
ULONG | Errors |
ULONG | Reserved0 |
Header prepended to each packet during reception and transmission.
On reception, this header is prepended to each packet, and it's generated by either the hardware or the underlying capture driver. On transmission, this header should be generated by the transmission application and then passed to this library together with the packet payload.
ULONGLONG TC_PACKET_HEADER::Timestamp |
On reception, the timestamp of the packet, with nanosecond precision. The timestamp is taken when the first byte of the MAC header is received. The timestamp is the number of nanoseconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.
On transmission, the scheduled time for the transmission of the packet, with nanosecond precision. The Flags field defines the scheduling policy of the packet and how the timestamp will be interpreted by the underlying transmission engine or hardware.
The timestamp is the number of nanoseconds elapsed since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.
ULONG TC_PACKET_HEADER::Flags |
On reception, an OR combination of the following flags:
On transmission, an OR combination of the following flags should be used:
USHORT TC_PACKET_HEADER::Length |
On reception, the original length of the packet, computed from the beginning of the MAC header (i.e. MAC destination address) to the end of the L2 payload. This field includes the FCS if the TC_PH_FLAGS_CHECKSUM bit is set in the Flags field. If snapshot is enabled (please see TC_INST_FT_SNAPLEN), the captured part of the packet available after this header can be less than Length bytes. Please use CapturedLength to obtain the actual number of captured bytes.
On transmission, the length of the packet to be transmitted, computed from the beginning of the MAC header (i.e. MAC destination address) to the end of the L2 payload. This field includes the FCS if the TC_PH_FLAGS_CHECKSUM bit is set in the Flags field.
On reception, the captured length of the packet, i.e. the number of packets bytes actually available after this header. This value can be less than the original length of the packet (stored in the Length field) if snapshot is enabled (please see TC_INST_FT_SNAPLEN). The value of this field is always less or equal to Length.
On transmission, this field should be set to the same value as Length.
ULONG TC_PACKET_HEADER::Errors |
On reception, it contains a combination of hardware errors during the reception of the packet. The packet had a reception error if this field is different from 0. In case of errors, it's an OR combination of the following bit values
On transmission, it should be set to 0.
On reception, the value of this field should be ignored.
On transmission, it should be set to 0.
TurboCap API documentation. Copyright (c) 2007-2008 CACE Technologies. All rights reserved.