Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
NAME
ether — ethernetSYNOPSIS
#include <netinet/if_ether.h>
struct ether_addr {
uint8_t ether_addr_octet[ETHER_ADDR_LEN /* 6 */];
};
struct ether_header {
uint8_t ether_dhost[ETHER_ADDR_LEN /* 6 */];
uint8_t ether_shost[ETHER_ADDR_LEN /* 6 */];
uint16_t ether_type;
};
struct ether_footer {
uint32_t ether_crc;
};
DESCRIPTION
The Ethernet is a physical and link layer protocol for datagram exchange on a local area network. An Ethernet packet contains an Ethernet frame that contains a datagram of a higher level protocol. Ethernet 2.0 framing is implemented. IEEE Std 802.3 Ethernet framing is intentionally not implemented.-
ETHERTYPE_IP (
0x0800) - The Internet Protocol version 4 ip(4).
-
ETHERTYPE_ARP (
0x0806) - The Address Resolution Protocol arp(4).
-
ETHER_ADDR_LEN
6 - The size of an Ethernet address in bytes.
-
ETHER_TYPE_LEN
2 - The size of the type field in the Ethernet header in bytes.
-
ETHER_HDR_LEN
14 - The size of the Ethernet header in bytes.
-
ETHER_CRC_LEN
4 - The size of the Ethernet frame check sequence in bytes.
-
ETHER_LEN
18 - The total size of the Ethernet header and the frame check sequence in bytes.
-
ETHER_MIN_LEN
64 - The minimum size of Ethernet frames.
-
ETHER_MAX_LEN
1518 - The maximum size of Ethernet frames.
-
ETHERMTU
1500 - The maximum transmission unit for Ethernet payloads.
-
ETHERMIN
46 - The minimum transmission unit for Ethernet payloads.
-
ETHERADDR_BROADCAST_INIT
{{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}} - An initializer list for struct ether_addr that initializes it to the broadcast address ff:ff:ff:ff:ff:ff.
ERRORS
Socket operations can fail due to these error conditions, in addition to the error conditions of the invoked function.- [EMSGSIZE]
- The datagram was too large to be sent because it exceeded the maximum transmission unit (MTU) (1500 bytes) of the Ethernet protocol.
- [ENOBUFS]
- There was not enough memory available for network packets.