OpenNSL API Guide and Reference Manual
|
Data Structures | |
struct | opennsl_l3_dgm_s |
L3 DGM structure. More... | |
struct | opennsl_l3_ecmp_member_s |
L3 ECMP member structure. More... | |
struct | opennsl_l3_egress_ecmp_s |
L3 ECMP structure. More... | |
struct | opennsl_l3_egress_s |
L3 Egress Structure. More... | |
struct | opennsl_l3_host_s |
L3 Host Structure. More... | |
struct | opennsl_l3_info_s |
L3 Information Structure. More... | |
struct | opennsl_l3_ingress_s |
L3 Ingress Structure. More... | |
struct | opennsl_l3_intf_qos_s |
L3 Interface QOS setting. More... | |
struct | opennsl_l3_intf_s |
L3 Interface Structure. More... | |
struct | opennsl_l3_route_s |
L3 Route Structure. More... | |
Files | |
file | l3.h |
file | l3X.h |
Macros | |
#define | OPENNSL_L3_ADD_TO_ARL (1 << 5) |
Add interface address MAC to ARL. | |
#define | OPENNSL_L3_COPY_TO_CPU (1 << 23) |
Send a copy to CPU. | |
#define | OPENNSL_L3_D_HIT (1 << 3) |
Destination IP address match. | |
#define | OPENNSL_L3_DEFIP_CPU (1 << 13) |
switch family: DEFIP CPU bit set. | |
#define | OPENNSL_L3_DEFIP_LOCAL OPENNSL_L3_DEFIP_CPU |
XGS: Local DEFIP route. | |
#define | OPENNSL_L3_DEREFERENCED_NEXTHOP (1 << 30) |
Indicates this is a wider L3 entry. | |
#define | OPENNSL_L3_DST_DISCARD (1 << 20) |
Destination match discard. | |
#define | OPENNSL_L3_ECMP_DYNAMIC_LOAD_WEIGHT_INVALID -1 |
Invalid value for dynamic_load_weight. | |
#define | OPENNSL_L3_ECMP_DYNAMIC_MODE_NORMAL 1 |
ECMP dynamic load balancing normal mode: if inactivity duration lapsed, use optimal member, else use assigned member. | |
#define | OPENNSL_L3_ECMP_DYNAMIC_MODE_RESILIENT 4 |
ECMP resilient load balancing mode: minimize reassignment of flows to members. | |
#define | OPENNSL_L3_ECMP_DYNAMIC_SCALING_FACTOR_INVALID -1 |
Invalid value for dynamic_scaling_factor. | |
#define | OPENNSL_L3_ECMP_RH_REPLACE OPENNSL_L3_DEREFERENCED_NEXTHOP |
Replace ECMP member without RH flowset table shuffle. | |
#define | OPENNSL_L3_HIT (OPENNSL_L3_S_HIT | OPENNSL_L3_D_HIT) |
#define | OPENNSL_L3_HIT_CLEAR (1 << 4) |
Clear HIT bit. | |
#define | OPENNSL_L3_HOST_AS_ROUTE (1 << 16) |
Use LPM if host table full. | |
#define | OPENNSL_L3_HOST_LOCAL (1 << 15) |
Packet to local IP stack. | |
#define | OPENNSL_L3_INGRESS_DSCP_TRUST (1 << 3) |
Trust incoming DSCP on L3 Ingress. | |
#define | OPENNSL_L3_INGRESS_GLOBAL_ROUTE (1 << 2) |
Allow Global Route on L3 Ingress Interface. | |
#define | OPENNSL_L3_INGRESS_REPLACE (1 << 1) |
Replace existing L3 Ingress entry. | |
#define | OPENNSL_L3_INGRESS_WITH_ID (1 << 0) |
L3 Ingress ID is provided. | |
#define | OPENNSL_L3_IP4_OPTIONS_REPLACE 0x00000002 |
Replace existing entry. | |
#define | OPENNSL_L3_IP4_OPTIONS_WITH_ID 0x00000001 |
With ID option creation. | |
#define | OPENNSL_L3_IP6 (1 << 17) |
IPv6. | |
#define | OPENNSL_L3_IPMC (1 << 11) |
Set IPMC for real IPMC entry. | |
#define | OPENNSL_L3_L2ONLY (1 << 0) |
L2 switch only on interface. | |
#define | OPENNSL_L3_L2TOCPU (1 << 12) |
Packet to CPU unrouted, XGS12: Set IPMC for UC address. | |
#define | OPENNSL_L3_MULTIPATH (1 << 14) |
Specify ECMP treatment. | |
#define | OPENNSL_L3_REPLACE (1 << 8) |
Replace existing entry. | |
#define | OPENNSL_L3_ROUTE_LABEL (1 << 22) |
Indicates that MPLS label in route entry is valid. | |
#define | OPENNSL_L3_RPE (1 << 10) |
Pick up new priority (COS). | |
#define | OPENNSL_L3_RPF (1 << 18) |
RPF check. | |
#define | OPENNSL_L3_S_HIT (1 << 2) |
Source IP address match. | |
#define | OPENNSL_L3_TGID (1 << 9) |
Port belongs to trunk. | |
#define | OPENNSL_L3_UNTAG (1 << 1) |
Packet goes out untagged. | |
#define | OPENNSL_L3_VXLAN_ONLY (1 << 31) |
Specific for VXLAN Nexthop. | |
#define | OPENNSL_L3_WITH_ID (1 << 6) |
ID is provided. | |
Typedefs | |
typedef struct opennsl_l3_dgm_s | opennsl_l3_dgm_t |
L3 DGM structure. | |
typedef struct opennsl_l3_ecmp_member_s | opennsl_l3_ecmp_member_t |
L3 ECMP member structure. | |
typedef struct opennsl_l3_egress_ecmp_s | opennsl_l3_egress_ecmp_t |
L3 ECMP structure. | |
typedef int(* | opennsl_l3_egress_ecmp_traverse_cb )(int unit, opennsl_l3_egress_ecmp_t *ecmp, int intf_count, opennsl_if_t *intf_array, void *user_data) |
typedef int(* | opennsl_l3_egress_multipath_traverse_cb )(int unit, opennsl_if_t mpintf, int intf_count, opennsl_if_t *intf_array, void *user_data) |
typedef struct opennsl_l3_egress_s | opennsl_l3_egress_t |
L3 Egress Structure. | |
typedef int(* | opennsl_l3_egress_traverse_cb )(int unit, opennsl_if_t intf, opennsl_l3_egress_t *info, void *user_data) |
typedef struct opennsl_l3_host_s | opennsl_l3_host_t |
L3 Host Structure. | |
typedef int(* | opennsl_l3_host_traverse_cb )(int unit, int index, opennsl_l3_host_t *info, void *user_data) |
typedef struct opennsl_l3_info_s | opennsl_l3_info_t |
L3 Information Structure. | |
typedef struct opennsl_l3_ingress_s | opennsl_l3_ingress_t |
L3 Ingress Structure. | |
typedef enum opennsl_l3_ingress_urpf_mode_e | opennsl_l3_ingress_urpf_mode_t |
L3 Ingress Interface URPF Mode setting. | |
typedef struct opennsl_l3_intf_qos_s | opennsl_l3_intf_qos_t |
L3 Interface QOS setting. | |
typedef struct opennsl_l3_intf_s | opennsl_l3_intf_t |
L3 Interface Structure. | |
typedef enum opennsl_l3_ip4_options_action_e | opennsl_l3_ip4_options_action_t |
L3 IP options handing actions. | |
typedef struct opennsl_l3_route_s | opennsl_l3_route_t |
L3 Route Structure. | |
typedef int(* | opennsl_l3_route_traverse_cb )(int unit, int index, opennsl_l3_route_t *info, void *user_data) |
typedef enum opennsl_l3_stat_e | opennsl_l3_stat_t |
Types of counters per L3 object. | |
Enumerations | |
enum | opennsl_l3_ingress_urpf_mode_e { opennslL3IngressUrpfDisable = 0, opennslL3IngressUrpfLoose = 1, opennslL3IngressUrpfStrict = 2 } |
L3 Ingress Interface URPF Mode setting. More... | |
enum | opennsl_l3_ip4_options_action_e { opennslIntfIPOptionActionNone = 0, opennslIntfIPOptionActionCopyToCPU = 1, opennslIntfIPOptionActionDrop = 2, opennslIntfIPOptionActionCopyCPUAndDrop = 3 } |
L3 IP options handing actions. More... | |
enum | opennsl_l3_stat_e { opennslL3StatOutPackets = 0, opennslL3StatOutBytes = 1, opennslL3StatDropPackets = 2, opennslL3StatDropBytes = 3, opennslL3StatInPackets = 4, opennslL3StatInBytes = 5 } |
Types of counters per L3 object. More... | |
Functions | |
int | opennsl_l3_ecmp_get (int unit, opennsl_l3_egress_ecmp_t *ecmp_info, int ecmp_member_size, opennsl_l3_ecmp_member_t *ecmp_member_array, int *ecmp_member_count) LIB_DLL_EXPORTED |
Get info about an Egress ECMP forwarding object. | |
int | opennsl_l3_egress_create (int unit, uint32 flags, opennsl_l3_egress_t *egr, opennsl_if_t *if_id) LIB_DLL_EXPORTED |
Create an Egress forwarding object. | |
int | opennsl_l3_egress_destroy (int unit, opennsl_if_t intf) LIB_DLL_EXPORTED |
Destroy an Egress forwarding object. | |
int | opennsl_l3_egress_ecmp_add (int unit, opennsl_l3_egress_ecmp_t *ecmp, opennsl_if_t intf) LIB_DLL_EXPORTED |
Add an Egress forwarding object to an Egress ECMP forwarding object. | |
int | opennsl_l3_egress_ecmp_create (int unit, opennsl_l3_egress_ecmp_t *ecmp, int intf_count, opennsl_if_t *intf_array) LIB_DLL_EXPORTED |
Create an Egress ECMP forwarding object. | |
int | opennsl_l3_egress_ecmp_delete (int unit, opennsl_l3_egress_ecmp_t *ecmp, opennsl_if_t intf) LIB_DLL_EXPORTED |
Delete an Egress forwarding object from an Egress ECMP forwarding object. | |
int | opennsl_l3_egress_ecmp_destroy (int unit, opennsl_l3_egress_ecmp_t *ecmp) LIB_DLL_EXPORTED |
Destroy an Egress ECMP forwarding object. | |
int | opennsl_l3_egress_ecmp_find (int unit, int intf_count, opennsl_if_t *intf_array, opennsl_l3_egress_ecmp_t *ecmp) LIB_DLL_EXPORTED |
Find an Egress ECMP forwarding object. | |
int | opennsl_l3_egress_ecmp_get (int unit, opennsl_l3_egress_ecmp_t *ecmp, int intf_size, opennsl_if_t *intf_array, int *intf_count) LIB_DLL_EXPORTED |
Get info about an Egress ECMP forwarding object. | |
void | opennsl_l3_egress_ecmp_t_init (opennsl_l3_egress_ecmp_t *ecmp) LIB_DLL_EXPORTED |
Initialize L3 Egress ECMP object structure. | |
int | opennsl_l3_egress_ecmp_traverse (int unit, opennsl_l3_egress_ecmp_traverse_cb trav_fn, void *user_data) LIB_DLL_EXPORTED |
Traverse through the valid Egress ECMP forwarding objects and run callback. | |
int | opennsl_l3_egress_find (int unit, opennsl_l3_egress_t *egr, opennsl_if_t *intf) LIB_DLL_EXPORTED |
Find an interface pointing to an Egress forwarding object. | |
int | opennsl_l3_egress_get (int unit, opennsl_if_t intf, opennsl_l3_egress_t *egr) LIB_DLL_EXPORTED |
Get an Egress forwarding object. | |
int | opennsl_l3_egress_multipath_add (int unit, opennsl_if_t mpintf, opennsl_if_t intf) LIB_DLL_EXPORTED |
Add an Egress forwarding object to an Egress Multipath forwarding object. | |
int | opennsl_l3_egress_multipath_create (int unit, uint32 flags, int intf_count, opennsl_if_t *intf_array, opennsl_if_t *mpintf) LIB_DLL_EXPORTED |
Create a Multipath Egress forwarding object. | |
int | opennsl_l3_egress_multipath_delete (int unit, opennsl_if_t mpintf, opennsl_if_t intf) LIB_DLL_EXPORTED |
Delete an Egress forwarding object from an Egress Multipath forwarding object. | |
int | opennsl_l3_egress_multipath_destroy (int unit, opennsl_if_t mpintf) LIB_DLL_EXPORTED |
Destroy an Egress Multipath forwarding object. | |
int | opennsl_l3_egress_multipath_find (int unit, int intf_count, opennsl_if_t *intf_array, opennsl_if_t *mpintf) LIB_DLL_EXPORTED |
Find an interface pointing to an Egress Multipath forwarding object. | |
int | opennsl_l3_egress_multipath_get (int unit, opennsl_if_t mpintf, int intf_size, opennsl_if_t *intf_array, int *intf_count) LIB_DLL_EXPORTED |
Get an Egress Multipath forwarding object. | |
int | opennsl_l3_egress_multipath_traverse (int unit, opennsl_l3_egress_multipath_traverse_cb trav_fn, void *user_data) LIB_DLL_EXPORTED |
Traverse through the multipath egress object table and run callback at each valid entry. | |
int | opennsl_l3_egress_stat_attach (int unit, opennsl_if_t intf_id, uint32 stat_counter_id) LIB_DLL_EXPORTED |
Attach counters entries to the given L3 Egress interface. | |
int | opennsl_l3_egress_stat_counter_get (int unit, opennsl_if_t intf_id, opennsl_l3_stat_t stat, uint32 num_entries, uint32 *counter_indexes, opennsl_stat_value_t *counter_values) LIB_DLL_EXPORTED |
Get the specified counter statistic for a L3 egress interface. | |
int | opennsl_l3_egress_stat_detach (int unit, opennsl_if_t intf_id) LIB_DLL_EXPORTED |
Detach counters entries to the given L3 Egress interface. | |
void | opennsl_l3_egress_t_init (opennsl_l3_egress_t *egr) LIB_DLL_EXPORTED |
Initialize a opennsl_l3_egress_t structure. | |
int | opennsl_l3_egress_traverse (int unit, opennsl_l3_egress_traverse_cb trav_fn, void *user_data) LIB_DLL_EXPORTED |
Traverse through the egress object table and run callback at each valid entry. | |
int | opennsl_l3_host_add (int unit, opennsl_l3_host_t *info) LIB_DLL_EXPORTED |
Add an entry into the L3 switching table. | |
int | opennsl_l3_host_delete (int unit, opennsl_l3_host_t *ip_addr) LIB_DLL_EXPORTED |
Delete an entry from the L3 host table. | |
int | opennsl_l3_host_delete_all (int unit, opennsl_l3_host_t *info) LIB_DLL_EXPORTED |
Deletes all L3 host table entries. | |
int | opennsl_l3_host_delete_by_interface (int unit, opennsl_l3_host_t *info) LIB_DLL_EXPORTED |
Deletes L3 entries that match or do not match a specified L3 interface number. | |
int | opennsl_l3_host_find (int unit, opennsl_l3_host_t *info) LIB_DLL_EXPORTED |
Look up an L3 host table entry based on IP address. | |
void | opennsl_l3_host_t_init (opennsl_l3_host_t *ip) LIB_DLL_EXPORTED |
Initialize a opennsl_l3_host_t structure. | |
int | opennsl_l3_host_traverse (int unit, uint32 flags, uint32 start, uint32 end, opennsl_l3_host_traverse_cb cb, void *user_data) LIB_DLL_EXPORTED |
Traverse through the L3 table and run callback at each valid L3 entry. | |
int | opennsl_l3_info (int unit, opennsl_l3_info_t *l3info) LIB_DLL_EXPORTED |
Get the status of hardware tables. | |
void | opennsl_l3_info_t_init (opennsl_l3_info_t *info) LIB_DLL_EXPORTED |
Initialize a opennsl_l3_info_t_init structure. | |
int | opennsl_l3_ingress_create (int unit, opennsl_l3_ingress_t *ing_intf, opennsl_if_t *intf_id) LIB_DLL_EXPORTED |
Create L3 Ingress Interface object. | |
int | opennsl_l3_ingress_stat_attach (int unit, opennsl_if_t intf_id, uint32 stat_counter_id) LIB_DLL_EXPORTED |
Attach counters entries to the given L3 ingress interface. | |
int | opennsl_l3_ingress_stat_counter_get (int unit, opennsl_if_t intf_id, opennsl_l3_stat_t stat, uint32 num_entries, uint32 *counter_indexes, opennsl_stat_value_t *counter_values) LIB_DLL_EXPORTED |
Get counter statistic values for a l3 interface object. | |
int | opennsl_l3_ingress_stat_detach (int unit, opennsl_if_t intf_id) LIB_DLL_EXPORTED |
Detach counters entries to the given L3 ingress interface. | |
void | opennsl_l3_ingress_t_init (opennsl_l3_ingress_t *ing_intf) LIB_DLL_EXPORTED |
Initialize L3 Ingress Interface object structure. | |
int | opennsl_l3_init (int unit) LIB_DLL_EXPORTED |
Initialize the OPENNSL L3 subsystem. | |
int | opennsl_l3_intf_create (int unit, opennsl_l3_intf_t *intf) LIB_DLL_EXPORTED |
Create a new L3 interface. | |
int | opennsl_l3_intf_delete (int unit, opennsl_l3_intf_t *intf) LIB_DLL_EXPORTED |
Delete an L3 interface. | |
int | opennsl_l3_intf_find (int unit, opennsl_l3_intf_t *intf) LIB_DLL_EXPORTED |
Search for L3 interface by MAC address and VLAN. | |
int | opennsl_l3_intf_find_vlan (int unit, opennsl_l3_intf_t *intf) LIB_DLL_EXPORTED |
Search for L3 interface by VLAN only. | |
int | opennsl_l3_intf_get (int unit, opennsl_l3_intf_t *intf) LIB_DLL_EXPORTED |
Given the L3 interface number, return the interface information. | |
void | opennsl_l3_intf_t_init (opennsl_l3_intf_t *intf) LIB_DLL_EXPORTED |
Initialize a opennsl_l3_intf_t structure. | |
int | opennsl_l3_ip4_options_action_get (int unit, int ip4_options_profile_id, int ip4_option, opennsl_l3_ip4_options_action_t *action) LIB_DLL_EXPORTED |
Get Individual IP options action for a given IP option profile. | |
int | opennsl_l3_ip4_options_action_set (int unit, int ip4_options_profile_id, int ip4_option, opennsl_l3_ip4_options_action_t action) LIB_DLL_EXPORTED |
Set Individual IP options action for a given IP option profile. | |
int | opennsl_l3_ip4_options_profile_create (int unit, uint32 flags, opennsl_l3_ip4_options_action_t default_action, int *ip4_options_profile_id) LIB_DLL_EXPORTED |
Create a new L3 IP options handling profile. | |
int | opennsl_l3_ip4_options_profile_destroy (int unit, int ip4_options_profile_id) LIB_DLL_EXPORTED |
Delete an L3 IP options Profile. | |
int | opennsl_l3_route_add (int unit, opennsl_l3_route_t *info) LIB_DLL_EXPORTED |
Add an IP route to the L3 route table. | |
int | opennsl_l3_route_delete (int unit, opennsl_l3_route_t *info) LIB_DLL_EXPORTED |
Delete an IP route from the DEFIP table. | |
int | opennsl_l3_route_delete_all (int unit, opennsl_l3_route_t *info) LIB_DLL_EXPORTED |
Delete all routes. | |
int | opennsl_l3_route_delete_by_interface (int unit, opennsl_l3_route_t *info) LIB_DLL_EXPORTED |
Delete routes based on matching or non-matching L3 interface number. | |
int | opennsl_l3_route_get (int unit, opennsl_l3_route_t *info) LIB_DLL_EXPORTED |
Look up a route given the network and netmask. | |
int | opennsl_l3_route_max_ecmp_get (int unit, int *max) LIB_DLL_EXPORTED |
Get the maximum ECMP paths allowed for a route (switch family only). | |
int | opennsl_l3_route_max_ecmp_set (int unit, int max) LIB_DLL_EXPORTED |
Set the maximum ECMP paths allowed for a route (switch family only). | |
int | opennsl_l3_route_multipath_get (int unit, opennsl_l3_route_t *the_route, opennsl_l3_route_t *path_array, int max_path, int *path_count) LIB_DLL_EXPORTED |
Given a network, return all the paths for this route. | |
void | opennsl_l3_route_t_init (opennsl_l3_route_t *route) LIB_DLL_EXPORTED |
Initialize a opennsl_l3_route_t structure. | |
int | opennsl_l3_route_traverse (int unit, uint32 flags, uint32 start, uint32 end, opennsl_l3_route_traverse_cb trav_fn, void *user_data) LIB_DLL_EXPORTED |
Traverse through the routing table and run callback at each route. | |
int | opennsl_l3_vrrp_add (int unit, opennsl_vlan_t vlan, uint32 vrid) LIB_DLL_EXPORTED |
Add VRID for the given VSI. | |
int | opennsl_l3_vrrp_delete (int unit, opennsl_vlan_t vlan, uint32 vrid) LIB_DLL_EXPORTED |
Delete VRID for a particular VLAN/VSI. | |
int | opennsl_l3_vrrp_delete_all (int unit, opennsl_vlan_t vlan) LIB_DLL_EXPORTED |
Delete all the VRIDs for a particular VLAN/VSI. | |
int | opennsl_l3_vrrp_get (int unit, opennsl_vlan_t vlan, int alloc_size, int *vrid_array, int *count) LIB_DLL_EXPORTED |
Get all the VRIDs for which the physical node is master for the virtual routers on the given VLAN/VSI. | |
#define OPENNSL_L3_ADD_TO_ARL (1 << 5) |
#define OPENNSL_L3_DEFIP_CPU (1 << 13) |
#define OPENNSL_L3_DEFIP_LOCAL OPENNSL_L3_DEFIP_CPU |
#define OPENNSL_L3_DEREFERENCED_NEXTHOP (1 << 30) |
#define OPENNSL_L3_DST_DISCARD (1 << 20) |
#define OPENNSL_L3_ECMP_DYNAMIC_LOAD_WEIGHT_INVALID -1 |
#define OPENNSL_L3_ECMP_DYNAMIC_MODE_NORMAL 1 |
#define OPENNSL_L3_ECMP_DYNAMIC_MODE_RESILIENT 4 |
#define OPENNSL_L3_ECMP_DYNAMIC_SCALING_FACTOR_INVALID -1 |
#define OPENNSL_L3_ECMP_RH_REPLACE OPENNSL_L3_DEREFERENCED_NEXTHOP |
#define OPENNSL_L3_HIT (OPENNSL_L3_S_HIT | OPENNSL_L3_D_HIT) |
#define OPENNSL_L3_HOST_AS_ROUTE (1 << 16) |
#define OPENNSL_L3_HOST_LOCAL (1 << 15) |
#define OPENNSL_L3_INGRESS_DSCP_TRUST (1 << 3) |
Trust incoming DSCP on L3 Ingress.
Definition at line 77 of file l3.h.
Referenced by example_l3_intf_rif_create().
#define OPENNSL_L3_INGRESS_GLOBAL_ROUTE (1 << 2) |
Allow Global Route on L3 Ingress Interface.
Definition at line 75 of file l3.h.
Referenced by example_create_l3_intf(), example_ip_tunnel_term_create_l3_intf(), and example_l3_intf_rif_create().
#define OPENNSL_L3_INGRESS_REPLACE (1 << 1) |
#define OPENNSL_L3_INGRESS_WITH_ID (1 << 0) |
L3 Ingress ID is provided.
Definition at line 72 of file l3.h.
Referenced by example_create_l3_intf(), and example_l3_intf_rif_create().
#define OPENNSL_L3_IP4_OPTIONS_REPLACE 0x00000002 |
#define OPENNSL_L3_IP4_OPTIONS_WITH_ID 0x00000001 |
#define OPENNSL_L3_L2TOCPU (1 << 12) |
#define OPENNSL_L3_REPLACE (1 << 8) |
Replace existing entry.
Definition at line 44 of file l3.h.
Referenced by example_l3_intf_rif_create().
#define OPENNSL_L3_ROUTE_LABEL (1 << 22) |
#define OPENNSL_L3_RPF (1 << 18) |
#define OPENNSL_L3_VXLAN_ONLY (1 << 31) |
#define OPENNSL_L3_WITH_ID (1 << 6) |
typedef struct opennsl_l3_dgm_s opennsl_l3_dgm_t |
L3 DGM structure.
typedef struct opennsl_l3_ecmp_member_s opennsl_l3_ecmp_member_t |
L3 ECMP member structure.
typedef struct opennsl_l3_egress_ecmp_s opennsl_l3_egress_ecmp_t |
L3 ECMP structure.
typedef int(* opennsl_l3_egress_ecmp_traverse_cb)(int unit, opennsl_l3_egress_ecmp_t *ecmp, int intf_count, opennsl_if_t *intf_array, void *user_data) |
typedef int(* opennsl_l3_egress_multipath_traverse_cb)(int unit, opennsl_if_t mpintf, int intf_count, opennsl_if_t *intf_array, void *user_data) |
typedef struct opennsl_l3_egress_s opennsl_l3_egress_t |
L3 Egress Structure.
Description of an L3 forwarding destination.
typedef int(* opennsl_l3_egress_traverse_cb)(int unit, opennsl_if_t intf, opennsl_l3_egress_t *info, void *user_data) |
typedef struct opennsl_l3_host_s opennsl_l3_host_t |
L3 Host Structure.
Contains information required for manipulating L3 host table entries.
The OPENNSL_L3_IP6 flag in l3a_flags must be set to specify whether the IPv4 or IPv6 addresses are valid.
typedef int(* opennsl_l3_host_traverse_cb)(int unit, int index, opennsl_l3_host_t *info, void *user_data) |
typedef struct opennsl_l3_info_s opennsl_l3_info_t |
L3 Information Structure.
Contains information about L3 hardware capacity and utilization.
typedef struct opennsl_l3_ingress_s opennsl_l3_ingress_t |
L3 Ingress Structure.
Description of an L3 Ingress interface.
L3 Ingress Interface URPF Mode setting.
typedef struct opennsl_l3_intf_qos_s opennsl_l3_intf_qos_t |
L3 Interface QOS setting.
typedef struct opennsl_l3_intf_s opennsl_l3_intf_t |
L3 Interface Structure.
Contains information required for manipulating L3 interfaces.
L3 IP options handing actions.
typedef struct opennsl_l3_route_s opennsl_l3_route_t |
L3 Route Structure.
Contains information required for manipulating L3 route table entries.
The OPENNSL_L3_IP6 flag in l3a_flags must be set to specify whether the IPv4 or IPv6 addresses are valid.
typedef int(* opennsl_l3_route_traverse_cb)(int unit, int index, opennsl_l3_route_t *info, void *user_data) |
typedef enum opennsl_l3_stat_e opennsl_l3_stat_t |
Types of counters per L3 object.
enum opennsl_l3_stat_e |
int opennsl_l3_ecmp_get | ( | int | unit, |
opennsl_l3_egress_ecmp_t * | ecmp_info, | ||
int | ecmp_member_size, | ||
opennsl_l3_ecmp_member_t * | ecmp_member_array, | ||
int * | ecmp_member_count | ||
) |
Get info about an Egress ECMP forwarding object.
unit | [IN] Unit number. |
ecmp_info | [IN,OUT] ECMP group info. |
ecmp_member_size | [IN] Size of allocated entries in ecmp_member_array. |
ecmp_member_array | [OUT] Member array of Egress forwarding objects. |
ecmp_member_count | [OUT] Number of entries of ecmp_member_count actually filled in. This will be a value less than or equal to the value passed in as ecmp_member_size unless ecmp_member_size is 0. If ecmp_member_size is 0 then ecmp_member_array is ignored and ecmp_member_count is filled in with the number of entries that would have been filled into ecmp_member_array if ecmp_member_size was arbitrarily large. |
OPENNSL_E_XXX |
int opennsl_l3_egress_create | ( | int | unit, |
uint32 | flags, | ||
opennsl_l3_egress_t * | egr, | ||
opennsl_if_t * | if_id | ||
) |
Create an Egress forwarding object.
unit | [IN] Unit number. |
flags | [IN] OPENNSL_L3_REPLACE: replace existing. OPENNSL_L3_WITH_ID: intf argument is given. |
egr | [IN,OUT] Egress forwarding destination. |
if_id | [IN,OUT] |
OPENNSL_E_XXX |
Referenced by example_create_l3_egress(), and example_l3_egress_create().
int opennsl_l3_egress_destroy | ( | int | unit, |
opennsl_if_t | intf | ||
) |
Destroy an Egress forwarding object.
unit | [IN] Unit number. |
intf | [IN] L3 interface ID pointing to Egress object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_ecmp_add | ( | int | unit, |
opennsl_l3_egress_ecmp_t * | ecmp, | ||
opennsl_if_t | intf | ||
) |
Add an Egress forwarding object to an Egress ECMP forwarding object.
unit | [IN] Unit number. |
ecmp | [IN] ECMP group info. |
intf | [IN] L3 interface ID pointing to Egress forwarding object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_ecmp_create | ( | int | unit, |
opennsl_l3_egress_ecmp_t * | ecmp, | ||
int | intf_count, | ||
opennsl_if_t * | intf_array | ||
) |
Create an Egress ECMP forwarding object.
unit | [IN] Unit number. |
ecmp | [IN,OUT] ECMP group info. |
intf_count | [IN] Number of elements in intf_array. |
intf_array | [IN] Array of Egress forwarding objects. |
OPENNSL_E_XXX |
int opennsl_l3_egress_ecmp_delete | ( | int | unit, |
opennsl_l3_egress_ecmp_t * | ecmp, | ||
opennsl_if_t | intf | ||
) |
Delete an Egress forwarding object from an Egress ECMP forwarding object.
unit | [IN] Unit number. |
ecmp | [IN] ECMP group info. |
intf | [IN] L3 interface ID pointing to Egress forwarding object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_ecmp_destroy | ( | int | unit, |
opennsl_l3_egress_ecmp_t * | ecmp | ||
) |
Destroy an Egress ECMP forwarding object.
unit | [IN] Unit number. |
ecmp | [IN] ECMP group info. |
OPENNSL_E_XXX |
int opennsl_l3_egress_ecmp_find | ( | int | unit, |
int | intf_count, | ||
opennsl_if_t * | intf_array, | ||
opennsl_l3_egress_ecmp_t * | ecmp | ||
) |
Find an Egress ECMP forwarding object.
unit | [IN] Unit number. |
intf_count | [IN] Number of elements in intf_array. |
intf_array | [IN] Array of Egress forwarding objects. |
ecmp | [OUT] ECMP group info. |
OPENNSL_E_XXX |
int opennsl_l3_egress_ecmp_get | ( | int | unit, |
opennsl_l3_egress_ecmp_t * | ecmp, | ||
int | intf_size, | ||
opennsl_if_t * | intf_array, | ||
int * | intf_count | ||
) |
Get info about an Egress ECMP forwarding object.
unit | [IN] Unit number. |
ecmp | [IN,OUT] ECMP group info. |
intf_size | [IN] Size of allocated entries in intf_array. |
intf_array | [OUT] Array of Egress forwarding objects. |
intf_count | [OUT] Number of entries of intf_count actually filled in. This will be a value less than or equal to the value passed in as intf_size unless intf_size is 0. If intf_size is 0 then intf_array is ignored and intf_count is filled in with the number of entries that would have been filled into intf_array if intf_size was arbitrarily large. |
OPENNSL_E_XXX |
void opennsl_l3_egress_ecmp_t_init | ( | opennsl_l3_egress_ecmp_t * | ecmp | ) |
Initialize L3 Egress ECMP object structure.
ecmp | [IN,OUT] L3 Egress ECMP object structure |
Nothing |
int opennsl_l3_egress_ecmp_traverse | ( | int | unit, |
opennsl_l3_egress_ecmp_traverse_cb | trav_fn, | ||
void * | user_data | ||
) |
Traverse through the valid Egress ECMP forwarding objects and run callback.
unit | [IN] Unit number. |
trav_fn | [IN] Callback function |
user_data | [IN] User data to be passed to callback function |
OPENNSL_E_XXX |
int opennsl_l3_egress_find | ( | int | unit, |
opennsl_l3_egress_t * | egr, | ||
opennsl_if_t * | intf | ||
) |
Find an interface pointing to an Egress forwarding object.
unit | [IN] Unit number. |
egr | [IN] Egress forwarding path properties. |
intf | [OUT] L3 interface ID pointing to Egress object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_get | ( | int | unit, |
opennsl_if_t | intf, | ||
opennsl_l3_egress_t * | egr | ||
) |
Get an Egress forwarding object.
unit | [IN] Unit number. |
intf | [IN] L3 interface ID pointing to Egress object. |
egr | [OUT] Egress forwarding path properties. |
OPENNSL_E_XXX |
int opennsl_l3_egress_multipath_add | ( | int | unit, |
opennsl_if_t | mpintf, | ||
opennsl_if_t | intf | ||
) |
Add an Egress forwarding object to an Egress Multipath forwarding object.
unit | [IN] Unit number. |
mpintf | [IN] L3 interface ID pointing to Egress multipath object. |
intf | [IN] L3 interface ID pointing to Egress forwarding object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_multipath_create | ( | int | unit, |
uint32 | flags, | ||
int | intf_count, | ||
opennsl_if_t * | intf_array, | ||
opennsl_if_t * | mpintf | ||
) |
Create a Multipath Egress forwarding object.
unit | [IN] Unit number. |
flags | [IN] OPENNSL_L3_REPLACE: replace existing. OPENNSL_L3_WITH_ID: intf argument is given. |
intf_count | [IN] Number of elements in intf_array. |
intf_array | [IN] Array of Egress forwarding objects. |
mpintf | [IN,OUT] L3 interface ID pointing to Egress object. This is an IN argument if either OPENNSL_L3_REPLACE or OPENNSL_L3_WITH_ID are given in flags. |
OPENNSL_E_XXX |
int opennsl_l3_egress_multipath_delete | ( | int | unit, |
opennsl_if_t | mpintf, | ||
opennsl_if_t | intf | ||
) |
Delete an Egress forwarding object from an Egress Multipath forwarding object.
unit | [IN] Unit number. |
mpintf | [IN] L3 interface ID pointing to Egress multipath object. |
intf | [IN] L3 interface ID pointing to Egress forwarding object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_multipath_destroy | ( | int | unit, |
opennsl_if_t | mpintf | ||
) |
Destroy an Egress Multipath forwarding object.
unit | [IN] Unit number. |
mpintf | [IN] L3 interface ID pointing to Egress multipath object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_multipath_find | ( | int | unit, |
int | intf_count, | ||
opennsl_if_t * | intf_array, | ||
opennsl_if_t * | mpintf | ||
) |
Find an interface pointing to an Egress Multipath forwarding object.
unit | [IN] Unit number. |
intf_count | [IN] Number of elements in intf_array. |
intf_array | [IN] Array of Egress forwarding objects. |
mpintf | [OUT] L3 interface ID pointing to Multipath Egress object. |
OPENNSL_E_XXX |
int opennsl_l3_egress_multipath_get | ( | int | unit, |
opennsl_if_t | mpintf, | ||
int | intf_size, | ||
opennsl_if_t * | intf_array, | ||
int * | intf_count | ||
) |
Get an Egress Multipath forwarding object.
unit | [IN] Unit number. |
mpintf | [IN] L3 interface ID pointing to Egress multipath object. |
intf_size | [IN] Size of allocated entries in intf_array. |
intf_array | [OUT] Array of Egress forwarding objects. |
intf_count | [OUT] Number of entries of intf_count actually filled in. This will be a value less than or equal to the value passed in as intf_size unless intf_size is 0. If intf_size is 0 then intf_array is ignored and intf_count is filled in with the number of entries that would have been filled into intf_array if intf_size was arbitrarily large. |
OPENNSL_E_XXX |
int opennsl_l3_egress_multipath_traverse | ( | int | unit, |
opennsl_l3_egress_multipath_traverse_cb | trav_fn, | ||
void * | user_data | ||
) |
Traverse through the multipath egress object table and run callback at each valid entry.
unit | [IN] Unit number. |
trav_fn | [IN] Callback function |
user_data | [IN] User data to be passed to callback function |
OPENNSL_E_XXX |
int opennsl_l3_egress_stat_attach | ( | int | unit, |
opennsl_if_t | intf_id, | ||
uint32 | stat_counter_id | ||
) |
Attach counters entries to the given L3 Egress interface.
unit | [IN] Unit number. |
intf_id | [IN] Interface ID of a egress L3 object |
stat_counter_id | [IN] Stat Counter ID |
OPENNSL_E_xxx |
int opennsl_l3_egress_stat_counter_get | ( | int | unit, |
opennsl_if_t | intf_id, | ||
opennsl_l3_stat_t | stat, | ||
uint32 | num_entries, | ||
uint32 * | counter_indexes, | ||
opennsl_stat_value_t * | counter_values | ||
) |
Get the specified counter statistic for a L3 egress interface.
unit | [IN] Unit number. |
intf_id | [IN] Interface ID of a egress L3 object. |
stat | [IN] Type of the counter to retrieve that is, ingress/egress byte/packet |
num_entries | [IN] Number of counter Entries |
counter_indexes | [IN] Pointer to Counter indexes entries |
counter_values | [OUT] Pointer to counter values |
OPENNSL_E_xxx |
int opennsl_l3_egress_stat_detach | ( | int | unit, |
opennsl_if_t | intf_id | ||
) |
Detach counters entries to the given L3 Egress interface.
unit | [IN] Unit number. |
intf_id | [IN] Interface ID of a egress L3 object. |
OPENNSL_E_xxx |
void opennsl_l3_egress_t_init | ( | opennsl_l3_egress_t * | egr | ) |
Initialize a opennsl_l3_egress_t structure.
egr | [IN,OUT] Egress object entry information |
Nothing |
Referenced by example_create_l3_egress(), and example_l3_egress_create().
int opennsl_l3_egress_traverse | ( | int | unit, |
opennsl_l3_egress_traverse_cb | trav_fn, | ||
void * | user_data | ||
) |
Traverse through the egress object table and run callback at each valid entry.
unit | [IN] Unit number. |
trav_fn | [IN] Callback function |
user_data | [IN] User data to be passed to callback function |
OPENNSL_E_XXX |
int opennsl_l3_host_add | ( | int | unit, |
opennsl_l3_host_t * | info | ||
) |
Add an entry into the L3 switching table.
unit | [IN] Unit number. |
info | [IN] Pointer to opennsl_l3_host_t containing fields related to L3 host table: =L3_HOST_ADD_FIELDS_table |
OPENNSL_E_XXX | |
This | function supersedes . |
Referenced by example_add_host(), and example_host_add().
int opennsl_l3_host_delete | ( | int | unit, |
opennsl_l3_host_t * | ip_addr | ||
) |
Delete an entry from the L3 host table.
unit | [IN] Unit number. |
ip_addr | [IN] Pointer to opennsl_l3_host_t containing fields related to the IP address to be deleted from the L3 host table: =L3_HOST_DELETE_FIELDS_table |
OPENNSL_E_XXX | |
This | function supersedes . |
int opennsl_l3_host_delete_all | ( | int | unit, |
opennsl_l3_host_t * | info | ||
) |
Deletes all L3 host table entries.
unit | [IN] Unit number. |
info | [IN] Structure containing flags |
OPENNSL_E_XXX | |
This | function supersedes . |
int opennsl_l3_host_delete_by_interface | ( | int | unit, |
opennsl_l3_host_t * | info | ||
) |
Deletes L3 entries that match or do not match a specified L3 interface number.
unit | [IN] Unit number. |
info | [IN] Structure specifying the L3 interface: =L3_HOST_DELETE_IF_FIELDS_table |
OPENNSL_E_XXX | |
This | function supersedes . |
Trident3 | - This function cannot be used to delete flex L3 Host entries |
pointing | to IPMC group. |
int opennsl_l3_host_find | ( | int | unit, |
opennsl_l3_host_t * | info | ||
) |
Look up an L3 host table entry based on IP address.
unit | [IN] Unit number. |
info | [IN,OUT] Pointer to opennsl_l3_host_t =L3_HOST_FIND_FIELDS_table |
OPENNSL_E_NOT_FOUND | - Matching host table entry not found |
OPENNSL_E_XXX | - Other error code |
This | function supersedes . |
void opennsl_l3_host_t_init | ( | opennsl_l3_host_t * | ip | ) |
Initialize a opennsl_l3_host_t structure.
ip | [IN,OUT] |
Nothing |
Referenced by example_add_host(), and example_host_add().
int opennsl_l3_host_traverse | ( | int | unit, |
uint32 | flags, | ||
uint32 | start, | ||
uint32 | end, | ||
opennsl_l3_host_traverse_cb | cb, | ||
void * | user_data | ||
) |
Traverse through the L3 table and run callback at each valid L3 entry.
unit | [IN] Unit number. |
flags | [IN] Operation control flags |
start | [IN] The starting valid entry number to be traversed |
end | [IN] The last valid entry number to be traversed |
cb | [IN] Callback function |
user_data | [IN] User data to be passed to callback function |
OPENNSL_E_XXX |
int opennsl_l3_info | ( | int | unit, |
opennsl_l3_info_t * | l3info | ||
) |
Get the status of hardware tables.
unit | [IN] Unit number. |
l3info | [OUT] L3 capacity and usage information |
OPENNSL_E_XXX |
void opennsl_l3_info_t_init | ( | opennsl_l3_info_t * | info | ) |
Initialize a opennsl_l3_info_t_init structure.
info | [IN,OUT] Pointer to L3 information structure to initialize. |
Nothing |
int opennsl_l3_ingress_create | ( | int | unit, |
opennsl_l3_ingress_t * | ing_intf, | ||
opennsl_if_t * | intf_id | ||
) |
Create L3 Ingress Interface object.
unit | [IN] Unit number. |
ing_intf | [IN] Egress forwarding destination. |
intf_id | [IN,OUT] L3 Ingress Interface ID pointing to L3 IIF object. This is an IN argument if either OPENNSL_L3_INGRESS_REPLACE or OPENNSL_L3_INGRESS_WITH_ID are given in flags. |
OPENNSL_E_XXX |
Referenced by example_create_l3_intf(), and example_l3_intf_rif_create().
int opennsl_l3_ingress_stat_attach | ( | int | unit, |
opennsl_if_t | intf_id, | ||
uint32 | stat_counter_id | ||
) |
Attach counters entries to the given L3 ingress interface.
unit | [IN] Unit number. |
intf_id | [IN] Interface ID of a L3 ingress object or a valid VLAN |
stat_counter_id | [IN] Stat Counter ID |
OPENNSL_E_xxx |
int opennsl_l3_ingress_stat_counter_get | ( | int | unit, |
opennsl_if_t | intf_id, | ||
opennsl_l3_stat_t | stat, | ||
uint32 | num_entries, | ||
uint32 * | counter_indexes, | ||
opennsl_stat_value_t * | counter_values | ||
) |
Get counter statistic values for a l3 interface object.
unit | [IN] Unit number. |
intf_id | [IN] Interface ID of a L3 ingress object or a valid VLAN |
stat | [IN] Type of the counter to retrieve that is, ingress/egress byte/packet |
num_entries | [IN] Number of counter Entries |
counter_indexes | [IN] Pointer to Counter indexes entries |
counter_values | [OUT] Pointer to counter values |
OPENNSL_E_xxx |
int opennsl_l3_ingress_stat_detach | ( | int | unit, |
opennsl_if_t | intf_id | ||
) |
Detach counters entries to the given L3 ingress interface.
unit | [IN] Unit number. |
intf_id | [IN] Interface ID of a L3 ingress object or a valid VLAN |
OPENNSL_E_xxx |
void opennsl_l3_ingress_t_init | ( | opennsl_l3_ingress_t * | ing_intf | ) |
Initialize L3 Ingress Interface object structure.
ing_intf | [IN,OUT] Ingress object entry information |
Nothing |
Referenced by example_create_l3_intf(), and example_l3_intf_rif_create().
int opennsl_l3_init | ( | int | unit | ) |
Initialize the OPENNSL L3 subsystem.
unit | [IN] Unit number. |
OPENNSL_E_XXX |
int opennsl_l3_intf_create | ( | int | unit, |
opennsl_l3_intf_t * | intf | ||
) |
Create a new L3 interface.
unit | [IN] Unit number. |
intf | [IN,OUT] Interface information =L3_INTF_CREATE_FLAGS_table |
OPENNSL_E_XXX |
Referenced by example_create_l3_intf(), and example_l3_intf_rif_create().
int opennsl_l3_intf_delete | ( | int | unit, |
opennsl_l3_intf_t * | intf | ||
) |
Delete an L3 interface.
unit | [IN] Unit number. |
intf | [IN] L3 interface information. Valid fields: l3a_intf_id - ID of interface to be deleted |
OPENNSL_E_XXX |
int opennsl_l3_intf_find | ( | int | unit, |
opennsl_l3_intf_t * | intf | ||
) |
Search for L3 interface by MAC address and VLAN.
unit | [IN] Unit number. |
intf | [IN,OUT] L3 interface information =L3_INTF_FIND_FLAGS_table |
OPENNSL_E_NOT_FOUND | - Interface not found |
OPENNSL_E_XXX | - Other error code |
int opennsl_l3_intf_find_vlan | ( | int | unit, |
opennsl_l3_intf_t * | intf | ||
) |
Search for L3 interface by VLAN only.
unit | [IN] Unit number. |
intf | [IN,OUT] L3 interface information. Valid Input: l3a_vid - Interface VLAN, l3a_intf_id - L3 interface number, if found |
OPENNSL_E_NOT_FOUND | - Interface not found |
OPENNSL_E_XXX | - Other error code |
int opennsl_l3_intf_get | ( | int | unit, |
opennsl_l3_intf_t * | intf | ||
) |
Given the L3 interface number, return the interface information.
unit | [IN] Unit number. |
intf | [IN,OUT] L3 interface information. =L3_INTF_GET_INPUT_table |
OPENNSL_E_XXX |
Referenced by example_l3_intf_rif_create().
void opennsl_l3_intf_t_init | ( | opennsl_l3_intf_t * | intf | ) |
Initialize a opennsl_l3_intf_t structure.
intf | [IN,OUT] Interface information |
Nothing |
Referenced by example_create_l3_intf(), example_ip_tunnel_add(), and example_l3_intf_rif_create().
int opennsl_l3_ip4_options_action_get | ( | int | unit, |
int | ip4_options_profile_id, | ||
int | ip4_option, | ||
opennsl_l3_ip4_options_action_t * | action | ||
) |
Get Individual IP options action for a given IP option profile.
unit | [IN] Unit number. |
ip4_options_profile_id | [IN] ID of IP options profile |
ip4_option | [IN] ID of IP options profile |
action | [OUT] Retrieved action for the IP option specified in ip4_option |
OPENNSL_E_XXX |
int opennsl_l3_ip4_options_action_set | ( | int | unit, |
int | ip4_options_profile_id, | ||
int | ip4_option, | ||
opennsl_l3_ip4_options_action_t | action | ||
) |
Set Individual IP options action for a given IP option profile.
unit | [IN] Unit number. |
ip4_options_profile_id | [IN] ID of IP options profile. ID 0 is reserved and cannot be Modified. |
ip4_option | [IN] ID of IP options profile. ID 0 is reserved and cannot be Modified. |
action | [IN] new action for the IP option specified in ip4_option |
OPENNSL_E_XXX |
int opennsl_l3_ip4_options_profile_create | ( | int | unit, |
uint32 | flags, | ||
opennsl_l3_ip4_options_action_t | default_action, | ||
int * | ip4_options_profile_id | ||
) |
Create a new L3 IP options handling profile.
unit | [IN] Unit number. |
flags | [IN] Flags |
default_action | [IN] default action to apply for all IP options in the profile. |
ip4_options_profile_id | [IN,OUT] Created Profile ID |
OPENNSL_E_XXX |
int opennsl_l3_ip4_options_profile_destroy | ( | int | unit, |
int | ip4_options_profile_id | ||
) |
Delete an L3 IP options Profile.
unit | [IN] Unit number. |
ip4_options_profile_id | [OUT] ID of IP options profile. ID 0 is reserved and cannot be deleted. |
OPENNSL_E_XXX |
int opennsl_l3_route_add | ( | int | unit, |
opennsl_l3_route_t * | info | ||
) |
Add an IP route to the L3 route table.
unit | [IN] Unit number. |
info | [IN] Pointer to opennsl_l3_host_t containing fields related to routing table: =L3_ROUTE_ADD_FIELDS_table |
OPENNSL_E_XXX |
Referenced by example_route_add(), and example_set_default_route().
int opennsl_l3_route_delete | ( | int | unit, |
opennsl_l3_route_t * | info | ||
) |
Delete an IP route from the DEFIP table.
unit | [IN] Unit number. |
info | [IN] Pointer to opennsl_l3_route_t containing the route to delete. Valid Fields: =L3_ROUTE_DELETE_FIELDS_table and if OPENNSL_L3_MULTIPATH flag is set, the following fields are also applicable: =L3_ROUTE_DELETE_MULTICAST_FIELDS_table |
OPENNSL_E_XXX |
int opennsl_l3_route_delete_all | ( | int | unit, |
opennsl_l3_route_t * | info | ||
) |
Delete all routes.
unit | [IN] Unit number. |
info | [IN] Route information, of which only l3a_flags is used. |
OPENNSL_E_XXX |
int opennsl_l3_route_delete_by_interface | ( | int | unit, |
opennsl_l3_route_t * | info | ||
) |
Delete routes based on matching or non-matching L3 interface number.
unit | [IN] Unit number. |
info | [IN] Structure containing the L3 interface. Valid fields: =L3_ROUTE_DEL_BY_INTF_FIELDS_table |
OPENNSL_E_XXX |
int opennsl_l3_route_get | ( | int | unit, |
opennsl_l3_route_t * | info | ||
) |
Look up a route given the network and netmask.
unit | [IN] Unit number. |
info | [IN,OUT] Pointer to opennsl_l3_route_t specifying the network number. =L3_ROUTE_GET_FIELDS_table |
OPENNSL_E_XXX |
int opennsl_l3_route_max_ecmp_get | ( | int | unit, |
int * | max | ||
) |
Get the maximum ECMP paths allowed for a route (switch family only).
unit | [IN] Unit number. |
max | [OUT] Maximum number of ECMP paths |
OPENNSL_E_XXX | |
Additional | Information |
int opennsl_l3_route_max_ecmp_set | ( | int | unit, |
int | max | ||
) |
Set the maximum ECMP paths allowed for a route (switch family only).
For optimized Resilient Hashing, maximum ECMP paths is a dummy variable.
unit | [IN] Unit number. |
max | [IN] Maximum number of ECMP paths allowed |
OPENNSL_E_XXX |
int opennsl_l3_route_multipath_get | ( | int | unit, |
opennsl_l3_route_t * | the_route, | ||
opennsl_l3_route_t * | path_array, | ||
int | max_path, | ||
int * | path_count | ||
) |
Given a network, return all the paths for this route.
unit | [IN] Unit number. |
the_route | [IN] Pointer to opennsl_l3_route_t specifying the network number. Valid fields: =L3_ROUTE_MP_GET_ROUTE_FIELDS_table |
path_array | [OUT] Array of opennsl_l3_route_t to hold output path information for the network. Valid fields: =L3_ROUTE_MP_PATH_FIELDS_table |
max_path | [IN] Maximum number of ECMP paths that may be returned. |
path_count | [OUT] |
OPENNSL_E_XXX |
void opennsl_l3_route_t_init | ( | opennsl_l3_route_t * | route | ) |
Initialize a opennsl_l3_route_t structure.
route | [IN,OUT] Route information |
Nothing |
Referenced by example_route_add(), and example_set_default_route().
int opennsl_l3_route_traverse | ( | int | unit, |
uint32 | flags, | ||
uint32 | start, | ||
uint32 | end, | ||
opennsl_l3_route_traverse_cb | trav_fn, | ||
void * | user_data | ||
) |
Traverse through the routing table and run callback at each route.
unit | [IN] Unit number. |
flags | [IN] Operation control flags |
start | [IN] The starting route number to be traversed |
end | [IN] The last route number to be traversed |
trav_fn | [IN] Callback function |
user_data | [IN] User data to be passed to callback routine |
OPENNSL_E_XXX |
int opennsl_l3_vrrp_add | ( | int | unit, |
opennsl_vlan_t | vlan, | ||
uint32 | vrid | ||
) |
Add VRID for the given VSI.
Adding a VRID using this API means the physical node has become the master for the virtual router.
unit | [IN] Unit number. |
vlan | [IN] VLAN/VSI/VPN Identifier |
vrid | [IN] VRID - Virtual router ID to be added |
OPENNSL_E_XXX |
int opennsl_l3_vrrp_delete | ( | int | unit, |
opennsl_vlan_t | vlan, | ||
uint32 | vrid | ||
) |
Delete VRID for a particular VLAN/VSI.
unit | [IN] Unit number. |
vlan | [IN] VLAN/VSI |
vrid | [IN] VRID - Virtual router ID to be deleted |
OPENNSL_E_XXX |
int opennsl_l3_vrrp_delete_all | ( | int | unit, |
opennsl_vlan_t | vlan | ||
) |
Delete all the VRIDs for a particular VLAN/VSI.
unit | [IN] Unit number. |
vlan | [IN] VLAN/VSI |
OPENNSL_E_XXX |
int opennsl_l3_vrrp_get | ( | int | unit, |
opennsl_vlan_t | vlan, | ||
int | alloc_size, | ||
int * | vrid_array, | ||
int * | count | ||
) |
Get all the VRIDs for which the physical node is master for the virtual routers on the given VLAN/VSI.
unit | [IN] Unit number. |
vlan | [IN] VLAN/VSI |
alloc_size | [IN] Number of vrid_array elements |
vrid_array | [OUT] Pointer to the array to which the VRIDs will be copied |
count | [OUT] Number of VRIDs copied |
OPENNSL_E_XXX |