Features

Defines

#define TC_PRT_LED_ON   ((ULONG)0x00000000)
#define TC_PRT_LED_OFF   ((ULONG)0x00000001)
#define TC_PRT_LED_BLINK   ((ULONG)0x00000002)
#define TC_PRT_LED_DEFAULT   ((ULONG)0x00000003)
#define TC_BRD_FT_PASSTHRU   0x00000001
 It controls the status of the passthru feature of a board.
#define TC_PRT_FT_LED_0   0x00000001
 It controls the status of LED #0 of a port.
#define TC_PRT_FT_LED_1   0x00000002
 It controls the status of LED #1 of a port.
#define TC_PRT_FT_LED_2   0x00000003
 It controls the status of LED #2 of a port.
#define TC_PRT_FT_RX_SLOT_SIZE   0x00000004
 Internal feature.
#define TC_PRT_FT_TX_SLOT_SIZE   0x00000005
 Internal feature.
#define TC_PRT_FT_RX_SLOTS   0x00000006
 Internal feature.
#define TC_PRT_FT_TX_SLOTS   0x00000007
 Internal feature.
#define TC_PRT_FT_RX_DESCS   0x00000008
 Internal feature.
#define TC_PRT_FT_TX_DESCS   0x00000009
 Internal feature.
#define TC_INST_FT_SNAPLEN   0x00000001
 It controls the snapshot feature of a reception/transmission instance.
#define TC_INST_FT_HW_FILTER   0x00000002
 It controls the hardware filter for the received packets.
#define TC_INST_FT_MINTOCOPY   0x00000003
 It controls the mintocopy feature of a port, i.e. the minimum amount of bytes that should be stored in the kernel buffer before the reception wait handle gets signalled (please see TcInstanceGetReceiveWaitHandle).
#define TC_INST_FT_RX_STATUS   0x00000004
 It controls the reception functionality of an instance i.e. if reception is enabled or not.
#define TC_INST_FT_TX_STATUS   0x00000005
 It controls the transmission functionality of an instance i.e. if transmission is enabled or not.
#define TC_INST_FT_READ_TIMEOUT   0x00000006
 It controls the read timeout of an instance, the maximum timeout after which a packet receive operation will return.
#define TC_HW_FILTER_CORRECT   0x00000001
 Used with the feature TC_INST_FT_HW_FILTER. When this bit flag is set, correct packets (i.e. valid FCS and no PHY errors) are captured.
#define TC_HW_FILTER_WRONG_FCS   0x00000002
 Used with the feature TC_INST_FT_HW_FILTER. When this bit flag is set, packets with a wrong FCS are captured.
#define TC_HW_FILTER_PHY_ERROR   0x00000004
 Used with the feature TC_INST_FT_HW_FILTER. When this bit flag is set, packets received with PHY errors are captured.

Detailed Description

This section enumerates the various feature values that can be set/queried on a board, a port or an instance with

Feature definition names follow a common scheme:

TC_<object>_FT_<name>

<object> is the type of object the feature applies to, namely

<name> is the name of the feature itself.


Define Documentation

#define TC_PRT_LED_ON   ((ULONG)0x00000000)
#define TC_PRT_LED_OFF   ((ULONG)0x00000001)
#define TC_PRT_LED_BLINK   ((ULONG)0x00000002)
#define TC_PRT_LED_DEFAULT   ((ULONG)0x00000003)
#define TC_BRD_FT_PASSTHRU   0x00000001

It controls the status of the passthru feature of a board.

Supported operations: Query/Set
Scope: board
Possible values:

  • 0: passthru is disabled
  • 1: passthru is enabled
#define TC_PRT_FT_LED_0   0x00000001

It controls the status of LED #0 of a port.

Supported operations: Query/Set
Scope: physical port
Possible values: TC_PRT_LED_ON. The led is on. TC_PRT_LED_OFF. The led is off. TC_PRT_LED_BLINK. The led is blinking. TC_PRT_LED_DEFAULT. The led has the normal behavior. Led #0 is on when the link is up, and blinking when data are sent/received on the port.

#define TC_PRT_FT_LED_1   0x00000002

It controls the status of LED #1 of a port.

Supported operations: Query/Set
Scope: physical port
Possible values: TC_PRT_LED_ON. The led is on (green). TC_PRT_LED_OFF. The led is off. TC_PRT_LED_BLINK. The led is blinking (green). TC_PRT_LED_DEFAULT. The led has the normal behavior. Led #1 is green when the negotiated speed is 100Mbps. Please note that on the TC_BOARD_TYPE_9402PT board, Led #1 and Led #2 are combined. The color of the led (green vs. orange) is controlled by both the settings of Led #1 and Led #2, and orange takes precedence over green.

#define TC_PRT_FT_LED_2   0x00000003

