Go to the source code of this file.
Defines | |
#define | ETH_ADDR_LEN 6 |
#define | ETH_ADDR_BITS 48 |
#define | ETH_TYPE_LEN 2 |
#define | ETH_CRC_LEN 4 |
#define | ETH_HDR_LEN 14 |
#define | ETH_LEN_MIN 64 |
#define | ETH_LEN_MAX 1518 |
#define | ETH_MTU (ETH_LEN_MAX - ETH_HDR_LEN - ETH_CRC_LEN) |
#define | ETH_MIN (ETH_LEN_MIN - ETH_HDR_LEN - ETH_CRC_LEN) |
#define | ETH_TYPE_PUP 0x0200 |
#define | ETH_TYPE_IP 0x0800 |
#define | ETH_TYPE_ARP 0x0806 |
#define | ETH_TYPE_REVARP 0x8035 |
#define | ETH_TYPE_8021Q 0x8100 |
#define | ETH_TYPE_IPV6 0x86DD |
#define | ETH_TYPE_MPLS 0x8847 |
#define | ETH_TYPE_MPLS_MCAST 0x8848 |
#define | ETH_TYPE_PPPOEDISC 0x8863 |
#define | ETH_TYPE_PPPOE 0x8864 |
#define | ETH_TYPE_LOOPBACK 0x9000 |
#define | ETH_IS_MULTICAST(ea) (*(ea) & 0x01) |
#define | ETH_ADDR_BROADCAST "\xff\xff\xff\xff\xff\xff" |
#define | eth_pack_hdr(h, dst, src, type) |
#define | eth_aton eth_pton |
Typedefs | |
typedef eth_addr | eth_addr_t |
typedef eth_handle | eth_t |
Functions | |
__BEGIN_DECLS eth_t * | eth_open (const char *device) |
int | eth_get (eth_t *e, eth_addr_t *ea) |
int | eth_set (eth_t *e, const eth_addr_t *ea) |
ssize_t | eth_send (eth_t *e, const void *buf, size_t len) |
eth_t * | eth_close (eth_t *e) |
char * | eth_ntop (const eth_addr_t *eth, char *dst, size_t len) |
int | eth_pton (const char *src, eth_addr_t *dst) |
char * | eth_ntoa (const eth_addr_t *eth) |
|
Definition at line 15 of file eth.h. Referenced by _ifrow_to_entry(), _intf_get_noalias(), addr_bcast(), addr_net(), addr_ntop(), addr_pton(), addr_ston(), arp_loop(), eth_ntoa(), eth_set(), and START_TEST(). |
|
Definition at line 53 of file eth.h. Referenced by _request_arp(), addr_bcast(), and START_TEST(). |
|
Definition at line 14 of file eth.h. Referenced by _ifrow_to_entry(), _intf_get_noalias(), addr_bcast(), addr_ntos(), addr_ston(), arp_add(), arp_loop(), arp_main(), eth_get(), eth_main(), eth_ntoa(), eth_ntop(), eth_open(), eth_pton(), eth_send(), eth_set(), intf_set(), ip_send(), and START_TEST(). |
|
Definition at line 74 of file eth.h. Referenced by __pyx_f_4dnet_eth_aton(). |
|
|
|
Definition at line 18 of file eth.h. Referenced by _request_arp(), eth_main(), and ip_send(). |
|
|
|
Definition at line 21 of file eth.h. Referenced by eth_main(), and ip_send(). |
|
Definition at line 20 of file eth.h. Referenced by _add_ip_intf(). |
|
|
|
Definition at line 23 of file eth.h. Referenced by arp_main(). |
|
Value: do { \ struct eth_hdr *eth_pack_p = (struct eth_hdr *)(h); \ memmove(ð_pack_p->eth_dst, &(dst), ETH_ADDR_LEN); \ memmove(ð_pack_p->eth_src, &(src), ETH_ADDR_LEN); \ eth_pack_p->eth_type = htons(type); \ } while (0) Definition at line 55 of file eth.h. Referenced by __pyx_f_4dnet_eth_pack_hdr(), _request_arp(), and ip_send(). |
|
|
|
Definition at line 41 of file eth.h. Referenced by _request_arp(), and type_aton(). |
|
Definition at line 40 of file eth.h. Referenced by eth_main(), eth_open(), ip_send(), tun_send(), and type_aton(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 79 of file eth-bsd.c. References NULL, PacketCloseAdapter(), and PacketFreePacket(). Referenced by __pyx_f_4dnet_3eth___dealloc__(), _intf_get_noalias(), eth_open(), intf_set(), ip_close(), and send_main(). |
|
Definition at line 137 of file eth-bsd.c. References _PACKET_OID_DATA::Data, ETH_ADDR_LEN, FALSE, _PACKET_OID_DATA::Length, memcpy, _PACKET_OID_DATA::Oid, OID_802_3_CURRENT_ADDRESS, PacketRequest(), and TRUE. Referenced by __pyx_f_4dnet_3eth_get(), _intf_get_noalias(), and eth_open(). |
|
Definition at line 95 of file addr-util.c. References addr_ntoa(), addr_pack, ADDR_TYPE_ETH, ETH_ADDR_BITS, and ETH_ADDR_LEN. Referenced by __pyx_f_4dnet_eth_ntoa(). |
|
Definition at line 75 of file addr-util.c. References eth_addr::data, ETH_ADDR_LEN, NULL, and octet2hex. Referenced by addr_ntop(). |
|
Definition at line 40 of file eth-bsd.c. References ADDR_TYPE_ETH, ETH_ADDR_LEN, eth_close(), eth_get(), intf, intf_close(), intf_get(), intf_open(), memcmp(), memset, NULL, PacketAllocatePacket(), PacketCloseAdapter(), PacketGetAdapterNames(), PacketOpenAdapter(), PacketSetBuff(), and strlcpy. Referenced by __pyx_f_4dnet_3eth___init__(), _intf_get_noalias(), _lookup_ip_intf(), intf_set(), and send_main(). |
|
Definition at line 104 of file addr-util.c. References eth_addr::data, ETH_ADDR_LEN, and strtol(). Referenced by addr_pton(). |
|
Definition at line 73 of file eth-bsd.c. References PacketInitPacket(), PacketSendPacket(), and TRUE. Referenced by __pyx_f_4dnet_3eth_send(), _request_arp(), ip_send(), and send_main(). |
|
Definition at line 163 of file eth-bsd.c. References _PACKET_OID_DATA::Data, ETH_ADDR_LEN, _PACKET_OID_DATA::Length, eth_handle::lpa, memcpy, _PACKET_OID_DATA::Oid, OID_802_3_CURRENT_ADDRESS, PacketRequest(), and TRUE. Referenced by __pyx_f_4dnet_3eth_set(), and intf_set(). |