Commit ec387224 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[1540] Doxygen warnings removed.

parent 219324e6
......@@ -67,7 +67,7 @@ protected:
/// should be served. In particular, a lease is selected and sent
/// as an offer to a client if it should be served.
///
/// @param solicit DISCOVER message received from client
/// @param discover DISCOVER message received from client
///
/// @return OFFER message or NULL
Pkt4Ptr processDiscover(Pkt4Ptr& discover);
......@@ -101,7 +101,7 @@ protected:
/// @brief Stub function that will handle incoming INFORM messages.
///
/// @param infRequest message received from client
/// @param inform message received from client
Pkt4Ptr processInform(Pkt4Ptr& inform);
/// @brief Copies default parameters from client's to server's message
......
......@@ -25,11 +25,10 @@
#include <exceptions/exceptions.h>
using namespace std;
using namespace isc;
using namespace isc::asiolink;
using namespace isc::dhcp;
namespace isc {
namespace dhcp {
/// IfaceMgr is a singleton implementation
IfaceMgr* IfaceMgr::instance_ = 0;
......@@ -963,8 +962,7 @@ Pkt6Ptr IfaceMgr::receive6() {
return (pkt);
}
uint16_t
IfaceMgr::getSocket(isc::dhcp::Pkt6 const& pkt) {
uint16_t IfaceMgr::getSocket(isc::dhcp::Pkt6 const& pkt) {
Iface* iface = getIface(pkt.getIface());
if (!iface) {
isc_throw(BadValue, "Tried to find socket for non-existent interface "
......@@ -992,8 +990,7 @@ IfaceMgr::getSocket(isc::dhcp::Pkt6 const& pkt) {
<< " does not have any suitable IPv6 sockets open.");
}
uint16_t
IfaceMgr::getSocket(isc::dhcp::Pkt4 const& pkt) {
uint16_t IfaceMgr::getSocket(isc::dhcp::Pkt4 const& pkt) {
Iface* iface = getIface(pkt.getIface());
if (!iface) {
isc_throw(BadValue, "Tried to find socket for non-existent interface "
......@@ -1018,6 +1015,5 @@ IfaceMgr::getSocket(isc::dhcp::Pkt4 const& pkt) {
<< " does not have any suitable IPv4 sockets open.");
}
}
} // end of namespace isc::dhcp
} // end of namespace isc
......@@ -140,7 +140,7 @@ public:
/// @brief Adds socket descriptor to an interface.
///
/// @param socket SocketInfo structure that describes socket.
/// @param sock SocketInfo structure that describes socket.
void addSocket(const SocketInfo& sock)
{ sockets_.push_back(sock); }
......@@ -149,7 +149,7 @@ public:
/// Closes socket and removes corresponding SocketInfo structure
/// from an interface.
///
/// @param socket descriptor to be closed/removed.
/// @param sockfd socket descriptor to be closed/removed.
/// @return true if there was such socket, false otherwise
bool delSocket(uint16_t sockfd);
......
......@@ -77,7 +77,7 @@ public:
/// value or invalid universe is specified
///
/// @param u universe of the option (V4 or V6)
/// @param opt_type option-type
/// @param type option-type
/// @param factory function pointer
static void OptionFactoryRegister(Option::Universe u,
uint16_t type,
......
......@@ -24,10 +24,12 @@
#include "dhcp/libdhcp++.h"
using namespace std;
using namespace isc::dhcp;
using namespace isc::util;
Option::Option(Universe u, unsigned short type)
namespace isc {
namespace dhcp {
Option::Option(Universe u, uint16_t type)
:universe_(u), type_(type) {
if ((u == V4) && (type > 255)) {
......@@ -36,7 +38,7 @@ Option::Option(Universe u, unsigned short type)
}
}
Option::Option(Universe u, unsigned short type, const OptionBuffer& data)
Option::Option(Universe u, uint16_t type, const OptionBuffer& data)
:universe_(u), type_(type), data_(data) {
check();
}
......@@ -270,3 +272,6 @@ void Option::setUint32(uint32_t value) {
Option::~Option() {
}
} // end of namespace isc::dhcp
} // end of namespace isc
......@@ -29,18 +29,18 @@ using namespace isc::dhcp;
using namespace isc::asiolink;
using namespace isc::util;
Option6AddrLst::Option6AddrLst(unsigned short type,
const AddressContainer& addrs)
namespace isc {
namespace dhcp {
Option6AddrLst::Option6AddrLst(uint16_t type, const AddressContainer& addrs)
:Option(V6, type), addrs_(addrs) {
}
Option6AddrLst::Option6AddrLst(unsigned short type,
const isc::asiolink::IOAddress& addr)
Option6AddrLst::Option6AddrLst(uint16_t type, const isc::asiolink::IOAddress& addr)
:Option(V6, type), addrs_(1,addr) {
}
Option6AddrLst::Option6AddrLst(unsigned short type,
OptionBufferConstIter begin,
Option6AddrLst::Option6AddrLst(uint16_t type, OptionBufferConstIter begin,
OptionBufferConstIter end)
:Option(V6, type) {
unpack(begin, end);
......@@ -108,3 +108,6 @@ uint16_t Option6AddrLst::len() {
return (OPTION6_HDR_LEN + addrs_.size()*16);
}
} // end of namespace isc::dhcp
} // end of namespace isc
......@@ -59,12 +59,8 @@ public:
/// @brief Parses received data
///
/// @param buf pointer to packet buffer
/// @param offset offset to option data
/// @param parse_len specified option data length
///
/// @return offset to the next unparsed char (just after parsed option)
///
/// @param begin iterator to first byte of option data
/// @param end iterator to end of option data (first byte after option end)
virtual void unpack(OptionBufferConstIter begin,
OptionBufferConstIter end);
......
......@@ -23,17 +23,16 @@
#include <util/io_utilities.h>
using namespace std;
using namespace isc;
using namespace isc::dhcp;
using namespace isc::util;
Option6IA::Option6IA(unsigned short type, unsigned int iaid)
namespace isc {
namespace dhcp {
Option6IA::Option6IA(uint16_t type, uint32_t iaid)
:Option(Option::V6, type), iaid_(iaid) {
}
Option6IA::Option6IA(unsigned short type,
OptionBufferConstIter begin,
OptionBufferConstIter end)
Option6IA::Option6IA(uint16_t type, OptionBufferConstIter begin, OptionBufferConstIter end)
:Option(Option::V6, type) {
unpack(begin, end);
}
......@@ -105,3 +104,6 @@ uint16_t Option6IA::len() {
}
return (length);
}
} // end of namespace isc::dhcp
} // end of namespace isc
......@@ -24,14 +24,14 @@
#include "util/io_utilities.h"
using namespace std;
using namespace isc;
using namespace isc::dhcp;
using namespace isc::asiolink;
using namespace isc::util;
Option6IAAddr::Option6IAAddr(unsigned short type,
const isc::asiolink::IOAddress& addr,
unsigned int pref, unsigned int valid)
namespace isc {
namespace dhcp {
Option6IAAddr::Option6IAAddr(uint16_t type, const isc::asiolink::IOAddress& addr,
uint32_t pref, uint32_t valid)
:Option(V6, type), addr_(addr), preferred_(pref),
valid_(valid) {
}
......@@ -110,3 +110,6 @@ uint16_t Option6IAAddr::len() {
}
return (length);
}
} // end of namespace isc::dhcp
} // end of namespace isc
......@@ -57,7 +57,6 @@ public:
/// Parses received buffer, returns offset to the first unused byte after
/// parsed option.
///
/// @param buf pointer to buffer
/// @param begin iterator to first byte of option data
/// @param end iterator to end of option data (first byte after option end)
virtual void unpack(OptionBufferConstIter begin,
......
......@@ -230,7 +230,8 @@ public:
/// @brief Sets sname field.
///
/// @param sname value to be set
void setSname(const uint8_t* sname, size_t snameLen = MAX_SNAME_LEN);
/// @param sname_len length of the sname buffer (up to MAX_SNAME_LEN)
void setSname(const uint8_t* sname, size_t sname_len = MAX_SNAME_LEN);
/// @brief Returns file field
///
......@@ -244,8 +245,9 @@ public:
/// Sets file field
///
/// @param file value to be set
/// @param file_len length of the file buffer (up to MAX_FILE_LEN)
void
setFile(const uint8_t* file, size_t fileLen = MAX_FILE_LEN);
setFile(const uint8_t* file, size_t file_len = MAX_FILE_LEN);
/// @brief Sets hardware address.
///
......@@ -255,7 +257,7 @@ public:
///
/// Note: macAddr must be a buffer of at least hlen bytes.
///
/// @param hwType hardware type (will be sent in htype field)
/// @param hType hardware type (will be sent in htype field)
/// @param hlen hardware length (will be sent in hlen field)
/// @param macAddr pointer to hardware address
void setHWAddr(uint8_t hType, uint8_t hlen,
......@@ -339,7 +341,7 @@ public:
/// @brief Sets remote address.
///
/// @params remote specifies remote address
/// @param remote specifies remote address
void setRemoteAddr(const isc::asiolink::IOAddress& remote) {
remote_addr_ = remote;
}
......@@ -353,7 +355,7 @@ public:
/// @brief Sets local address.
///
/// @params local specifies local address
/// @param local specifies local address
void setLocalAddr(const isc::asiolink::IOAddress& local) {
local_addr_ = local;
}
......@@ -367,7 +369,7 @@ public:
/// @brief Sets local port.
///
/// @params local specifies local port
/// @param local specifies local port
void setLocalPort(uint16_t local) { local_port_ = local; }
/// @brief Returns local port.
......@@ -377,7 +379,7 @@ public:
/// @brief Sets remote port.
///
/// @params remote specifies remote port
/// @param remote specifies remote port
void setRemotePort(uint16_t remote) { remote_port_ = remote; }
/// @brief Returns remote port.
......
......@@ -21,9 +21,9 @@
#include <sstream>
using namespace std;
using namespace isc::dhcp;
namespace isc {
namespace dhcp {
Pkt6::Pkt6(const uint8_t* buf, uint32_t buf_len, DHCPv6Proto proto /* = UDP */) :
proto_(proto),
......@@ -40,7 +40,7 @@ Pkt6::Pkt6(const uint8_t* buf, uint32_t buf_len, DHCPv6Proto proto /* = UDP */)
memcpy(&data_[0], buf, buf_len);
}
Pkt6::Pkt6(uint8_t msg_type, unsigned int transid, DHCPv6Proto proto /*= UDP*/) :
Pkt6::Pkt6(uint8_t msg_type, uint32_t transid, DHCPv6Proto proto /*= UDP*/) :
proto_(proto),
msg_type_(msg_type),
transid_(transid),
......@@ -202,5 +202,5 @@ void Pkt6::repack() {
bufferOut_.writeData(&data_[0], data_.size());
}
};
} // end of namespace isc::dhcp
} // end of namespace isc
......@@ -141,7 +141,7 @@ public:
/// instances of the same option are allowed (and frequently used).
/// See getOptions().
///
/// @param opt_type option type we are looking for
/// @param type option type we are looking for
///
/// @return pointer to found option (or NULL)
OptionPtr getOption(uint16_t type);
......@@ -160,7 +160,7 @@ public:
/// @brief Sets remote address.
///
/// @params remote specifies remote address
/// @param remote specifies remote address
void setRemoteAddr(const isc::asiolink::IOAddress& remote) {
remote_addr_ = remote;
}
......@@ -174,7 +174,7 @@ public:
/// @brief Sets local address.
///
/// @params local specifies local address
/// @param local specifies local address
void setLocalAddr(const isc::asiolink::IOAddress& local) {
local_addr_ = local;
}
......@@ -188,7 +188,7 @@ public:
/// @brief Sets local port.
///
/// @params local specifies local port
/// @param local specifies local port
void setLocalPort(uint16_t local) { local_port_ = local; }
/// @brief Returns local port.
......@@ -198,7 +198,7 @@ public:
/// @brief Sets remote port.
///
/// @params remote specifies remote port
/// @param remote specifies remote port
void setRemotePort(uint16_t remote) { remote_port_ = remote; }
/// @brief Returns remote port.
......
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