#include <socket.hh>
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 This & | dummy () |
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 |
typedef Socket olsr::sys::Socket::This [private] |
| typedef address_t olsr::sys::Socket::addr_t |
| typedef u_int16_t olsr::sys::Socket::port_t |
enum olsr::sys::Socket::_dummy_values [private] |
| 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 std::string & | host, | |||
| port_t | port | |||
| ) | [inline] |
| olsr::sys::Socket::Socket | ( | unsigned | mtu, | |
| const char * | host, | |||
| port_t | port | |||
| ) | [inline] |
| void olsr::sys::Socket::close | ( | ) | [inline] |
| unsigned olsr::sys::Socket::mtu | ( | ) | const [inline] |
References _mtu.
| void olsr::sys::Socket::set_mtu | ( | unsigned | mtu | ) | [inline] |
| void olsr::sys::Socket::bind_to_device | ( | const std::string & | name | ) | [inline] |
| void olsr::sys::Socket::set_multicast | ( | const RealInterfaceInfo & | info | ) | [inline] |
References _fd, olsr::dirty_promisc_hack, olsr::sys::RealInterfaceInfo::index(), and olsr::sys::RealInterfaceInfo::name().
Referenced by bind_multicast().
| void olsr::sys::Socket::set_priority | ( | ) | [inline] |
References _fd.
| void olsr::sys::Socket::bind | ( | const sockaddr_t & | sin | ) | [inline] |
| void olsr::sys::Socket::bind_multicast | ( | const RealInterfaceInfo & | info, | |
| const address_t & | a, | |||
| port_t | port | |||
| ) | [inline] |
References bind(), and olsr::net::IPv6Address::make_sockaddr().
| void olsr::sys::Socket::connect | ( | const sockaddr_t & | sin | ) | [inline] |
References connect(), and olsr::net::IPv6Address::make_sockaddr().
References _fd, _mtu, olsr::utl::Data::raw(), olsr::utl::Data_< Self >::shrink_to(), and olsr::utl::Data_< Self >::size().
Referenced by olsr::net::RealInterface::receive().
| void olsr::sys::Socket::send | ( | const utl::ConstData & | d | ) | const [inline] |
References _fd, olsr::utl::Data_< Self >::raw(), and olsr::utl::Data_< Self >::size().
| 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] |
References _fd, olsr::utl::Data_< Self >::raw(), and olsr::utl::Data_< Self >::size().
Referenced by sendto_bcast().
| void olsr::sys::Socket::sendto_bcast | ( | const utl::ConstData & | d | ) | const [inline] |
References _baddr, _fd, _index, olsr::net::IPv6Address::make_sockaddr(), OLSR_PORT_NUMBER, olsr::utl::Data_< Self >::raw(), sendto(), and olsr::utl::Data_< Self >::size().
Referenced by olsr::net::RealInterface::send().
| sch::IOEvent::p_t olsr::sys::Socket::read_p | ( | ) | const [inline] |
| sch::IOEvent::p_t olsr::sys::Socket::write_p | ( | ) | const [inline] |
| void olsr::sys::Socket::init | ( | ) | [private] |
int olsr::sys::Socket::_fd [private] |
Referenced by bind(), bind_multicast(), bind_to_device(), close(), connect(), init(), operator<(), read_p(), receive(), send(), sendto(), sendto_bcast(), set_multicast(), set_priority(), and write_p().
unsigned olsr::sys::Socket::_mtu [private] |
address_t olsr::sys::Socket::_baddr [private] |
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().
1.5.6