OpenNSL API Guide and Reference Manual
Data Structures | Macros | Typedefs | Functions
trunk.h File Reference
#include <opennsl/types.h>
#include <opennsl/trunkX.h>

Go to the source code of this file.

Data Structures

struct  opennsl_trunk_chip_info_s
 Initialize a trunk chip information structure. More...
 
struct  opennsl_trunk_info_s
 Trunk group attributes structure. More...
 
struct  opennsl_trunk_member_s
 Structure describing a trunk member. More...
 

Macros

#define OPENNSL_TRUNK_FLAG_FAILOVER   OPENNSL_TRUNK_FLAG_FAILOVER_NEXT_LOCAL
 Enable trunk failover support (deprecated).
 
#define OPENNSL_TRUNK_FLAG_FAILOVER_NEXT   0x0001
 Failover port defaults to the next port in the trunk port list.
 
#define OPENNSL_TRUNK_FLAG_FAILOVER_NEXT_LOCAL   0x0002
 Failover port defaults to the next local port in the trunk port list, if any.
 
#define OPENNSL_TRUNK_FLAG_IPMC_CLEAVE   0x0020
 Disable trunk resolution for IPMC packets in hardware.
 
#define OPENNSL_TRUNK_FLAG_WITH_ID   0x0010
 Use the trunk ID supplied by user.
 
#define OPENNSL_TRUNK_MAX_PORTCNT   256
 Maximum number of ports in a trunk group.
 
#define OPENNSL_TRUNK_MEMBER_EGRESS_DISABLE   0x0002
 Member will not be a part of the distributor members to be hashed.
 
#define OPENNSL_TRUNK_PSC_DSTIP   5
 Destination IP address.
 
#define OPENNSL_TRUNK_PSC_PORTFLOW   9
 Enhanced hashing.
 
#define OPENNSL_TRUNK_PSC_SRCDSTIP   6
 Source+dest IP address.
 
#define OPENNSL_TRUNK_PSC_SRCDSTMAC   3
 Source+dest MAC address.
 
#define OPENNSL_TRUNK_UNSPEC_INDEX   -1
 Let software set DLF/MC/IPMC.
 

Typedefs

typedef struct
opennsl_trunk_chip_info_s 
opennsl_trunk_chip_info_t
 Initialize a trunk chip information structure.
 
typedef struct opennsl_trunk_info_s opennsl_trunk_info_t
 Trunk group attributes structure.
 
typedef struct
opennsl_trunk_member_s 
opennsl_trunk_member_t
 Structure describing a trunk member.
 

Functions

int opennsl_trunk_chip_info_get (int unit, opennsl_trunk_chip_info_t *ta_info) LIB_DLL_EXPORTED
 Gets the underlying SoC device's trunk support limits.
 
int opennsl_trunk_create (int unit, uint32 flags, opennsl_trunk_t *tid) LIB_DLL_EXPORTED
 Create the software data structure for a new trunk, using caller-specified or next available trunk ID.
 
int opennsl_trunk_destroy (int unit, opennsl_trunk_t tid) LIB_DLL_EXPORTED
 Removes a trunk group.
 
int opennsl_trunk_detach (int unit) LIB_DLL_EXPORTED
 Shut down (uninitialize) the trunk module.
 
int opennsl_trunk_failover_get (int unit, opennsl_trunk_t tid, opennsl_gport_t failport, int *psc, uint32 *flags, int array_size, opennsl_gport_t *fail_to_array, int *array_count) LIB_DLL_EXPORTED
 Retrieve the failover port list for a specific trunk port.
 
int opennsl_trunk_failover_set (int unit, opennsl_trunk_t tid, opennsl_gport_t failport, int psc, uint32 flags, int count, opennsl_gport_t *fail_to_array) LIB_DLL_EXPORTED
 Assign the failover port list for a specific trunk port.
 
int opennsl_trunk_find (int unit, opennsl_module_t modid, opennsl_gport_t gport, opennsl_trunk_t *tid) LIB_DLL_EXPORTED
 Get the trunk group ID for a given system port, specified by Module ID and Port number.
 
int opennsl_trunk_get (int unit, opennsl_trunk_t tid, opennsl_trunk_info_t *t_data, int member_max, opennsl_trunk_member_t *member_array, int *member_count) LIB_DLL_EXPORTED
 Get the current attributes and member ports for the specified trunk group.
 
void opennsl_trunk_info_t_init (opennsl_trunk_info_t *trunk_info) LIB_DLL_EXPORTED
 Initializes the opennsl_trunk_info_t structure.
 
int opennsl_trunk_init (int unit) LIB_DLL_EXPORTED
 Initialize the trunk module and SoC trunk hardware.
 
int opennsl_trunk_member_add (int unit, opennsl_trunk_t tid, opennsl_trunk_member_t *member) LIB_DLL_EXPORTED
 Add a member to a trunk group.
 
int opennsl_trunk_member_delete (int unit, opennsl_trunk_t tid, opennsl_trunk_member_t *member) LIB_DLL_EXPORTED
 Delete a member from a trunk group.
 
void opennsl_trunk_member_t_init (opennsl_trunk_member_t *trunk_member) LIB_DLL_EXPORTED
 Initializes the opennsl_trunk_member_t structure.
 
int opennsl_trunk_psc_set (int unit, opennsl_trunk_t tid, int psc) LIB_DLL_EXPORTED
 Set a trunk's Port Selection Criteria (PSC).
 
int opennsl_trunk_set (int unit, opennsl_trunk_t tid, opennsl_trunk_info_t *trunk_info, int member_count, opennsl_trunk_member_t *member_array) LIB_DLL_EXPORTED
 Specify the ports in a trunk group.