sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ethernet.h File Reference
#include "lwip/arch.h"
#include "lwip/prot/ieee.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 ETH_ADDR(b0, b1, b2, b3, b4, b5)
#define SIZEOF_ETH_HDR   (14 + ETH_PAD_SIZE)
#define SIZEOF_VLAN_HDR   4
#define VLAN_ID(vlan_hdr)
#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 eth_addr_cmp(addr1, addr2)
#define eth_addr_eq(addr1, addr2)

Variables

PACK_STRUCT_BEGIN struct eth_addr PACK_STRUCT_STRUCT

Detailed Description

Ethernet protocol definitions

Definition in file ethernet.h.

Macro Definition Documentation

◆ ETH_ADDR

#define ETH_ADDR ( b0,
b1,
b2,
b3,
b4,
b5 )
Value:
{{b0, b1, b2, b3, b4, b5}}

Initialize a struct eth_addr with its 6 bytes (takes care of correct braces)

Definition at line 70 of file ethernet.h.

◆ eth_addr_cmp

#define eth_addr_cmp ( addr1,
addr2 )
Value:
eth_addr_eq((addr1), (addr2))

Definition at line 121 of file ethernet.h.

◆ eth_addr_eq

#define eth_addr_eq ( addr1,
addr2 )
Value:
(memcmp((addr1)->addr, (addr2)->addr, ETH_HWADDR_LEN) == 0)

Definition at line 122 of file ethernet.h.

◆ ETH_HWADDR_LEN

#define ETH_HWADDR_LEN   6

Definition at line 52 of file ethernet.h.

◆ LL_IP4_MULTICAST_ADDR_0

#define LL_IP4_MULTICAST_ADDR_0   0x01

The 24-bit IANA IPv4-multicast OUI is 01-00-5e:

Definition at line 112 of file ethernet.h.

◆ LL_IP4_MULTICAST_ADDR_1

#define LL_IP4_MULTICAST_ADDR_1   0x00

Definition at line 113 of file ethernet.h.

◆ LL_IP4_MULTICAST_ADDR_2

#define LL_IP4_MULTICAST_ADDR_2   0x5e

Definition at line 114 of file ethernet.h.

◆ LL_IP6_MULTICAST_ADDR_0

#define LL_IP6_MULTICAST_ADDR_0   0x33

IPv6 multicast uses this prefix

Definition at line 117 of file ethernet.h.

◆ LL_IP6_MULTICAST_ADDR_1

#define LL_IP6_MULTICAST_ADDR_1   0x33

Definition at line 118 of file ethernet.h.

◆ SIZEOF_ETH_HDR

#define SIZEOF_ETH_HDR   (14 + ETH_PAD_SIZE)

Definition at line 90 of file ethernet.h.

◆ SIZEOF_VLAN_HDR

#define SIZEOF_VLAN_HDR   4

Definition at line 108 of file ethernet.h.

◆ VLAN_ID

#define VLAN_ID ( vlan_hdr)
Value:
(lwip_htons((vlan_hdr)->prio_vid) & 0xFFF)

Definition at line 109 of file ethernet.h.