IBR-DTNSuite  0.10
ibrcommon::lowpansocket Class Reference

#include <lowpansocket.h>

Inheritance diagram for ibrcommon::lowpansocket:
Inheritance graph
Collaboration diagram for ibrcommon::lowpansocket:
Collaboration graph

Public Member Functions

 lowpansocket (const uint16_t &panid, const vinterface &iface)
 
 ~lowpansocket ()
 
void up () throw (socket_exception)
 
void down () throw (socket_exception)
 
void setAutoAck (bool enable) throw (socket_exception)
 
virtual ssize_t recvfrom (char *buf, size_t buflen, int flags, ibrcommon::vaddress &addr) throw (socket_exception)
 
virtual void sendto (const char *buf, size_t buflen, int flags, const ibrcommon::vaddress &addr) throw (socket_exception)
 
- Public Member Functions inherited from ibrcommon::datagramsocket
virtual ~datagramsocket ()=0
 
- Public Member Functions inherited from ibrcommon::basesocket
virtual ~basesocket ()=0
 
virtual int fd () const throw (socket_exception)
 
virtual int release () throw (socket_exception)
 
void close () throw (socket_exception)
 
void shutdown (int how) throw (socket_exception)
 
bool ready () const
 
sa_family_t get_family () const throw (socket_exception)
 

Static Public Member Functions

static void getAddress (const vinterface &iface, const std::string &panid, ibrcommon::vaddress &addr)
 
static void getAddress (struct ieee802154_addr *ret, const vinterface &iface)
 

Additional Inherited Members

- Static Public Attributes inherited from ibrcommon::basesocket
static int DEFAULT_SOCKET_FAMILY = AF_INET6
 
static int DEFAULT_SOCKET_FAMILY_ALTERNATIVE = AF_INET
 
- Protected Types inherited from ibrcommon::basesocket
enum  socketstate { SOCKET_DOWN, SOCKET_UP, SOCKET_UNMANAGED, SOCKET_DESTROYED }
 
- Protected Member Functions inherited from ibrcommon::datagramsocket
 datagramsocket ()
 
 datagramsocket (int fd)
 
- Protected Attributes inherited from ibrcommon::basesocket
socketstate _state
 
int _fd
 
sa_family_t _family
 

Detailed Description

Definition at line 35 of file lowpansocket.h.

Constructor & Destructor Documentation

ibrcommon::lowpansocket::lowpansocket ( const uint16_t &  panid,
const vinterface iface 
)

Definition at line 50 of file lowpansocket.cpp.

ibrcommon::lowpansocket::~lowpansocket ( )

Definition at line 55 of file lowpansocket.cpp.

Member Function Documentation

void ibrcommon::lowpansocket::down ( ) throw (socket_exception)
virtual

Close and destroy the file descriptor of this socket assignment.

Exceptions
socket_exceptionif the action has failed

Implements ibrcommon::datagramsocket.

Definition at line 86 of file lowpansocket.cpp.

References ibrcommon::basesocket::_state, ibrcommon::basesocket::close(), ibrcommon::basesocket::SOCKET_DESTROYED, and ibrcommon::basesocket::SOCKET_DOWN.

Here is the call graph for this function:

ssize_t ibrcommon::lowpansocket::recvfrom ( char *  buf,
size_t  buflen,
int  flags,
ibrcommon::vaddress addr 
) throw (socket_exception)
virtual
void ibrcommon::lowpansocket::sendto ( const char *  buf,
size_t  buflen,
int  flags,
const ibrcommon::vaddress addr 
) throw (socket_exception)
virtual
void ibrcommon::lowpansocket::setAutoAck ( bool  enable) throw (socket_exception)

If set to true, the auto-ack request is set on each message

Definition at line 94 of file lowpansocket.cpp.

References SOL_IEEE802154, and WPAN_WANTACK.

Referenced by dtn::net::LOWPANDatagramService::send(), and dtn::net::LOWPANConvergenceLayer::send_cb().

void ibrcommon::lowpansocket::up ( ) throw (socket_exception)
virtual

The documentation for this class was generated from the following files: