Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
#include "openapi_common.h"
Go to the source code of this file.
Data Structures | |
struct | OPEN_COUNTER_STATS_t |
struct | OPEN_METER_ENTRY_t |
struct | OPEN_METER_STATS_t |
struct | open_sysExtAgentPktRxDesc_t |
struct | OPEN_TCAM_ACTION_t |
Structure to define the action that should be taken. More... | |
struct | open_tcam_version_t |
Version information for the TCAM API. More... | |
struct | open_tcamHardwareGroupUsage_s |
Hardware TCAM group usage information. More... | |
struct | open_tcamHardwarePolicyUsage_s |
Hardware TCAM Policy Usage Information. More... | |
struct | tcam_api_policyHeader_s |
Header that goes on the front of each policy. More... | |
Macros | |
#define | OPEN_COUNT_BYTES 0x2 /* matching byte counter */ |
#define | OPEN_COUNT_PACKETS 0x1 /* matching packet counter */ |
#define | OPEN_CPU_RATE_LIMIT 5 |
#define | OPEN_CPU_RATE_LIMIT_BURST 5 |
#define | OPEN_PT_MATCH_RULE_NUM 61 |
Packet Trace rule number for TCAM. | |
#define | OPEN_TCAM_ACTION_DROP 1 /* ((uint32_t)(1 << 0)) */ |
Drop the frame. | |
#define | OPEN_TCAM_ACTION_DSTMAC_NEW 16 /* ((uint32_t)(1 << 4)) */ |
Rewrite the destination MAC address. | |
#define | OPEN_TCAM_ACTION_NONE 0 |
No action. | |
#define | OPEN_TCAM_ACTION_OUTERTPID_NEW 64 /* ((uint32_t)(1 << 6)) */ |
Rewrite the outer TPID. | |
#define | OPEN_TCAM_ACTION_OUTERVLAN 4 /* ((uint32_t)(1 << 2)) */ |
Rewrite the outer VLAN field. | |
#define | OPEN_TCAM_ACTION_REDIRECT 2 /* ((uint32_t)(1 << 1)) */ |
Redirect the frame to another port. | |
#define | OPEN_TCAM_ACTION_REDIRECT_CPU 128 /* ((uint32_t)(1 << 7)) */ |
redirect packet to CPU | |
#define | OPEN_TCAM_ACTION_SRCMAC_NEW 8 /* ((uint32_t)(1 << 3)) */ |
Rewrite the source MAC address. | |
#define | OPEN_TCAM_ACTION_USERPRIO 32 /* ((uint32_t)(1 << 5)) */ |
Rewrite the priority. | |
#define | OPEN_TCAM_API_CURR_VER_MAJOR 0 |
The current TCAM API major version. | |
#define | OPEN_TCAM_API_CURR_VER_MINOR 1 |
The current TCAM API minor version. | |
#define | OPEN_TCAM_API_POLICYID_INVALID 0 |
Invalid Policy ID. | |
#define | OPEN_TCAM_EXT_AGENT_PKT_RECEIVE (0x2) |
External agent receive. | |
#define | OPEN_TCAM_EXT_AGENT_PKT_TRANSMIT (0x1) |
External agent transmit. | |
#define | OPEN_TCAM_POLICY_NAME_SIZE 64 |
Maximum number of characters in the policy name. | |
#define | OPEN_TCAM_POLICY_RULE_PRIORITY_DEFAULT 1 |
#define | OPEN_TCAM_POLICY_RULE_PRIORITY_LOWEST 0 |
Policy Prority. | |
#define | OPEN_TCAM_STAGE_EGRESS 3 |
Hardware ECAP. | |
#define | OPEN_TCAM_STAGE_INGRESS 2 |
Hardware ICAP. | |
#define | OPEN_TCAM_STAGE_LOOKUP 1 |
Hardware VCAP. | |
#define | OPEN_TXRX_MAX_FRAME_SIZE 9216 |
Transmit/Receive maximum frame size. | |
#define | TCAM_API_DEBUG(dbgLvl, args...) |
Debug macro for logging messages. More... | |
#define | TCAM_MAC_ADDR_LEN 6 |
The typical sequence is: openapiTcamApiInit() to initialize the TCAM API repeat openapiTcamPolicyCreate() to create a policy and get a handle for each policy repeat openapiTcamPolicyIntfAdd() to add the policy to a set of interfaces for each policy repeat openapiTcamPolicyIntfRem() to remove the policy from a set of interfaces for each policy repeat openapiTcamPolicyDestroy() to destroy the policy for each policy openapiTcamApiFini() to uninitialize the TCAM API More... | |
Typedefs | |
typedef uint32_t | OPEN_TCAM_API_POLICYID_t |
Type for Policy IDs. | |
typedef uint32_t | OPEN_TCAM_POLICY_ACTION_t |
Type for Policy actions. | |
typedef struct open_tcamHardwareGroupUsage_s | open_tcamHardwareGroupUsage_t |
Hardware TCAM group usage information. | |
typedef struct open_tcamHardwarePolicyUsage_s | open_tcamHardwarePolicyUsage_t |
Hardware TCAM Policy Usage Information. | |
typedef struct tcam_api_policyHeader_s | tcam_api_policyHeader_t |
Header that goes on the front of each policy. | |
Enumerations | |
enum | OPEN_METER_COLOR_MODE_t { OPEN_METER_COLOR_BLIND, OPEN_METER_COLOR_AWARE } |
enum | OPEN_METER_MODE_t { OPEN_METER_BYTES, OPEN_METER_PACKETS } |
enum | OPEN_TCAM_POLICY_TYPE_t { OPEN_TCAM_POLICY_TYPE_OPENFLOW = 1, OPEN_TCAM_POLICY_TYPE_GEN = 2, OPEN_TCAM_POLICY_TYPE_EGRESS = 3, OPEN_TCAM_POLICY_TYPE_SYSTEM_PORT = 4, OPEN_TCAM_POLICY_TYPE_PORT = 5, OPEN_TCAM_POLICY_TYPE_LAST = 6 } |
Enumeration to describe where the policy should apply. More... | |
enum | TCAM_API_DEBUG_FLAG_t { TCAM_API_DEBUG_LEVEL_NONE = 0, TCAM_API_DEBUG_LEVEL_INFO = 1, TCAM_API_DEBUG_LEVEL_ERROR = 2, TCAM_API_DEBUG_LEVEL_DEBUG = 3, TCAM_API_DEBUG_LEVEL_LAST = 4 } |
Enumeration of debug flags. More... | |
Functions | |
open_error_t | openapiExtAgentPktRegister (uint32_t agentId, open_buffdesc *agentName, uint32_t flags) |
Register an External Packet Transmit/Receive Agent. More... | |
open_error_t | openapiExtAgentPktUnregister (uint32_t agentId) |
Unregister an External Packet Transmit/Receive Agent. More... | |
open_error_t | openapiTcamApiFini (openapiClientHandle_t *clientHandle) |
Uninitialize the TCAM API and return its resources. More... | |
open_error_t | openapiTcamApiInit (openapiClientHandle_t *clientHandle) |
Initialize the TCAM API. More... | |
open_error_t | openapiTcamApiVersionGet (openapiClientHandle_t *clientHandle, open_tcam_version_t *version) |
Get the version supported by the current API. More... | |
open_error_t | openapiTcamHardwareGroupUsageGetNext (openapiClientHandle_t *client_handle, uint32_t *unit, uint32_t *asic_id, uint32_t *stage, uint32_t *group_id, open_tcamHardwareGroupUsage_t *group_usage) |
Get the hardware usage statistics for the next hardware group after the specified hardware group. More... | |
open_error_t | openapiTcamHardwarePolicyUsageGetNext (openapiClientHandle_t *client_handle, uint32_t *unit, uint32_t *asic_id, uint32_t *policy_id, open_tcamHardwarePolicyUsage_t *tcam_usage) |
Get the policy hardware usage statistics for the next policy after the specified policy. More... | |
open_error_t | openapiTcamPolicyCreate (openapiClientHandle_t *clientHandle, open_tcamApiPolicy_t policyInfo, OPEN_TCAM_API_POLICYID_t *handle) |
Create a policy in the hardware directly. More... | |
open_error_t | openapiTcamPolicyCreateV2 (openapiClientHandle_t *clientHandle, open_tcamApiPolicy_v2_t policyInfo, OPEN_TCAM_API_POLICYID_t *handle) |
Create a policy in the hardware directly. More... | |
open_error_t | openapiTcamPolicyDeleteAll (openapiClientHandle_t *clientHandle) |
Delete all the policies created by TCAM API. More... | |
open_error_t | openapiTcamPolicyDestroy (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle) |
Delete the policy created. More... | |
open_error_t | openapiTcamPolicyGet (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle, open_tcamApiPolicy_t *policyInfo) |
Get TCAM policy information from the policy handle provided. More... | |
open_error_t | openapiTcamPolicyGetFirst (openapiClientHandle_t *clientHandle, open_tcamApiPolicy_t *policyInfo, OPEN_TCAM_API_POLICYID_t *nextPolicyHandle) |
Get the first TCAM policy information. More... | |
open_error_t | openapiTcamPolicyGetFirstV2 (openapiClientHandle_t *clientHandle, open_tcamApiPolicy_v2_t *policyInfo, OPEN_TCAM_API_POLICYID_t *nextPolicyHandle) |
Get the first TCAM policy information. More... | |
open_error_t | openapiTcamPolicyGetNext (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle, open_tcamApiPolicy_t *policyInfo, OPEN_TCAM_API_POLICYID_t *nextPolicyHandle) |
Get the next TCAM policy information from the policy handle provided. More... | |
open_error_t | openapiTcamPolicyGetNextV2 (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle, open_tcamApiPolicy_v2_t *policyInfo, OPEN_TCAM_API_POLICYID_t *nextPolicyHandle) |
Get the next TCAM policy information from the policy handle provided. More... | |
open_error_t | openapiTcamPolicyGetV2 (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle, open_tcamApiPolicy_v2_t *policyInfo) |
Get TCAM policy information from the policy handle provided. More... | |
open_error_t | openapiTcamPolicyIntfAdd (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle, uint32_t intf) |
Add the TCAM policy to the list of interfaces provided. More... | |
open_error_t | openapiTcamPolicyIntfAllAdd (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle) |
Add the TCAM policy to all interfaces. More... | |
open_error_t | openapiTcamPolicyIntfRem (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle, uint32_t intf) |
Remove TCAM policy from the list of interfaces provided. More... | |
open_error_t | openapiTcamPolicyMeteringStatsGet (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle, uint64_t *inProf, uint64_t *outProf) |
Get TCAM policy statistics for the policy handle provided. More... | |
open_error_t | openapiTcamPolicyStatsClear (openapiClientHandle_t *clientHandle, OPEN_TCAM_API_POLICYID_t *policyHandle) |
Clear TCAM policy statistics for the policy handle provided. More... | |
Variables | |
OPEN_TCAM_POLICY_ACTION_t | actionType |
OPEN_TCAM_ACTION_t | actionVal |
unsigned char | matchCpuVisibility |
unsigned char | matchCpuVisibilityMask |
uint32_t | matchDstIp |
uint32_t | matchDstIpMask |
open_in6_addr_t | matchDstIpv6Addr |
open_in6_addr_t | matchDstIpv6Mask |
unsigned char | matchDstMac [TCAM_MAC_ADDR_LEN] |
uint16_t | matchDstPortIcmpCode |
uint16_t | matchDstPortIcmpCodeMask |
uint16_t | matchEthType |
uint32_t | matchIpDscp |
unsigned char | matchIpDscpMask |
uint32_t | matchIpProto |
uint32_t | matchIpProtoMask |
uint32_t | matchL4Dport |
uint32_t | matchL4DportMask |
uint32_t | matchL4Sport |
uint32_t | matchL4SportMask |
uint32_t | matchSrcIp |
uint32_t | matchSrcIpMask |
open_in6_addr_t | matchSrcIpv6Addr |
open_in6_addr_t | matchSrcIpv6Mask |
unsigned char | matchSrcMac [TCAM_MAC_ADDR_LEN] |
uint16_t | matchSrcPortIcmpType |
uint16_t | matchSrcPortIcmpTypeMask |
unsigned char | matchVlanPrio |
uint16_t | matchVlanVal |
OPEN_METER_ENTRY_t | meterInfo |
uint8_t | meterPresent |
open_tcamApiPolicy_t | |
open_tcamApiPolicy_v2_t | |
uint32_t | policyPrio |
OPEN_TCAM_POLICY_TYPE_t | policyType |
uint64_t | ruleNum |
uint32_t | rulePrio |
OPEN_PACKED_STRUCT | tcamApiPolicy_s |
Structure that contains the full TCAM API policy: headers, match values and action. More... | |
OPEN_PACKED_STRUCT | tcamApiPolicy_v2_s |
Structure that contains the full TCAM API policy: headers, match values and action. More... | |