RDK-B
vlan_eth_hal.h File Reference

For CCSP Component: VLAN Termination HAL Layer. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for vlan_eth_hal.h:

Go to the source code of this file.

Data Structures

struct  _VLAN_SKB_CONFIG
 
struct  _vlan_configuration
 

Macros

#define ULONG   unsigned long
 
#define BOOL   unsigned char
 
#define CHAR   char
 
#define UCHAR   unsigned char
 
#define INT   int
 
#define UINT   unsigned int
 
#define TRUE   1
 
#define FALSE   0
 
#define ENABLE   1
 
#define RETURN_OK   0
 
#define RETURN_ERR   -1
 
#define VLAN_ETH_HAL_MAJOR_VERSION   1
 
#define VLAN_ETH_HAL_MINOR_VERSION   0
 
#define VLAN_ETH_HAL_MAINTENANCE_VERSION   1
 

Typedefs

typedef struct _VLAN_SKB_CONFIG vlan_skb_config_t
 
typedef struct _vlan_configuration vlan_configuration_t
 

Enumerations

enum  vlan_interface_status_e {
  VLAN_IF_UP = 1, VLAN_IF_DOWN, VLAN_IF_UNKNOWN, VLAN_IF_DORMANT,
  VLAN_IF_NOTPRESENT, VLAN_IF_LOWERLAYERDOWN, VLAN_IF_ERROR
}
 

Functions

int vlan_eth_hal_init ()
 
int vlan_eth_hal_configureInterface (vlan_configuration_t *config)
 
int vlan_eth_hal_deleteInterface (const char *vlan_ifname)
 
int vlan_eth_hal_getInterfaceStatus (const char *vlan_ifname, vlan_interface_status_e *status)
 

yes

For CCSP Component: VLAN Termination HAL Layer.

@description This file gives the function prototypes used for the RDK-Broadband Ethernet VLAN abstraction layer

Definition in file vlan_eth_hal.h.

Macro Definition Documentation

◆ ULONG

#define ULONG   unsigned long

Definition at line 67 of file vlan_eth_hal.h.

◆ BOOL

#define BOOL   unsigned char

Definition at line 71 of file vlan_eth_hal.h.

◆ CHAR

#define CHAR   char

Definition at line 75 of file vlan_eth_hal.h.

◆ UCHAR

#define UCHAR   unsigned char

Definition at line 79 of file vlan_eth_hal.h.

◆ INT

#define INT   int

Definition at line 83 of file vlan_eth_hal.h.

◆ UINT

#define UINT   unsigned int

Definition at line 87 of file vlan_eth_hal.h.

◆ TRUE

#define TRUE   1

Definition at line 91 of file vlan_eth_hal.h.

◆ FALSE

#define FALSE   0

Definition at line 95 of file vlan_eth_hal.h.

◆ ENABLE

#define ENABLE   1

Definition at line 99 of file vlan_eth_hal.h.

◆ RETURN_OK

#define RETURN_OK   0

Definition at line 103 of file vlan_eth_hal.h.

◆ RETURN_ERR

#define RETURN_ERR   -1

Definition at line 107 of file vlan_eth_hal.h.

◆ VLAN_ETH_HAL_MAJOR_VERSION

#define VLAN_ETH_HAL_MAJOR_VERSION   1

Definition at line 111 of file vlan_eth_hal.h.

◆ VLAN_ETH_HAL_MINOR_VERSION

#define VLAN_ETH_HAL_MINOR_VERSION   0

Definition at line 112 of file vlan_eth_hal.h.

◆ VLAN_ETH_HAL_MAINTENANCE_VERSION

#define VLAN_ETH_HAL_MAINTENANCE_VERSION   1

Definition at line 113 of file vlan_eth_hal.h.

Typedef Documentation

◆ vlan_skb_config_t

◆ vlan_configuration_t

Enumeration Type Documentation

◆ vlan_interface_status_e

Enumerator
VLAN_IF_UP 
VLAN_IF_DOWN 
VLAN_IF_UNKNOWN 
VLAN_IF_DORMANT 
VLAN_IF_NOTPRESENT 
VLAN_IF_LOWERLAYERDOWN 
VLAN_IF_ERROR 

Definition at line 119 of file vlan_eth_hal.h.

Function Documentation

◆ vlan_eth_hal_init()

int vlan_eth_hal_init ( )

@description This HAL is used to initialize the vlan hal client. Connected to rpc server to send/receive data.

Parameters
vlan_configuration_tconfig - vlanconfiguration data
Returns
The status of the operation.
Return values
RETURN_OKif successful (or) RETURN_OK If interface is already exist with given config data
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ vlan_eth_hal_configureInterface()

int vlan_eth_hal_configureInterface ( vlan_configuration_t config)

@description This HAL is used to create and configure an vlan interface and assign the vlanID. This HAL also used to reconfigure the vlan interface incase if any update in SKB marking configuration. This is being handled by config->doReconfigure flag in the vlan_configuration_t. If this flag TRUE, indicates, reconfigure required and it will update vlan rules on the existing interface. If it FALSE, create and configure the vlan interface.

Parameters
vlan_configuration_tconfig - vlanconfiguration data
Returns
The status of the operation.
Return values
RETURN_OKif successful (or) RETURN_OK If interface is already exist with given config data
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ vlan_eth_hal_deleteInterface()

int vlan_eth_hal_deleteInterface ( const char *  vlan_ifname)

@description This HAL is used to deassociate an existing vlan interface

Parameters
constchar *vlan_ifname - interface name
Returns
The status of the operation.
Return values
RETURN_OKif successful (or) RETURN_OK If interface is not exist
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ vlan_eth_hal_getInterfaceStatus()

int vlan_eth_hal_getInterfaceStatus ( const char *  vlan_ifname,
vlan_interface_status_e status 
)

@description This HAL is used to get current status of an vlan interface

Parameters
vlanconfiguration data
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.