sella::net::EtherSocket Class Reference

Inheritance diagram for sella::net::EtherSocket:
sella::net::Socket

List of all members.

Public Types

typedef std::shared_ptr
< EtherSocket
shared
typedef EtherSocketptr

Public Member Functions

 EtherSocket (int etherType, const std::string &interface, bool raw=false) throw (SocketException)
 EtherSocket (int etherType, int ifIndex, bool raw=false) throw (SocketException)
 EtherSocket (int etherType, bool raw=false) throw (SocketException)
 EtherSocket (const EtherSocket &sock)
void operator= (const EtherSocket &sock)
EtherSocketsetInterface (const std::string &interface) throw (SocketException)
EtherSocketsetIfIndex (int index) throw ()
int getEtherType (void) const throw ()
std::string getInterface (void) const throw (SocketException)
int getIfIndex (void) const throw ()
bool isRaw (void) const throw ()
void bindInterface (void) throw (SocketException)
void setSoBindToDevice (const std::string &interface) throw (SocketException)
void setSoBindToDevice (void) throw (SocketException)
void setPromiscous (bool on=true) throw (SocketException)
ssize_t sendto (const void *data, size_t len, const std::string &dst_mac, int flags=0) throw (SocketException)
ssize_t sendto (const void *data, size_t len, const unsigned char *dst_mac=BroadcastMAC, int flags=0) throw (SocketException)
ssize_t sendto (const void *data, size_t len, int flags, const struct sockaddr_ll *dst_addr, socklen_t addrlen) throw (SocketException)
ssize_t recvfrom (void *data, size_t len, int flags=0, struct sockaddr_ll *src_addr=NULL, socklen_t *addrlen=NULL) throw (SocketException)
ssize_t recvfrom (void *data, size_t len, std::string &src_mac, int flags=0) throw (SocketException)
void bind (const IPAddressPort &addressport) throw (SocketException)
void bind (const IPAddress &address, const Port &port) throw (SocketException)
void bind (const std::string &address=std::string(), const unsigned short port=0) throw (SocketException)
void connect (const IPAddressPort &addressport) throw (SocketException)
void connect (const IPAddress &address, const Port &port) throw (SocketException)
void connect (const std::string &address, const unsigned short port) throw (SocketException)
ssize_t send (const void *data, size_t len, int flags=0) throw (SocketException)
ssize_t recv (void *data, size_t len, int flags=0) throw (SocketException)

Static Public Member Functions

static const EtherSocket::shared shared_ptr (int etherType) throw (SocketException)

Static Public Attributes

static const int EthAll = ETH_P_ALL
static const int EthIP = ETH_P_IP
static const int EthARP = ETH_P_ARP
static const int EthRARP = ETH_P_RARP
static const int Eth8021Q = ETH_P_8021Q
static const int EthMPLSUC = ETH_P_MPLS_UC
static const int EthMPLSMC = ETH_P_MPLS_MC
static const unsigned char BroadcastMAC [] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }

Detailed Description

Definition at line 26 of file EtherSocket.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables

Generated on 20 Nov 2014 for libutil++ by  doxygen 1.6.1