olsr::sys::Socket Class Reference

#include <socket.hh>

List of all members.

Public Types

typedef address_t::sockaddr_t sockaddr_t
typedef address_t addr_t
typedef u_int16_t port_t

Public Member Functions

 Socket ()
 Socket (unsigned mtu)
 Socket (unsigned mtu, const addr_t &addr, port_t port)
 Socket (unsigned mtu, const std::string &host, port_t port)
 Socket (unsigned mtu, const char *host, port_t port)
void close ()
unsigned mtu () const
void set_mtu (unsigned mtu)
void bind_to_device (const std::string &name)
void set_multicast (const RealInterfaceInfo &info)
void set_priority ()
void bind (const sockaddr_t &sin)
void bind_multicast (const RealInterfaceInfo &info, const address_t &a, port_t port)
void bind (const addr_t &addr, port_t port, unsigned index=0)
void connect (const sockaddr_t &sin)
void connect (const addr_t &addr, port_t port)
utl::Data receive (address_t &sender) const
void send (const utl::ConstData &d) const
void set_baddr (const address_t &a)
void sendto (const utl::ConstData &d, const address_t::sockaddr_t &s) const
void sendto_bcast (const utl::ConstData &d) const
sch::IOEvent::p_t read_p () const
sch::IOEvent::p_t write_p () const
bool operator< (const This &rhs) const

Static Public Member Functions

static const Thisdummy ()

Private Types

enum  _dummy_values { _dummy_val }
typedef Socket This

Private Member Functions

 Socket (_dummy_values)
void init ()

Private Attributes

int _fd
unsigned _mtu
address_t _baddr
unsigned _index

Static Private Attributes

static This _dummy


Member Typedef Documentation

typedef Socket olsr::sys::Socket::This [private]

typedef u_int16_t olsr::sys::Socket::port_t


Member Enumeration Documentation

Enumerator:
_dummy_val 


Constructor & Destructor Documentation

olsr::sys::Socket::Socket ( _dummy_values   )  [inline, private]

olsr::sys::Socket::Socket (  )  [inline]

References init().

olsr::sys::Socket::Socket ( unsigned  mtu  )  [inline]

References init().

olsr::sys::Socket::Socket ( unsigned  mtu,
const addr_t addr,
port_t  port 
) [inline]

References bind(), and init().

olsr::sys::Socket::Socket ( unsigned  mtu,
const std::string &  host,
port_t  port 
) [inline]

References bind(), and init().

olsr::sys::Socket::Socket ( unsigned  mtu,
const char *  host,
port_t  port 
) [inline]

References bind(), and init().


Member Function Documentation

void olsr::sys::Socket::close (  )  [inline]

References _fd.

Referenced by olsr::net::RealInterface::~RealInterface().

unsigned olsr::sys::Socket::mtu (  )  const [inline]

References _mtu.

void olsr::sys::Socket::set_mtu ( unsigned  mtu  )  [inline]

References _mtu.

Referenced by olsr::net::RealInterface::RealInterface().

void olsr::sys::Socket::bind_to_device ( const std::string &  name  )  [inline]

References _fd.

Referenced by bind_multicast().

void olsr::sys::Socket::set_multicast ( const RealInterfaceInfo info  )  [inline]

void olsr::sys::Socket::set_priority (  )  [inline]

References _fd.

void olsr::sys::Socket::bind ( const sockaddr_t sin  )  [inline]

References _fd.

Referenced by bind(), bind_multicast(), and Socket().

void olsr::sys::Socket::bind_multicast ( const RealInterfaceInfo info,
const address_t a,
port_t  port 
) [inline]

void olsr::sys::Socket::bind ( const addr_t addr,
port_t  port,
unsigned  index = 0 
) [inline]

void olsr::sys::Socket::connect ( const sockaddr_t sin  )  [inline]

References _fd.

Referenced by connect().

void olsr::sys::Socket::connect ( const addr_t addr,
port_t  port 
) [inline]

utl::Data olsr::sys::Socket::receive ( address_t sender  )  const [inline]

void olsr::sys::Socket::send ( const utl::ConstData d  )  const [inline]

void olsr::sys::Socket::set_baddr ( const address_t a  )  [inline]

void olsr::sys::Socket::sendto ( const utl::ConstData d,
const address_t::sockaddr_t s 
) const [inline]

void olsr::sys::Socket::sendto_bcast ( const utl::ConstData d  )  const [inline]

sch::IOEvent::p_t olsr::sys::Socket::read_p (  )  const [inline]

References _fd.

Referenced by olsr::net::RealInterface::recv_p().

sch::IOEvent::p_t olsr::sys::Socket::write_p (  )  const [inline]

References _fd.

Referenced by olsr::net::RealInterface::send_p().

bool olsr::sys::Socket::operator< ( const This rhs  )  const [inline]

References _fd.

static const This& olsr::sys::Socket::dummy (  )  [inline, static]

References _dummy.

void olsr::sys::Socket::init (  )  [private]

References _fd, and olsr::net::IPv6Address::proto.

Referenced by Socket().


Member Data Documentation

int olsr::sys::Socket::_fd [private]

unsigned olsr::sys::Socket::_mtu [private]

Referenced by mtu(), receive(), and set_mtu().

Referenced by sendto_bcast(), and set_baddr().

unsigned olsr::sys::Socket::_index [private]

Referenced by bind_multicast(), and sendto_bcast().

This olsr::sys::Socket::_dummy [static, private]

Referenced by dummy().


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

Generated on Thu Feb 12 20:45:39 2009 for Qolyester daemon by  doxygen 1.5.6