OpenNSL API Guide and Reference Manual
|
Go to the source code of this file.
Data Structures | |
struct | opennsl_knet_filter_s |
Kernel packet filter structure. More... | |
struct | opennsl_knet_netif_s |
Kernel network interface structure. More... | |
Macros | |
#define | OPENNSL_KNET_DEST_T_NETIF 1 |
Send packet to virtual network interface. | |
#define | OPENNSL_KNET_DEST_T_OPENNSL_RX_API 2 |
Send packet to OPENNSL Rx API. | |
#define | OPENNSL_KNET_FILTER_DESC_MAX 32 |
#define | OPENNSL_KNET_FILTER_F_STRIP_TAG 0x00000001 |
Strip VLAN tag from packets sent to vitual network interfaces. | |
#define | OPENNSL_KNET_FILTER_M_FP_RULE 0x00000040 |
Match filter processor rule number. | |
#define | OPENNSL_KNET_FILTER_M_INGPORT 0x00000004 |
Match local ingress port. | |
#define | OPENNSL_KNET_FILTER_M_RAW 0x00000001 |
Match raw packet data. | |
#define | OPENNSL_KNET_FILTER_M_REASON 0x00000020 |
Match copy-to-CPU reason code. | |
#define | OPENNSL_KNET_FILTER_M_VLAN 0x00000002 |
Match VLAN ID. | |
#define | OPENNSL_KNET_FILTER_SIZE_MAX 256 |
#define | OPENNSL_KNET_FILTER_T_RX_PKT 1 |
Rx packet filter. | |
#define | OPENNSL_KNET_NETIF_F_ADD_TAG 0x00000001 |
Add VLAN tag to packets sent directly to physical port. | |
#define | OPENNSL_KNET_NETIF_NAME_MAX 16 |
#define | OPENNSL_KNET_NETIF_T_TX_CPU_INGRESS 1 |
Tx packets are sent through CPU port ingress logic. | |
#define | OPENNSL_KNET_NETIF_T_TX_LOCAL_PORT 2 |
Tx packets are sent to local device port bypassing switch logic. | |
Typedefs | |
typedef struct opennsl_knet_filter_s | opennsl_knet_filter_t |
Kernel packet filter structure. | |
typedef int(* | opennsl_knet_filter_traverse_cb )(int unit, opennsl_knet_filter_t *filter, void *user_data) |
typedef struct opennsl_knet_netif_s | opennsl_knet_netif_t |
Kernel network interface structure. | |
typedef int(* | opennsl_knet_netif_traverse_cb )(int unit, opennsl_knet_netif_t *netif, void *user_data) |
Functions | |
int | opennsl_knet_filter_create (int unit, opennsl_knet_filter_t *filter) LIB_DLL_EXPORTED |
Create a kernel packet filter. | |
int | opennsl_knet_filter_destroy (int unit, int filter_id) LIB_DLL_EXPORTED |
Destroy a kernel packet filter. | |
void | opennsl_knet_filter_t_init (opennsl_knet_filter_t *filter) LIB_DLL_EXPORTED |
Initialize a opennsl_knet_filter_t structure. | |
int | opennsl_knet_filter_traverse (int unit, opennsl_knet_filter_traverse_cb trav_fn, void *user_data) LIB_DLL_EXPORTED |
Traverse kernel packet filter objects. | |
int | opennsl_knet_init (int unit) LIB_DLL_EXPORTED |
Initialize the kernel networking subsystem. | |
int | opennsl_knet_netif_create (int unit, opennsl_knet_netif_t *netif) LIB_DLL_EXPORTED |
Create a kernel network interface. | |
int | opennsl_knet_netif_destroy (int unit, int netif_id) LIB_DLL_EXPORTED |
Destroy a kernel network interface. | |
void | opennsl_knet_netif_t_init (opennsl_knet_netif_t *netif) LIB_DLL_EXPORTED |
Initialize a opennsl_knet_netif_t structure. | |
int | opennsl_knet_netif_traverse (int unit, opennsl_knet_netif_traverse_cb trav_fn, void *user_data) LIB_DLL_EXPORTED |
Traverse kernel network interface objects. | |