OpenNSL API Guide and Reference Manual
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sal/driver.h>
#include <opennsl/error.h>
#include <opennsl/vlan.h>
#include <opennsl/port.h>
#include <opennsl/switch.h>
#include <opennsl/trunk.h>
#include <examples/util.h>
Go to the source code of this file.
Macros | |
#define | DEFAULT_UNIT 0 |
#define | DEFAULT_VLAN 1 |
#define | MAX_DIGITS_IN_CHOICE 5 |
#define | MAX_TRUNK_MEMBER 8 |
Functions | |
int | example_trunk_create (int unit, opennsl_trunk_t *tid) |
Create a default trunk. | |
int | example_trunk_hash_controls_set (int unit) |
Set hash controls. | |
int | main (int argc, char *argv[]) |
Main function for Trunk application. | |
Variables | |
char | example_usage [] |
#define DEFAULT_UNIT 0 |
Definition at line 45 of file example_trunk.c.
Referenced by main().
#define DEFAULT_VLAN 1 |
Definition at line 46 of file example_trunk.c.
#define MAX_DIGITS_IN_CHOICE 5 |
Definition at line 47 of file example_trunk.c.
#define MAX_TRUNK_MEMBER 8 |
Definition at line 48 of file example_trunk.c.
Referenced by main().
int example_trunk_create | ( | int | unit, |
opennsl_trunk_t * | tid | ||
) |
Create a default trunk.
unit | [IN] Unit number. |
tid | [IN,OUT] Pointer to caller-specified trunk ID if OPENNSL_TRUNK_FLAG_WITH_ID is set, else pointer to next available trunk ID. |
Definition at line 72 of file example_trunk.c.
References opennsl_trunk_create().
Referenced by main().
int example_trunk_hash_controls_set | ( | int | unit | ) |
Set hash controls.
unit | [IN] Unit number. |
Definition at line 88 of file example_trunk.c.
References OPENNSL_E_NONE, OPENNSL_HASH_CONTROL_MULTIPATH_DIP, OPENNSL_HASH_CONTROL_MULTIPATH_L4PORTS, OPENNSL_HASH_CONTROL_TRUNK_NUC_DST, OPENNSL_HASH_CONTROL_TRUNK_NUC_SRC, OPENNSL_HASH_CONTROL_TRUNK_UC_SRCPORT, OPENNSL_IF_ERROR_RETURN, opennsl_switch_control_get(), opennsl_switch_control_set(), and opennslSwitchHashControl.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Main function for Trunk application.
argc,argv | commands line arguments |
Definition at line 126 of file example_trunk.c.
References DEFAULT_UNIT, example_port_default_config(), example_read_user_choice(), example_switch_default_vlan_config(), example_trunk_create(), example_trunk_hash_controls_set(), example_usage, opennsl_trunk_member_s::gport, MAX_TRUNK_MEMBER, NULL, OPENNSL_BOOT_F_WARM_BOOT, opennsl_driver_boot_flags_get(), opennsl_driver_exit(), opennsl_driver_init(), OPENNSL_E_FAIL, OPENNSL_E_NONE, OPENNSL_E_PARAM, opennsl_errmsg, opennsl_port_gport_get(), opennsl_port_local_get(), opennsl_switch_control_set(), opennsl_trunk_destroy(), opennsl_trunk_get(), opennsl_trunk_info_t_init(), opennsl_trunk_member_add(), opennsl_trunk_member_delete(), opennsl_trunk_member_t_init(), opennsl_trunk_psc_set(), opennslSwitchControlSync, port(), and opennsl_trunk_info_s::psc.
char example_usage[] |
Definition at line 50 of file example_trunk.c.