Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
566e635f
Commit
566e635f
authored
Oct 14, 2011
by
Tomek Mrugalski
🛰
Browse files
[1186] doxygen comments cleanup.
parent
76f58b2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp6/iface_mgr.cc
View file @
566e635f
...
...
@@ -29,7 +29,7 @@ using namespace isc::dhcp;
namespace
isc
{
// IfaceMgr is a singleton implementation
//
/
IfaceMgr is a singleton implementation
IfaceMgr
*
IfaceMgr
::
instance_
=
0
;
void
...
...
@@ -313,15 +313,6 @@ IfaceMgr::openSocket(const std::string& ifname,
return
(
sock
);
}
/**
* joins multicast group
*
* @param sock socket file descriptor
* @param ifname name of the interface (DHCPv6 uses link-scoped mc groups)
* @param mcast multicast address to join (string)
*
* @return true if joined successfully, false otherwise
*/
bool
IfaceMgr
::
joinMcast
(
int
sock
,
const
std
::
string
&
ifname
,
const
std
::
string
&
mcast
)
{
...
...
@@ -347,19 +338,8 @@ const std::string & mcast) {
return
(
true
);
}
/**
* Sends UDP packet over IPv6.
*
* All parameters for actual transmission are specified in
* Pkt6 structure itself. That includes destination address,
* src/dst port and interface over which data will be sent.
*
* @param pkt A packet object that is going to be sent.
*
* @return True, if transmission was successful. False otherwise.
*/
bool
IfaceMgr
::
send
(
boost
::
shared_ptr
<
Pkt6
>
pkt
)
{
IfaceMgr
::
send
(
boost
::
shared_ptr
<
Pkt6
>
&
pkt
)
{
struct
msghdr
m
;
struct
iovec
v
;
int
result
;
...
...
@@ -431,16 +411,6 @@ IfaceMgr::send(boost::shared_ptr<Pkt6> pkt) {
return
(
result
);
}
/**
* Attempts to receive UDP/IPv6 packet over open sockets.
*
* TODO Start using select() and add timeout to be able
* to not wait infinitely, but rather do something useful
* (e.g. remove expired leases)
*
* @return Object prepresenting received packet.
*/
boost
::
shared_ptr
<
Pkt6
>
IfaceMgr
::
receive
()
{
struct
msghdr
m
;
...
...
src/bin/dhcp6/iface_mgr.h
View file @
566e635f
...
...
@@ -17,6 +17,7 @@
#include
<list>
#include
<boost/shared_ptr.hpp>
#include
<boost/scoped_array.hpp>
#include
<boost/noncopyable.hpp>
#include
"asiolink/io_address.h"
#include
"dhcp/pkt6.h"
...
...
@@ -116,15 +117,15 @@ public:
/// @brief Sends a packet.
///
/// Sends a packet. All parameters regarding interface, destination
/// address are set in pkt object.
/// Sends a packet. All parameters for actual transmission are specified in
/// Pkt6 structure itself. That includes destination address, src/dst port
/// and interface over which data will be sent.
///
/// @param pkt packet to be sent
///
/// @return true if sending was successful
///
bool
send
(
boost
::
shared_ptr
<
Pkt6
>
pkt
);
send
(
boost
::
shared_ptr
<
Pkt6
>
&
pkt
);
/// @brief Tries to receive packet over open sockets.
///
...
...
@@ -132,8 +133,11 @@ public:
/// If reception is successful and all information about its sender
/// are obtained, Pkt6 object is created and returned.
///
/// @return Pkt6 object representing received packet (or NULL)
/// TODO Start using select() and add timeout to be able
/// to not wait infinitely, but rather do something useful
/// (e.g. remove expired leases)
///
/// @return Pkt6 object representing received packet (or NULL)
boost
::
shared_ptr
<
Pkt6
>
receive
();
// don't use private, we need derived classes in tests
...
...
@@ -186,10 +190,12 @@ protected:
// is bound to multicast address. And we all know what happens
// to people who try to use multicast as source address.
/// control-buffer, used in transmission and reception
char
*
control_buf_
;
/// length of the control_buf_ array
int
control_buf_len_
;
/// control-buffer, used in transmission and reception
boost
::
scoped_array
<
char
>
control_buf_
;
private:
/// Opens sockets on detected interfaces.
bool
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment