OpenFlow Data Plane Abstraction (OF-DPA) API Guide and Reference Manual
|
Go to the source code of this file.
Functions | |
int | ofdpaBcmCommand (ofdpa_buffdesc buffer) |
Execute a BCM command. | |
int | ofdpaClientEventSockFdGet (void) |
Get OF-DPA Client's event socket fd. | |
OFDPA_ERROR_t | ofdpaClientInitialize (char *clientName) |
Initialize OF-DPA client or user application. | |
int | ofdpaClientPktSockFdGet (void) |
Get OF-DPA Client's packet socket fd. | |
int | ofdpaCltDebugBuf (ofdpa_buffdesc functionName, ofdpaComponentIds_t component, ofdpaDebugLevels_t verbosity, ofdpa_buffdesc message) |
Generate a debug message using a preformatted buffer. | |
int | ofdpaCltDebugPrintf (const char *functionName, ofdpaComponentIds_t component, ofdpaDebugLevels_t verbosity, const char *format,...) |
Generate a debug message using printf formatting. | |
int | ofdpaCltLogBuf (int priority, ofdpa_buffdesc message) |
Generate a log message using a preformatted buffer. | |
int | ofdpaCltLogPrintf (int priority, char *fmt,...) |
Generate a log message using printf formatting. | |
int | ofdpaComponentNameGet (int component, ofdpa_buffdesc *name) |
Get the Component Name. | |
int | ofdpaDebugComponentGet (int component) |
Get Component debugging mode. | |
int | ofdpaDebugComponentSet (int component, int enable) |
Enable/Disable the Component for debugging. | |
int | ofdpaDebugLvl (int lvl) |
Set the Debug Verbosity. | |
int | ofdpaDebugLvlGet (void) |
Get the Debug Verbosity. | |
OFDPA_ERROR_t | ofdpaEventReceive (struct timeval *timeout) |
Receive an event. | |
OFDPA_ERROR_t | ofdpaFlowAdd (ofdpaFlowEntry_t *flow) |
Add a new entry to a flow table. | |
OFDPA_ERROR_t | ofdpaFlowByCookieDelete (uint64_t cookie) |
Delete the flow entry with the specified cookie. | |
OFDPA_ERROR_t | ofdpaFlowByCookieGet (uint64_t cookie, ofdpaFlowEntry_t *flow, ofdpaFlowEntryStats_t *flowStats) |
Returns statistics for the flow entry with the specified cookie value. | |
OFDPA_ERROR_t | ofdpaFlowDelete (ofdpaFlowEntry_t *flow) |
Delete an entry from a flow table. | |
OFDPA_ERROR_t | ofdpaFlowEntryInit (OFDPA_FLOW_TABLE_ID_t tableId, ofdpaFlowEntry_t *flow) |
Initialize Flow entry structure. | |
OFDPA_ERROR_t | ofdpaFlowEventNextGet (ofdpaFlowEvent_t *eventData) |
Get the next flow event. | |
OFDPA_ERROR_t | ofdpaFlowModify (ofdpaFlowEntry_t *flow) |
Modify an existing entry in a flow table. | |
OFDPA_ERROR_t | ofdpaFlowNextGet (ofdpaFlowEntry_t *flow, ofdpaFlowEntry_t *nextFlow) |
Retrieve the next flow entry in the specified flow table. | |
OFDPA_ERROR_t | ofdpaFlowStatsGet (ofdpaFlowEntry_t *flow, ofdpaFlowEntryStats_t *flowStats) |
Returns statistics for the flow entry specified. | |
OFDPA_ERROR_t | ofdpaFlowTableInfoGet (OFDPA_FLOW_TABLE_ID_t tableId, ofdpaFlowTableInfo_t *info) |
Get Flow Table Info. | |
OFDPA_ERROR_t | ofdpaGroupAdd (ofdpaGroupEntry_t *group) |
Add Group. | |
OFDPA_ERROR_t | ofdpaGroupBucketEntryAdd (ofdpaGroupBucketEntry_t *bucket) |
Add a Group Bucket entry. | |
OFDPA_ERROR_t | ofdpaGroupBucketEntryDelete (uint32_t groupId, uint32_t bucketIndex) |
Delete a Group Bucket entry. | |
OFDPA_ERROR_t | ofdpaGroupBucketEntryFirstGet (uint32_t groupId, ofdpaGroupBucketEntry_t *firstGroupBucket) |
Get the first Group Bucket entry. | |
OFDPA_ERROR_t | ofdpaGroupBucketEntryGet (uint32_t groupId, uint32_t bucketIndex, ofdpaGroupBucketEntry_t *groupBucket) |
Get the Group Bucket entry. | |
OFDPA_ERROR_t | ofdpaGroupBucketEntryInit (OFDPA_GROUP_ENTRY_TYPE_t groupType, ofdpaGroupBucketEntry_t *bucket) |
Initialize Flow entry structure. | |
OFDPA_ERROR_t | ofdpaGroupBucketEntryModify (ofdpaGroupBucketEntry_t *bucket) |
Modify Group Bucket entry. | |
OFDPA_ERROR_t | ofdpaGroupBucketEntryNextGet (uint32_t groupId, uint32_t bucketIndex, ofdpaGroupBucketEntry_t *nextBucketEntry) |
Get the next Group Bucket entry. | |
OFDPA_ERROR_t | ofdpaGroupBucketsDeleteAll (uint32_t groupId) |
Delete all Buckets from a Group. | |
OFDPA_ERROR_t | ofdpaGroupDecode (uint32_t groupId, char *outBuf, int bufSize) |
Decode Group Id. | |
OFDPA_ERROR_t | ofdpaGroupDelete (uint32_t groupId) |
Delete Group. | |
OFDPA_ERROR_t | ofdpaGroupEntryInit (OFDPA_GROUP_ENTRY_TYPE_t groupType, ofdpaGroupEntry_t *group) |
Initialize Flow entry structure. | |
OFDPA_ERROR_t | ofdpaGroupIndexGet (uint32_t groupId, uint32_t *index) |
Get the Index encoded in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupIndexSet (uint32_t *groupId, uint32_t index) |
Encode the Index in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupIndexShortGet (uint32_t groupId, uint32_t *index) |
Get the Short Index encoded in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupIndexShortSet (uint32_t *groupId, uint32_t index) |
Encode the Short Index in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupNextGet (uint32_t groupId, ofdpaGroupEntry_t *nextGroup) |
Get the next Group entry. | |
OFDPA_ERROR_t | ofdpaGroupOverlayIndexSet (uint32_t *groupId, uint32_t index) |
Encode the Overlay Group index in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupOverlaySubTypeSet (uint32_t *groupId, OFDPA_L2_OVERLAY_SUBTYPE_t subType) |
Encode the Overlay Group Sub-type in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupOverlayTunnelIdSet (uint32_t *groupId, uint32_t tunnelId) |
Encode the tunnel Id in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupPortIdGet (uint32_t groupId, uint32_t *portId) |
Get the Port ID encoded in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupPortIdSet (uint32_t *groupId, uint32_t portId) |
Encode the Port Id in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupStatsGet (uint32_t groupId, ofdpaGroupEntryStats_t *groupStats) |
Get Group statistics. | |
OFDPA_ERROR_t | ofdpaGroupTableInfoGet (OFDPA_GROUP_ENTRY_TYPE_t groupType, ofdpaGroupTableInfo_t *info) |
Get Group table info. | |
OFDPA_ERROR_t | ofdpaGroupTypeGet (uint32_t groupId, uint32_t *type) |
Get the Group Type encoded in the Group ID. | |
OFDPA_ERROR_t | ofdpaGroupTypeNextGet (uint32_t groupId, OFDPA_GROUP_ENTRY_TYPE_t groupType, ofdpaGroupEntry_t *nextGroup) |
Get the next Group entry of a given type. | |
OFDPA_ERROR_t | ofdpaGroupTypeSet (uint32_t *groupId, uint32_t type) |
Encode the Group Type in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupVlanGet (uint32_t groupId, uint32_t *vlanId) |
Get the VLAN ID encoded in the Group Id. | |
OFDPA_ERROR_t | ofdpaGroupVlanSet (uint32_t *groupId, uint32_t vlanId) |
Encode the VLAN Id in the Group Id. | |
OFDPA_ERROR_t | ofdpaMaxPktSizeGet (uint32_t *pktSize) |
Report the size in bytes of the largest packet that can be received. | |
OFDPA_ERROR_t | ofdpaNumQueuesGet (uint32_t portNum, uint32_t *numQueues) |
The client calls this function to get the number of COS queues on a port. | |
OFDPA_ERROR_t | ofdpaPktReceive (struct timeval *timeout, ofdpaPacket_t *pkt) |
The client calls this function to retrieve a single packet that the hardware has punted to the CPU. | |
OFDPA_ERROR_t | ofdpaPktSend (ofdpa_buffdesc *pkt, uint32_t flags, uint32_t outPortNum, uint32_t inPortNum) |
Packet out API. | |
OFDPA_ERROR_t | ofdpaPortAdvertiseFeatureSet (uint32_t portNum, uint32_t advertise) |
Set the port features that can be advertized durng Auto-Negotiation. | |
OFDPA_ERROR_t | ofdpaPortConfigGet (uint32_t portNum, OFDPA_PORT_CONFIG_t *config) |
Get the port administrative state. | |
OFDPA_ERROR_t | ofdpaPortConfigSet (uint32_t portNum, OFDPA_PORT_CONFIG_t config) |
Set the port administrative state. | |
OFDPA_ERROR_t | ofdpaPortCurrSpeedGet (uint32_t portNum, uint32_t *currSpeed) |
Get the port current speed. | |
OFDPA_ERROR_t | ofdpaPortEventNextGet (ofdpaPortEvent_t *eventData) |
Get the next port event. | |
OFDPA_ERROR_t | ofdpaPortFeatureGet (uint32_t portNum, ofdpaPortFeature_t *feature) |
Get the port features. | |
void | ofdpaPortIndexGet (uint32_t portNum, uint32_t *index) |
Get the port index encoded in a port number value. | |
void | ofdpaPortIndexSet (uint32_t *portNum, uint32_t index) |
Encode the port index in a port number. | |
OFDPA_ERROR_t | ofdpaPortMacGet (uint32_t portNum, ofdpaMacAddr_t *mac) |
Get the MAC address of the given port. | |
OFDPA_ERROR_t | ofdpaPortMaxSpeedGet (uint32_t portNum, uint32_t *maxSpeed) |
Get the port maximum speed. | |
OFDPA_ERROR_t | ofdpaPortNameGet (uint32_t portNum, ofdpa_buffdesc *name) |
Get the port name. | |
OFDPA_ERROR_t | ofdpaPortNextGet (uint32_t portNum, uint32_t *nextPortNum) |
Get the next port from the port table. | |
OFDPA_ERROR_t | ofdpaPortStateGet (uint32_t portNum, OFDPA_PORT_STATE_t *state) |
Get the port link state. | |
OFDPA_ERROR_t | ofdpaPortStatsClear (uint32_t portNum) |
Clear port statistics. | |
OFDPA_ERROR_t | ofdpaPortStatsGet (uint32_t portNum, ofdpaPortStats_t *stats) |
Get port statistics. | |
void | ofdpaPortTypeGet (uint32_t portNum, uint32_t *type) |
Get the port type encoded in a port number value. | |
void | ofdpaPortTypeSet (uint32_t *portNum, uint32_t type) |
Encode the port type in a port number value. | |
OFDPA_ERROR_t | ofdpaQueueRateGet (uint32_t portNum, uint32_t queueId, uint32_t *minRate, uint32_t *maxRate) |
The client calls this function to get minimum and maximum bandwidth on a queue on a given port. | |
OFDPA_ERROR_t | ofdpaQueueRateSet (uint32_t portNum, uint32_t queueId, uint32_t minRate, uint32_t maxRate) |
The client calls this function to set minimum and maximum bandwidth on a queue on a given port. | |
OFDPA_ERROR_t | ofdpaQueueStatsClear (uint32_t portNum, uint32_t queueId) |
The client calls this function to clear all the statistics of a queue on a port. | |
OFDPA_ERROR_t | ofdpaQueueStatsGet (uint32_t portNum, uint32_t queueId, ofdpaPortQueueStats_t *stats) |
The client calls this function to get the statistics of a queue on a port. | |
OFDPA_ERROR_t | ofdpaSourceMacLearningGet (OFDPA_CONTROL_t *mode, ofdpaSrcMacLearnModeCfg_t *srcMacLearnModeCfg) |
The client calls this function to get the Source Mac Learning Mode with other config parameters. | |
OFDPA_ERROR_t | ofdpaSourceMacLearningSet (OFDPA_CONTROL_t mode, ofdpaSrcMacLearnModeCfg_t *srcMacLearnModeCfg) |
The client calls this function to set the Source Mac Learning Mode with other config parameters. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupCreate (uint32_t ecmpNextHopGroupId, ofdpaTunnelEcmpNextHopGroupConfig_t *config) |
Create a tunnel ECMP next hop group entry. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupDelete (uint32_t ecmpNextHopGroupId) |
Delete a tunnel ECMP next hop group entry. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupGet (uint32_t ecmpNextHopGroupId, ofdpaTunnelEcmpNextHopGroupConfig_t *config, ofdpaTunnelEcmpNextHopGroupStatus_t *status) |
Retrieve tunnel ECMP next hop group configuration and/or status. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupMaxMembersGet (uint32_t *maxMemberCount) |
Return the number of ECMP next hop group members supported by the switch. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupMemberAdd (uint32_t ecmpNextHopGroupId, uint32_t nextHopId) |
Adds a next hop member to an ECMP next hop group entry. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupMemberDelete (uint32_t ecmpNextHopGroupId, uint32_t nextHopId) |
Adds a next hop member to an ECMP next hop group entry. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupMemberGet (uint32_t ecmpNextHopListGroupId, uint32_t nextHopId) |
Test whether a next hop is a member in the specified ECMP next hop group. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupMemberNextGet (uint32_t ecmpNextHopListGroupId, uint32_t nextHopId, uint32_t *nextNextHopId) |
Gets the next member next hop in the ECMP next hop group. | |
OFDPA_ERROR_t | ofdpaTunnelEcmpNextHopGroupNextGet (uint32_t ecmpNextHopGroupId, uint32_t *nextEcmpNextHopGroupId) |
Return the ECMP tunnel next hop group identifier, if any, for the entry after the one specified. | |
OFDPA_ERROR_t | ofdpaTunnelNextHopCreate (uint32_t nextHopId, ofdpaTunnelNextHopConfig_t *config) |
Create a tunnel next hop entry. | |
OFDPA_ERROR_t | ofdpaTunnelNextHopDelete (uint32_t nextHopId) |
Delete a tunnel next hop entry. | |
OFDPA_ERROR_t | ofdpaTunnelNextHopGet (uint32_t nextHopId, ofdpaTunnelNextHopConfig_t *config, ofdpaTunnelNextHopStatus_t *status) |
Retrieve tunnel next hop configuration and/or status. | |
OFDPA_ERROR_t | ofdpaTunnelNextHopModify (uint32_t nextHopId, ofdpaTunnelNextHopConfig_t *config) |
Modify a tunnel next hop entry. | |
OFDPA_ERROR_t | ofdpaTunnelNextHopNextGet (uint32_t nextHopId, uint32_t *nextNextHopId) |
Return the tunnel next hop identifier, if any, for the entry after the one specified. | |
OFDPA_ERROR_t | ofdpaTunnelPortCreate (uint32_t portNum, ofdpa_buffdesc *name, ofdpaTunnelPortConfig_t *config) |
Create a tunnel logical port. | |
OFDPA_ERROR_t | ofdpaTunnelPortDelete (uint32_t portNum) |
Delete a tunnel logical port. | |
OFDPA_ERROR_t | ofdpaTunnelPortGet (uint32_t portNum, ofdpaTunnelPortConfig_t *config, ofdpaTunnelPortStatus_t *status) |
Retrieve tunnel logical port configuration and/or status. | |
OFDPA_ERROR_t | ofdpaTunnelPortNextGet (uint32_t portNum, uint32_t *nextPortNum) |
Return the tunnel logical port identifier, if any, for the logical port after the one specified in the logical port table. | |
OFDPA_ERROR_t | ofdpaTunnelPortTenantAdd (uint32_t portNum, uint32_t tunnelId) |
Adds a tenant reference to a logical port tunnel entry. | |
OFDPA_ERROR_t | ofdpaTunnelPortTenantDelete (uint32_t portNum, uint32_t tunnelId) |
Deletes a tenant reference to a logical port tunnel entry. | |
OFDPA_ERROR_t | ofdpaTunnelPortTenantGet (uint32_t portNum, uint32_t tunnelId, ofdpaTunnelPortTenantStatus_t *status) |
Test whether a tenant reference to a logical port exists for the port and tenant combination. | |
OFDPA_ERROR_t | ofdpaTunnelPortTenantNextGet (uint32_t portNum, uint32_t tunnelId, uint32_t *nextTunnelId) |
Gets the next logical port tunnel entry after the port and tenant identified. | |
OFDPA_ERROR_t | ofdpaTunnelTenantCreate (uint32_t tunnelId, ofdpaTunnelTenantConfig_t *config) |
Create a tunnel tenant entry. | |
OFDPA_ERROR_t | ofdpaTunnelTenantDelete (uint32_t tunnelId) |
Delete a tunnel tenant entry. | |
OFDPA_ERROR_t | ofdpaTunnelTenantGet (uint32_t tunnelId, ofdpaTunnelTenantConfig_t *config, ofdpaTunnelTenantStatus_t *status) |
Retrieve tunnel tenant configuration and/or status. | |
OFDPA_ERROR_t | ofdpaTunnelTenantNextGet (uint32_t tunnelId, uint32_t *nextTunnelId) |
Return the tunnel identifier, if any, for the entry after the one specified. | |