Commit 9db841d6 authored by winckel's avatar winckel

Added a missing function prototype.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4253 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 46a65c9a
/******************************************************************************* /*******************************************************************************
Eurecom OpenAirInterface 2 Eurecom OpenAirInterface 2
Copyright(c) 1999 - 2010 Eurecom Copyright(c) 1999 - 2010 Eurecom
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License, under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation. version 2, as published by the Free Software Foundation.
This program is distributed in the hope it will be useful, but WITHOUT This program is distributed in the hope it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along with You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in The full GNU General Public License is included in this distribution in
the file called "COPYING". the file called "COPYING".
Contact Information Contact Information
Openair Admin: openair_admin@eurecom.fr Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France Address : Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/ *******************************************************************************/
/*! \file nas_config.h /*! \file nas_config.h
* \brief Configures the nasmesh interface * \brief Configures the nasmesh interface
* \author Daniel Camara and navid nikaein * \author Daniel Camara and navid nikaein
* \date 2006-2011 * \date 2006-2011
* \version 0.1 * \version 0.1
* \company Eurecom * \company Eurecom
*/ */
#ifndef NAS_CONFIG_H_ #ifndef NAS_CONFIG_H_
#define NAS_CONFIG_H_ #define NAS_CONFIG_H_
#include <netinet/in.h> #include <netinet/in.h>
/*! \fn int NAS_config(char*, char*, char*, char*) /*! \fn int NAS_config(char*, char*, char*, char*)
* \brief This function initializes the nasmesh interface * \brief This function initializes the nasmesh interface
* \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1 * \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1
* \param[in] ipAddress, the address of the interface, e.g. 10.0.1.1 * \param[in] ipAddress, the address of the interface, e.g. 10.0.1.1
* \param[in] networkMask, the network mask to be used, e.g. 255.255.255.0 * \param[in] networkMask, the network mask to be used, e.g. 255.255.255.0
* \param[in] broadcastAddress, the broadcast address for the subnet, e.g. 10.0.1.255 * \param[in] broadcastAddress, the broadcast address for the subnet, e.g. 10.0.1.255
* \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails * \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
int NAS_config(char *interfaceName, char *ipAddress, char *networkMask, char *broadcastAddress); int NAS_config(char *interfaceName, char *ipAddress, char *networkMask, char *broadcastAddress);
/*! \fn int nas_config(char*, int, int) /*! \fn int nas_config(char*, int, int)
* \brief This function initializes the nasmesh interface using the basic values, * \brief This function initializes the nasmesh interface using the basic values,
* basic address, network mask and broadcast address, as the default configured * basic address, network mask and broadcast address, as the default configured
* ones * ones
* \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1 * \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] 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 * \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 * \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
int nas_config(int interface_id, int thirdOctet, int fourthOctet); int nas_config(int interface_id, int thirdOctet, int fourthOctet);
/*! \fn int blocking_NAS_config(char*, char*, char*, char*) /*! \fn int blocking_NAS_config(char*, char*, char*, char*)
* \brief This function initializes the nasmesh interface, in a blocking way, * \brief This function initializes the nasmesh interface, in a blocking way,
* the system calls are interrupted * the system calls are interrupted
* \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1 * \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1
* \param[in] ipAddress, the address of the interface, e.g. 10.0.1.1 * \param[in] ipAddress, the address of the interface, e.g. 10.0.1.1
* \param[in] networkMask, the network mask to be used, e.g. 255.255.255.0 * \param[in] networkMask, the network mask to be used, e.g. 255.255.255.0
* \param[in] broadcastAddress, the broadcast address for the subnet, e.g. 10.0.1.255 * \param[in] broadcastAddress, the broadcast address for the subnet, e.g. 10.0.1.255
* \return 0 on success, otherwise 1 * \return 0 on success, otherwise 1
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
int blocking_NAS_config(char *interfaceName, char *ipAddress, char *networkMask, char *broadcastAddress); int blocking_NAS_config(char *interfaceName, char *ipAddress, char *networkMask, char *broadcastAddress);
/*! \fn int setInterfaceParameter(char*, char*, int) /*! \fn int setInterfaceParameter(char*, char*, int)
* \brief This function sets an genneric interface parameter (SIOCSIFADDR, * \brief This function sets an genneric interface parameter (SIOCSIFADDR,
* SIOCSIFNETMASK, SIOCSIFBRDADDR, SIOCSIFFLAGS) * SIOCSIFNETMASK, SIOCSIFBRDADDR, SIOCSIFFLAGS)
* \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1 * \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1
* \param[in] address, the value of the parameter to set, e.g. 10.0.1.255 * \param[in] address, the value of the parameter to set, e.g. 10.0.1.255
* \param[in] operation, the operation to perform, (SIOCSIFADDR, SIOCSIFNETMASK, * \param[in] operation, the operation to perform, (SIOCSIFADDR, SIOCSIFNETMASK,
* SIOCSIFBRDADDR, SIOCSIFFLAGS), e.g. SIOCSIFBRDADDR * SIOCSIFBRDADDR, SIOCSIFFLAGS), e.g. SIOCSIFBRDADDR
* \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails * \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
int setInterfaceParameter(char *interfaceName, char *settingAddress, int operation); int setInterfaceParameter(char *interfaceName, char *settingAddress, int operation);
/*! \fn int set_gateway(char*, char*) /*! \fn int set_gateway(char*, char*)
* \brief This function sets the interface gateway * \brief This function sets the interface gateway
* \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1 * \param[in] interfaceName, the name of the interface, e.g. nasmesh0 or nasmesh1
* \param[in] address, the address of the gateway, e.g. 10.0.1.2 * \param[in] address, the address of the gateway, e.g. 10.0.1.2
* \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails * \return 0 on success, otherwise 1, if couldn't open a socket and 2 if the ioctl fails
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
int set_gateway(char *interfaceName, char *gateway); int set_gateway(char *interfaceName, char *gateway);
/*! \fn void setBaseNetAddress(char*) /*! \fn void setBaseNetAddress(char*)
* \brief This function sets the basic network address used * \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 * \param[in] baseAddr, the new basic address e.g.for 10.0.1.2, would be 10.0
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
void setBaseNetAddress (char* baseAddr); void setBaseNetAddress(char* baseAddr);
/*! \fn char* getBaseNetAddress() /*! \fn char* getBaseNetAddress()
* \brief This function returns the basic network address used * \brief This function returns the basic network address used
* \return the basic network address in use * \return the basic network address in use
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
char* getBaseNetAddress (); char* getBaseNetAddress();
/*! \fn void setNetMask(char*) /*! \fn void setNetMask(char*)
* \brief This function sets the new default network mask used * \brief This function sets the new default network mask used
* \param[in] newNetworkMask, the new network mask e.g.for 255.255.0.0 * \param[in] newNetworkMask, the new network mask e.g.for 255.255.0.0
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
void setNetMask (char* baseAddr); void setNetMask(char* baseAddr);
/*! \fn char* getNetMask() /*! \fn char* getNetMask()
* \brief This function returns the network mask address in use * \brief This function returns the network mask address in use
* \return the network mask in use * \return the network mask in use
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
char* getNetMask (); char* getNetMask();
/*! \fn coid setBroadcastAddress(char*) /*! \fn coid setBroadcastAddress(char*)
* \brief This function sets the new broadcast address used * \brief This function sets the new broadcast address used
* \param[in] newNetworkMask, the new broadcast address e.g.for 10.0.255.255 * \param[in] newNetworkMask, the new broadcast address e.g.for 10.0.255.255
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
void setBroadcastAddress (char* baseAddr); void setBroadcastAddress(char* baseAddr);
/*! \fn char* getBroadcastAddress() /*! \fn char* getBroadcastAddress()
* \brief This function returns the broadcast address in use * \brief This function returns the broadcast address in use
* \return the broadcast address in use * \return the broadcast address in use
* \note * \note
* @ingroup ????? * @ingroup ?????
*/ */
char* getBroadcastAddress (); char* getBroadcastAddress();
int bringInterfaceUp(char *interfaceName, int up);
int rb_validate_config_ipv4(int cx, int inst, int rb); int rb_validate_config_ipv4(int cx, int inst, int rb);
int rb_conf_ipv4(int action,int cx, int inst, int rb,int dscp, in_addr_t saddr_ipv4, in_addr_t daddr_ipv4); int rb_conf_ipv4(int action, int cx, int inst, int rb, int dscp, in_addr_t saddr_ipv4, in_addr_t daddr_ipv4);
void rb_ioctl_init(int inst); void rb_ioctl_init(int inst);
int rb_stats_req(int inst); int rb_stats_req(int inst);
void init_socket(void); void init_socket(void);
in_addr_t ipv4_address (int thirdOctet, int fourthOctet); in_addr_t ipv4_address(int thirdOctet, int fourthOctet);
#endif /*NAS_CONFIG_H_*/ #endif /*NAS_CONFIG_H_*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment