Remove nas_config_mbms()
Remove nas_config_mbms() since nas_config_mbms() and nas_config() do the same
This commit is contained in:
@@ -2304,20 +2304,20 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask, int id) {
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
nas_config(1, 1, 2, "oaitun_ue");
|
||||
netlink_init_mbms_tun("oaitun_uem", id + 1);
|
||||
nas_config_mbms(1, 2, 2, "oaitun_uem");
|
||||
nas_config(1, 2, 2, "oaitun_uem");
|
||||
LOG_I(PDCP, "UE pdcp will use tun interface\n");
|
||||
} else if (ENB_NAS_USE_TUN) {
|
||||
netlink_init_tun("oaitun_enb", 1, 0);
|
||||
nas_config(1, 1, 1, "oaitun_enb");
|
||||
if (pdcp_optmask & ENB_NAS_USE_TUN_W_MBMS_BIT) {
|
||||
netlink_init_mbms_tun("oaitun_enm", 1);
|
||||
nas_config_mbms(1, 2, 1, "oaitun_enm");
|
||||
nas_config(1, 2, 1, "oaitun_enm");
|
||||
LOG_I(PDCP, "ENB pdcp will use mbms tun interface\n");
|
||||
}
|
||||
LOG_I(PDCP, "ENB pdcp will use tun interface\n");
|
||||
} else if (pdcp_optmask & ENB_NAS_USE_TUN_W_MBMS_BIT) {
|
||||
netlink_init_mbms_tun("oaitun_enm", 0);
|
||||
nas_config_mbms(1, 2, 1, "oaitun_enm");
|
||||
nas_config(1, 2, 1, "oaitun_enm");
|
||||
LOG_I(PDCP, "ENB pdcp will use mbms tun interface\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -149,45 +149,6 @@ static int bringInterfaceUp(char *interfaceName, int up)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nas_config_mbms(int interface_id, int thirdOctet, int fourthOctet, const char *ifname)
|
||||
{
|
||||
//char buf[5];
|
||||
char ipAddress[20];
|
||||
char broadcastAddress[20];
|
||||
char interfaceName[20];
|
||||
int returnValue;
|
||||
//if(strcmp(ifname,"ue") == 0)
|
||||
//sprintf(ipAddress, "%s.%d.%d", "20.0",thirdOctet,fourthOctet);
|
||||
////else
|
||||
sprintf(ipAddress, "%s.%d.%d",baseNetAddress,thirdOctet,fourthOctet);
|
||||
|
||||
sprintf(broadcastAddress, "%s.%d.255",baseNetAddress, thirdOctet);
|
||||
sprintf(interfaceName, "%s%d", ifname, interface_id);
|
||||
bringInterfaceUp(interfaceName, 0);
|
||||
// sets the machine address
|
||||
returnValue= setInterfaceParameter(interfaceName, ipAddress,SIOCSIFADDR);
|
||||
|
||||
// sets the machine network mask
|
||||
if(!returnValue)
|
||||
returnValue= setInterfaceParameter(interfaceName, netMask,SIOCSIFNETMASK);
|
||||
|
||||
// sets the machine broadcast address
|
||||
if(!returnValue)
|
||||
returnValue= setInterfaceParameter(interfaceName, broadcastAddress,SIOCSIFBRDADDR);
|
||||
|
||||
if(!returnValue)
|
||||
bringInterfaceUp(interfaceName, 1);
|
||||
|
||||
if(!returnValue)
|
||||
LOG_I(OIP,"Interface %s successfully configured, ip address %s, mask %s broadcast address %s\n",
|
||||
interfaceName, ipAddress, netMask, broadcastAddress);
|
||||
else
|
||||
LOG_E(OIP,"Interface %s couldn't be configured (ip address %s, mask %s broadcast address %s)\n",
|
||||
interfaceName, ipAddress, netMask, broadcastAddress);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
// non blocking full configuration of the interface (address, and the two lest octets of the address)
|
||||
int nas_config(int interface_id, int thirdOctet, int fourthOctet, const char *ifpref)
|
||||
{
|
||||
|
||||
@@ -51,19 +51,6 @@ void nas_getparams(void);
|
||||
*/
|
||||
int nas_config(int interface_id, int thirdOctet, int fourthOctet, const char *ifprefix);
|
||||
|
||||
/*! \fn int nas_config_mbms(char*, int, int)
|
||||
* \brief This function initializes the nasmesh interface using the basic values,
|
||||
* basic address, network mask and broadcast address, as the default configured
|
||||
* ones
|
||||
* \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1
|
||||
* \param[in] third octet of the ip address e.g. for the 10.1.2.3 address would be 2
|
||||
* \param[in] fourth octet of the ip address e.g. for the 10.1.2.3 address would be 3
|
||||
* \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails
|
||||
* \note
|
||||
* @ingroup _nas
|
||||
*/
|
||||
int nas_config_mbms(int interface_id, int thirdOctet, int fourthOctet, const char *ifname);
|
||||
|
||||
/*! \fn void setBaseNetAddress(char*)
|
||||
* \brief This function sets the basic network address used
|
||||
* \param[in] baseAddr, the new basic address e.g.for 10.0.1.2, would be 10.0
|
||||
|
||||
Reference in New Issue
Block a user