It controls the status of LED #2 of a port.

Supported operations: Query/Set
Scope: physical port
Possible values: TC_PRT_LED_ON. The led is on (orange). TC_PRT_LED_OFF. The led is off. TC_PRT_LED_BLINK. The led is blinking (orange). TC_PRT_LED_DEFAULT. The led has the normal behavior. Led #1 is green when the negotiated speed is 1000Mbps. Please note that on the TC_BOARD_TYPE_9402PT board, Led #1 and Led #2 are combined. The color of the led (green vs. orange) is controlled by both the settings of Led #1 and Led #2, and orange takes precedence over green.

#define TC_PRT_FT_RX_SLOT_SIZE   0x00000004

Internal feature.

Supported operations: Query
Scope: physical port
Possible values:

#define TC_PRT_FT_TX_SLOT_SIZE   0x00000005

Internal feature.

Supported operations: Query
Scope: physical port
Possible values:

#define TC_PRT_FT_RX_SLOTS   0x00000006

Internal feature.

Supported operations: Query
Scope: physical port
Possible values:

#define TC_PRT_FT_TX_SLOTS   0x00000007

Internal feature.

Supported operations: Query
Scope: physical port
Possible values:

#define TC_PRT_FT_RX_DESCS   0x00000008

Internal feature.

Supported operations: Query
Scope: physical port
Possible values:

#define TC_PRT_FT_TX_DESCS   0x00000009

Internal feature.

Supported operations: Query
Scope: physical port
Possible values:

#define TC_INST_FT_SNAPLEN   0x00000001

It controls the snapshot feature of a reception/transmission instance.

When snapshotting is enabled, the capture engine returns at most the first snaplen bytes of a packet. This feature is used to improve capture performance by bringing only the packet headers to user level and discarding the upper layer payloads. The snapshot feature affects the value of the TC_PACKET_HEADER::CapturedLength field during reception: the value of this field is never greater than the snapshot length set with this feature parameter.

Supported operations: Query/Set
Scope: instance
Possible values: 0-0xFFFF (65535) When snapshot is set to 0xFFFF, the whole packet is always captured (i.e. snapshotting is disabled). When snapshot is set to 0, then the capture engine returns the packet header structure (TC_PACKET_HEADER) only.

#define TC_INST_FT_HW_FILTER   0x00000002

It controls the hardware filter for the received packets.

The capture has the ability to capture or discard packets with correct FCS, or errored frames.

Supported operations: Query/Set
Scope: instance
Possible values: An OR combination of the following values

#define TC_INST_FT_MINTOCOPY   0x00000003

It controls the mintocopy feature of a port, i.e. the minimum amount of bytes that should be stored in the kernel buffer before the reception wait handle gets signalled (please see TcInstanceGetReceiveWaitHandle).

Supported operations: Query/Set
Scope: instance
Possible values: 0 - 0xFFFFFFFF If mintocopy is set to 0, the reception wait handle is never signalled.

#define TC_INST_FT_RX_STATUS   0x00000004

It controls the reception functionality of an instance i.e. if reception is enabled or not.

Supported operations: Query/Set
Scope: instance
Possible values:

  • 0: reception is disabled
  • 1: reception is enabled
Note:
  • By default reception is disabled on a newly created instance.
  • Once enabled, reception cannot be disabled on a given instance.
#define TC_INST_FT_TX_STATUS   0x00000005

It controls the transmission functionality of an instance i.e. if transmission is enabled or not.

Supported operations: Query/Set
Scope: instance
Possible values:

  • 0: transmission is disabled
  • 1: transmission is enabled
Note:
  • By default transmission is disabled on a newly created instance.
  • Once enabled, transmission cannot be disabled on a given instance.
#define TC_INST_FT_READ_TIMEOUT   0x00000006

It controls the read timeout of an instance, the maximum timeout after which a packet receive operation will return.

Supported operations: Query/Set
Scope: instance
Possible values: 1-9999 ms

Note:
The biggest possible value for aggregating instances is 3 ms. If the user attempts to set a higher value the read timeout will default to 3 ms. For physical instances the possible values are 1-9999 ms.
#define TC_HW_FILTER_CORRECT   0x00000001

Used with the feature TC_INST_FT_HW_FILTER. When this bit flag is set, correct packets (i.e. valid FCS and no PHY errors) are captured.

#define TC_HW_FILTER_WRONG_FCS   0x00000002

Used with the feature TC_INST_FT_HW_FILTER. When this bit flag is set, packets with a wrong FCS are captured.

#define TC_HW_FILTER_PHY_ERROR   0x00000004

Used with the feature TC_INST_FT_HW_FILTER. When this bit flag is set, packets received with PHY errors are captured.


TurboCap API documentation. Copyright (c) 2007-2008 CACE Technologies. All rights reserved.