Prusa MINI Firmware overview
|
#include "lwip/arch.h"
Go to the source code of this file.
Classes | |
struct | eth_addr |
struct | eth_hdr |
struct | eth_vlan_hdr |
Macros | |
#define | ETH_HWADDR_LEN 6 |
#define | SIZEOF_ETH_HDR (14 + ETH_PAD_SIZE) |
#define | SIZEOF_VLAN_HDR 4 |
#define | VLAN_ID(vlan_hdr) (lwip_htons((vlan_hdr)->prio_vid) & 0xFFF) |
#define | LL_IP4_MULTICAST_ADDR_0 0x01 |
#define | LL_IP4_MULTICAST_ADDR_1 0x00 |
#define | LL_IP4_MULTICAST_ADDR_2 0x5e |
#define | LL_IP6_MULTICAST_ADDR_0 0x33 |
#define | LL_IP6_MULTICAST_ADDR_1 0x33 |
#define | ETHADDR32_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) |
#define | ETHADDR16_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) |
#define | eth_addr_cmp(addr1, addr2) (memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0) |
Enumerations | |
enum | eth_type { ETHTYPE_IP = 0x0800U, ETHTYPE_ARP = 0x0806U, ETHTYPE_WOL = 0x0842U, ETHTYPE_RARP = 0x8035U, ETHTYPE_VLAN = 0x8100U, ETHTYPE_IPV6 = 0x86DDU, ETHTYPE_PPPOEDISC = 0x8863U, ETHTYPE_PPPOE = 0x8864U, ETHTYPE_JUMBO = 0x8870U, ETHTYPE_PROFINET = 0x8892U, ETHTYPE_ETHERCAT = 0x88A4U, ETHTYPE_LLDP = 0x88CCU, ETHTYPE_SERCOS = 0x88CDU, ETHTYPE_MRP = 0x88E3U, ETHTYPE_PTP = 0x88F7U, ETHTYPE_QINQ = 0x9100U } |
Variables | |
PACK_STRUCT_BEGIN struct eth_addr | PACK_STRUCT_STRUCT |
Ethernet protocol definitions
#define ETH_HWADDR_LEN 6 |
#define SIZEOF_ETH_HDR (14 + ETH_PAD_SIZE) |
#define SIZEOF_VLAN_HDR 4 |
#define VLAN_ID | ( | vlan_hdr | ) | (lwip_htons((vlan_hdr)->prio_vid) & 0xFFF) |
#define LL_IP4_MULTICAST_ADDR_0 0x01 |
The 24-bit IANA IPv4-multicast OUI is 01-00-5e:
#define LL_IP4_MULTICAST_ADDR_1 0x00 |
#define LL_IP4_MULTICAST_ADDR_2 0x5e |
#define LL_IP6_MULTICAST_ADDR_0 0x33 |
IPv6 multicast uses this prefix
#define LL_IP6_MULTICAST_ADDR_1 0x33 |
#define ETHADDR32_COPY | ( | dst, | |
src | |||
) | SMEMCPY(dst, src, ETH_HWADDR_LEN) |
MEMCPY-like macro to copy to/from struct eth_addr's that are local variables or known to be 32-bit aligned within the protocol header.
#define ETHADDR16_COPY | ( | dst, | |
src | |||
) | SMEMCPY(dst, src, ETH_HWADDR_LEN) |
MEMCPY-like macro to copy to/from struct eth_addr's that are no local variables and known to be 16-bit aligned within the protocol header.
#define eth_addr_cmp | ( | addr1, | |
addr2 | |||
) | (memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0) |
PACK_STRUCT_BEGIN struct eth_vlan_hdr PACK_STRUCT_STRUCT |