|
OpenNSL API Guide and Reference Manual
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sal/driver.h>#include <opennsl/types.h>#include <opennsl/error.h>#include <opennsl/vlan.h>#include <opennsl/l2.h>#include <opennsl/l3.h>#include <opennsl/mpls.h>#include <examples/util.h>Go to the source code of this file.
Macros | |
| #define | CALL_IF_ERROR_RETURN(op) |
| #define | DEFAULT_UNIT 0 |
| #define | EGRESS_LABEL1_ID 300 |
| #define | EGRESS_LABEL2_ID 400 |
| #define | IN_VLAN 10 |
| #define | INGRESS_LABEL1_ID 200 |
| #define | L3_OUT_INTF_ID 31 |
| #define | LABEL1_TTL 33 |
| #define | LABEL2_TTL 64 |
| #define | MAC_DA {0x00, 0x11, 0x11, 0x11, 0x11, 0x0f} |
| #define | MAC_SA {0x00, 0x11, 0x11, 0x11, 0x11, 0x0e} |
| #define | MAX_DIGITS_IN_CHOICE 5 |
| #define | MY_MAC {0x00, 0x00, 0x00, 0x00, 0x11, 0x11} |
| #define | OUT_VLAN 20 |
| #define | VPN_ID (VRF_ID + VPN_ID_OFFSET) |
| #define | VPN_ID_OFFSET (1 << 12) |
| #define | VRF_ID 0 |
Functions | |
| int | main (int argc, char *argv[]) |
| Main function for MPLS sample application. | |
Variables | |
| char | example_usage [] |
| int | verbose = 3 |
| #define CALL_IF_ERROR_RETURN | ( | op | ) |
Definition at line 95 of file example_mpls.c.
| #define DEFAULT_UNIT 0 |
Definition at line 71 of file example_mpls.c.
Referenced by main().
| #define EGRESS_LABEL1_ID 300 |
Definition at line 89 of file example_mpls.c.
| #define EGRESS_LABEL2_ID 400 |
Definition at line 91 of file example_mpls.c.
| #define IN_VLAN 10 |
Definition at line 83 of file example_mpls.c.
| #define INGRESS_LABEL1_ID 200 |
Definition at line 88 of file example_mpls.c.
| #define L3_OUT_INTF_ID 31 |
Definition at line 86 of file example_mpls.c.
| #define LABEL1_TTL 33 |
Definition at line 90 of file example_mpls.c.
| #define LABEL2_TTL 64 |
Definition at line 92 of file example_mpls.c.
| #define MAC_DA {0x00, 0x11, 0x11, 0x11, 0x11, 0x0f} |
Definition at line 76 of file example_mpls.c.
| #define MAC_SA {0x00, 0x11, 0x11, 0x11, 0x11, 0x0e} |
Definition at line 74 of file example_mpls.c.
| #define MAX_DIGITS_IN_CHOICE 5 |
Definition at line 93 of file example_mpls.c.
| #define MY_MAC {0x00, 0x00, 0x00, 0x00, 0x11, 0x11} |
Definition at line 72 of file example_mpls.c.
| #define OUT_VLAN 20 |
Definition at line 84 of file example_mpls.c.
| #define VPN_ID (VRF_ID + VPN_ID_OFFSET) |
Definition at line 81 of file example_mpls.c.
| #define VPN_ID_OFFSET (1 << 12) |
Definition at line 80 of file example_mpls.c.
| #define VRF_ID 0 |
Definition at line 79 of file example_mpls.c.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Main function for MPLS sample application.
| argc,argv | commands line arguments |
Definition at line 117 of file example_mpls.c.
References DEFAULT_UNIT, example_port_default_config(), example_read_user_choice(), example_switch_default_vlan_config(), example_usage, NULL, opennsl_driver_exit(), opennsl_driver_init(), OPENNSL_E_NONE, OPENNSL_E_PARAM, and opennsl_errmsg.
| char example_usage[] |
Definition at line 41 of file example_mpls.c.
| int verbose = 3 |
Definition at line 68 of file example_mpls.c.