Public Types | |
|
typedef std::shared_ptr < EtherSocket > | shared |
| typedef EtherSocket * | ptr |
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) |
| EtherSocket & | setInterface (const std::string &interface) throw (SocketException) |
| EtherSocket & | setIfIndex (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 } |
Definition at line 26 of file EtherSocket.h.
1.6.1