src/stack/vlan/vlan.c File Reference

The file implements the VLAN core stack functionality. More...


Functions

uint VLANReceivePacket (PBM_Handle hPkt)
int VLANAddDevice (uint index, UINT16 vlan_id, UINT8 default_priority, UINT8 prio_mapping[MAX_PRIO_VAL])
int VLANDelDevice (UINT16 dev_index)
void VLANInit (void)
void VLANDeinit (void)


Detailed Description

The file implements the VLAN core stack functionality.

NOTE: (C) Copyright 2008, Texas Instruments, Inc.

Function Documentation

int VLANAddDevice ( uint  index,
UINT16  vlan_id,
UINT8  default_priority,
UINT8  prio_mapping[MAX_PRIO_VAL] 
)

Description
The API is available to user applications to be able to create a VLAN virtual device on a source interface

Parameters:
[in] index Source Interface Index on which the VLAN device is created
[in] vlan_id VLAN Identifier associated with the VLAN device
[in] default_priority Default User Priority configured in the VLAN packet if no packet priority is defined.
[in] prio_mapping The mapping which maps the packet priority to the VLAN user priority which is a part of the VLAN header.
Return values:
Index of the new VLAN device - Success
<0 - Error

void VLANDeinit ( void   ) 

Description
The function is used to deinitialize the VLAN module. The function is called to close and shutdown all the VLAN enabled NIMU Network Interface objects which exist in the System

This is for *internal* NDK Stack Usage.

Return values:
Not Applicable.

int VLANDelDevice ( UINT16  dev_index  ) 

Description
The API is available to user applications to be able to delete a previously created VLAN device.

Parameters:
[in] dev_index Index of the VLAN NIMU Interface Object which is to be deleted. This should be the same as the returned value from VLANAddDevice.
Return values:
0 - Success
<0 - Error

void VLANInit ( void   ) 

Description
The function is used to initialize the VLAN module in the NDK core stack

This is for *internal* NDK Stack Usage.

Return values:
Not Applicable.

uint VLANReceivePacket ( PBM_Handle  hPkt  ) 

Description
The function is called by the NIMU Receive function when a VLAN packet is received. The function validates the packet and ensures that there is a valid VLAN node on the system which can process the packet.

This is for *internal* NDK Stack Usage.

Parameters:
[in] hPkt Handle to the packet which needs to be sent
Return values:
Encapsulated Protocol - Success
0xFFFF - Error


Copyright 2009, Texas Instruments Incorporated