RDK-B
VLAN HAL APIs

Description

Functions

int vlan_hal_addGroup (const char *groupName, const char *default_vlanID)
 
int vlan_hal_delGroup (const char *groupName)
 
int vlan_hal_addInterface (const char *groupName, const char *ifName, const char *vlanID)
 
int vlan_hal_delInterface (const char *groupName, const char *ifName, const char *vlanID)
 
int vlan_hal_printGroup (const char *groupName)
 
int vlan_hal_printAllGroup ()
 
int vlan_hal_delete_all_Interfaces (const char *groupName)
 
int _is_this_group_available_in_linux_bridge (char *br_name)
 
int _is_this_interface_available_in_linux_bridge (char *if_name, char *vlanID)
 
int _is_this_interface_available_in_given_linux_bridge (char *if_name, char *br_name, char *vlanID)
 
void _get_shell_outputbuffer (char *cmd, char *out, int len)
 
int insert_VLAN_ConfigEntry (char *groupName, char *vlanID)
 
int delete_VLAN_ConfigEntry (char *groupName)
 
int get_vlanId_for_GroupName (const char *groupName, char *vlanID)
 
int print_all_vlanId_Configuration (void)
 

Function Documentation

◆ vlan_hal_addGroup()

int vlan_hal_addGroup ( const char *  groupName,
const char *  default_vlanID 
)

@description This HAL is used to creat an new vlan group, and assig default vlanID.

Parameters
constchar *groupName - bridge name
constchar *default_vlanID - default VLANID
Returns
The status of the operation.
Return values
RETURN_OKif successful (or) return RETURN_OK If group is already exist and has expected vlanID
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ vlan_hal_delGroup()

int vlan_hal_delGroup ( const char *  groupName)

@description This HAL is used to delete existing vlan group, and delete correspond interface association.

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

◆ vlan_hal_addInterface()

int vlan_hal_addInterface ( const char *  groupName,
const char *  ifName,
const char *  vlanID 
)

@description This HAL is used to add interface to existing vlan group, and assign the vlanID.

Parameters
constchar *groupName - bridge name
constchar *ifName - interface name
constchar *vlanID - VLANID
Returns
The status of the operation.
Return values
RETURN_OKif successful (or) RETURN_OK If interface is already in group, and has expected vlan ID
RETURN_ERRif group is not exist (or) if any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ vlan_hal_delInterface()

int vlan_hal_delInterface ( const char *  groupName,
const char *  ifName,
const char *  vlanID 
)

@description This HAL is used to deassociate existing interface from group.

Parameters
constchar *groupName - bridge name
constchar *ifName - interface name
constchar *vlanID - VLANID
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_hal_printGroup()

int vlan_hal_printGroup ( const char *  groupName)

@description This HAL is used to dump the particular group setting, for debug purpose

Parameters
constchar *groupName - bridge name
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ vlan_hal_printAllGroup()

int vlan_hal_printAllGroup ( )

@description This HAL is used dump all group setting, for debug purpose

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

◆ vlan_hal_delete_all_Interfaces()

int vlan_hal_delete_all_Interfaces ( const char *  groupName)

@description This HAL is used to deassociate all existing interface from group.

Parameters
constchar *groupName - bridge name
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ _is_this_group_available_in_linux_bridge()

int _is_this_group_available_in_linux_bridge ( char *  br_name)

@description This HAL utility is used identify given bridge available in linux bridge.

Parameters
constchar * br_name - bridge name
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ _is_this_interface_available_in_linux_bridge()

int _is_this_interface_available_in_linux_bridge ( char *  if_name,
char *  vlanID 
)

@description This HAL utility is used identify given interface available in given bridge.

Parameters
constchar * br_name - bridge name
char*vlanID - VLAND ID
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ _is_this_interface_available_in_given_linux_bridge()

int _is_this_interface_available_in_given_linux_bridge ( char *  if_name,
char *  br_name,
char *  vlanID 
)

@description This HAL utility is used identify given interface available in anyone of linux bridge.

Parameters
char* if_name - interface name
constchar * br_name - bridge name
char*vlanID - VLAND ID
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ _get_shell_outputbuffer()

void _get_shell_outputbuffer ( char *  cmd,
char *  out,
int  len 
)

@description This HAL utility is used get the buffer from shell output

Parameters
char* cmd - linux shell command
char* out - construct the linux system command and copy in this parameter
intlen - length of the output string
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ insert_VLAN_ConfigEntry()

int insert_VLAN_ConfigEntry ( char *  groupName,
char *  vlanID 
)

@description This HAL utility is used store the VLAN ID, Group Name configuration.

Parameters
char*groupName - bridge name
char*vlanID - VLAND ID
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ delete_VLAN_ConfigEntry()

int delete_VLAN_ConfigEntry ( char *  groupName)

@description This HAL utility is used delete the VLAN ID, Group Name configuration

Parameters
char*groupName - bridge name
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ get_vlanId_for_GroupName()

int get_vlanId_for_GroupName ( const char *  groupName,
char *  vlanID 
)

@description This HAL utility is used delete the VLAN ID, Group Name configuration from link

Parameters
char*groupName - bridge name
charchar *vlanID - VLANID
Returns
The status of the operation.
Return values
RETURN_OKif successful
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ print_all_vlanId_Configuration()

int print_all_vlanId_Configuration ( void  )

@description This HAL utility is used get the VLAN ID for corresponding Group Name from link

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