Data Structures | |
struct | TC_PACKET_HEADER |
Header prepended to each packet during reception and transmission. More... | |
struct | TC_LINK_INFO |
Link information on a physical port. More... | |
struct | PTC_AUTONEG_PARAMETERS |
Structure used with TcPortQueryAutonegotiationParameters and TcPortSetAutonegotiationParameters. More... | |
Defines | |
#define | TC_PH_FLAGS_CHECKSUM 0x00000001 |
The packet contain the FCS at the end of the packet. | |
#define | TC_TX_SCHEDULING_MODE_NO_SCHED 0x00 |
The packet will be transmitted without any scheduling policy i.e. as soon as possible, respecting the minimum interframe gap (IFG) of the link layer. The TC_PACKET_HEADER::Timestamp field is ignored by the transmission scheduler. | |
#define | TC_TX_SCHEDULING_MODE_HW_REF 0x01 |
Reserved. | |
#define | TC_TX_SCHEDULING_MODE_SW_REF 0x02 |
Reserved. | |
#define | TC_PH_FLAGS_TX_SCHEDULING_MODE(a) ((a)<<24) |
Macro used to define the transmission scheduling policy for a packet. | |
#define | TC_PH_FLAGS_RX_PORT_ID(flags) ((UCHAR)((flags)>>24)) |
Macro used to get the port ID a packet was received from. | |
#define | TC_PH_ERROR_CHECKSUM 0x00000001 |
On reception, the received packet has an invalid frame check sequence (FCS). | |
#define | TC_PH_ERROR_SEQUENCE 0x00000002 |
On reception, the received packet had a sequence error. A valid delimiter sequence consists of idle->start-of-frame(SOF)->data, ->pad(optional)->end-of-frame(EOF)-fill(optional)->idle. | |
#define | TC_PH_ERROR_SYMBOL 0x00000004 |
On reception, the received packet had a symbol error. | |
#define | TC_PH_ERROR_DATA 0x00000008 |
On reception, the received packet had a data error. | |
#define | TC_ALIGN_USHORT_TO_64BIT(a) ((USHORT)(((USHORT)(a) + 7) & ((USHORT)0xFFF8))) |
Macro to align a 16 bit quantity on a 64bit boundary. Used when processing the packets contained in a packets buffer when TcPacketsBufferGetBuffer is used. | |
Typedefs | |
typedef TC_PACKET_HEADER * | PTC_PACKET_HEADER |
typedef HANDLE | TC_BOARD |
Handle to a physical TurboCap board on the system. | |
typedef TC_BOARD * | PTC_BOARD |
typedef HANDLE | TC_PORT |
Handle to a TurboCap port. | |
typedef TC_PORT * | PTC_PORT |
typedef HANDLE | TC_INSTANCE |
Handle to a capture/injection port instance. | |
typedef TC_INSTANCE * | PTC_INSTANCE |
typedef HANDLE | TC_PACKETS_BUFFER |
Handle to a buffer containing packets to be received or transmitted. | |
typedef TC_PACKETS_BUFFER * | PTC_PACKETS_BUFFER |
typedef HANDLE | TC_STATISTICS |
Handle to a statistics object containing counters related to a port or an instance. | |
typedef TC_STATISTICS * | PTC_STATISTICS |
typedef TC_LINK_INFO * | PTC_LINK_INFO |
typedef ULONG | TC_STATUS |
Enumerations | |
enum | TC_PORT_TYPE { TC_PORT_TYPE_UNKNOWN = 0, TC_PORT_TYPE_PHYSICAL = 1, TC_PORT_TYPE_BAP = 2, TC_PORT_TYPE_TCAP = 3 } |
A list of the port types supported by the TurboCap library. More... | |
enum | TC_BOARD_TYPE { TC_BOARD_TYPE_UNKNOWN = 0, TC_BOARD_TYPE_9402PT = 1 } |
A list of the board types supported by the TurboCap2 library. More... | |
enum | TC_LINK_DUPLEX_TYPE { TC_UNKNOWN_DUPLEX = 0, TC_FULL_DUPLEX = 1, TC_HALF_DUPLEX = 2 } |
Duplex setting of a port when the link is up. More... | |
enum | TC_SPEED_CONFIGURATION { TC_SPEED_CONF_10MB_FD = 0x00000001, TC_SPEED_CONF_10MB_HD = 0x00000002, TC_SPEED_CONF_100MB_FD = 0x00000004, TC_SPEED_CONF_100MB_HD = 0x00000008, TC_SPEED_CONF_1000MB_FD = 0x00000010, TC_SPEED_CONF_ALL = 0x0000001F } |
Available link speeds that can be configured for the autonegotiation or to force the link speed when autonegotation is disabled. Used in conjunction with TC_AUTONEG_PARAMETERS. More... | |
Functions | |
C_ASSERT (sizeof(TC_AUTONEG_PARAMETERS)==12) |
#define TC_PH_FLAGS_CHECKSUM 0x00000001 |
The packet contain the FCS at the end of the packet.
#define TC_TX_SCHEDULING_MODE_NO_SCHED 0x00 |
The packet will be transmitted without any scheduling policy i.e. as soon as possible, respecting the minimum interframe gap (IFG) of the link layer. The TC_PACKET_HEADER::Timestamp field is ignored by the transmission scheduler.
#define TC_TX_SCHEDULING_MODE_HW_REF 0x01 |
Reserved.
#define TC_TX_SCHEDULING_MODE_SW_REF 0x02 |
Reserved.
#define TC_PH_FLAGS_TX_SCHEDULING_MODE | ( | a | ) | ((a)<<24) |
Macro used to define the transmission scheduling policy for a packet.
The result of this macro should be OR combined with the TC_PACKET_HEADER::Flags field.
a | One of these values
|
#define TC_PH_FLAGS_RX_PORT_ID | ( | flags | ) | ((UCHAR)((flags)>>24)) |
Macro used to get the port ID a packet was received from.
The macro should be applied to the TC_PACKET_HEADER::Flags field. The result is an 8bit index in the array of physical ports returned by TcPortQueryAggregatedPortList. In case the packet was captured on a physical port, the port Id is always 0.
#define TC_PH_ERROR_CHECKSUM 0x00000001 |
On reception, the received packet has an invalid frame check sequence (FCS).
#define TC_PH_ERROR_SEQUENCE 0x00000002 |
On reception, the received packet had a sequence error. A valid delimiter sequence consists of idle->start-of-frame(SOF)->data, ->pad(optional)->end-of-frame(EOF)-fill(optional)->idle.
#define TC_PH_ERROR_SYMBOL 0x00000004 |
On reception, the received packet had a symbol error.
#define TC_PH_ERROR_DATA 0x00000008 |
On reception, the received packet had a data error.
#define TC_ALIGN_USHORT_TO_64BIT | ( | a | ) | ((USHORT)(((USHORT)(a) + 7) & ((USHORT)0xFFF8))) |
Macro to align a 16 bit quantity on a 64bit boundary. Used when processing the packets contained in a packets buffer when TcPacketsBufferGetBuffer is used.
typedef TC_PACKET_HEADER* PTC_PACKET_HEADER |
typedef HANDLE TC_BOARD |
Handle to a physical TurboCap board on the system.
typedef HANDLE TC_PORT |
Handle to a TurboCap port.
A port can be a physical port on a board, or an aggregating port. There are two kinds of aggregating ports:
typedef HANDLE TC_INSTANCE |
Handle to a capture/injection port instance.
When you need to send or receive traffic on a port, you need to have a TC_INSTANCE, i.e. an open instance to a port. Multiple instances can be opened against the same port, each one with its own reception/transmission parameters.
typedef TC_INSTANCE* PTC_INSTANCE |
typedef HANDLE TC_PACKETS_BUFFER |
Handle to a buffer containing packets to be received or transmitted.
Packets are received in the form of buffer containing one or more packets. In the same fashion, packets that have to be transmitted should be assembled in a packets buffer and passed to the transmission functions of the library. Access to this buffer can be performed in two different ways:
In the former case, the packets are accessed through TcPacketsBufferQueryNextPacket (reception) and TcPacketsBufferCommitNextPacket (transmission). In the latter case, the raw buffer is retrieved with TcPacketsBufferGetBuffer, its effective length (i.e. the number of bytes effectively used in the buffer) is obtained with TcPacketsBufferGetEffectiveLength (reception mode) and the maximum length with TcPacketsBufferGetLength.
typedef TC_PACKETS_BUFFER* PTC_PACKETS_BUFFER |
typedef HANDLE TC_STATISTICS |
Handle to a statistics object containing counters related to a port or an instance.
The underlying packet capture and transmission engine maintains a set of counters, like the number of received or transmitted packets. Two sets of counters are available.
typedef TC_STATISTICS* PTC_STATISTICS |
typedef TC_LINK_INFO* PTC_LINK_INFO |
typedef ULONG TC_STATUS |
enum TC_PORT_TYPE |
A list of the port types supported by the TurboCap library.
enum TC_BOARD_TYPE |
enum TC_LINK_DUPLEX_TYPE |
Available link speeds that can be configured for the autonegotiation or to force the link speed when autonegotation is disabled. Used in conjunction with TC_AUTONEG_PARAMETERS.
C_ASSERT | ( | sizeof(TC_AUTONEG_PARAMETERS) | = =12 |
) |
TurboCap API documentation. Copyright (c) 2007-2008 CACE Technologies. All rights reserved.