NetBurner 3.5.8
PDF Version
Toggle main menu visibility
ethernet.h
1
/*NB_REVISION*/
2
3
/*NB_COPYRIGHT*/
4
9
15
16
#ifndef _NB_ETHERNET_H
17
#define _NB_ETHERNET_H
18
19
#include <basictypes.h>
20
#include <buffers.h>
21
#include <nettypes.h>
22
23
// Definitions
24
29
#define ETHERNET_ETHERTYPE_IPv4 (uint16_t)(0x0800)
30
#define ETHERNET_ETHERTYPE_ARP (uint16_t)(0x0806)
31
#define ETHERNET_ETHERTYPE_IPv6 (uint16_t)(0x86DD)
32
#define ETHERNET_ETHERTYPE_AARP (uint16_t)(0x80F3)
33
#define ETHERNET_ETHERTYPE_IPX (uint16_t)(0x8137)
34
#define ETHERNET_ETHERTYPE_EAPOL (uint16_t)(0x888E)
35
#define ETHERNET_ETHERTYPE_VLAN (uint16_t)(0x8100)
37
38
#define IP_20BYTE_ID (0x4500)
39
40
// Data Structures
41
43
typedef
struct
_EthernetFrameHeader
44
{
45
MACADDRESS_48
destinationMacAddress
;
46
MACADDRESS_48
sourceMacAddress
;
47
beuint16_t
etherType
;
48
49
} __attribute__((packed)) EthernetFrameHeader;
50
57
void
AddEthernetInterfaces
();
58
76
void
ManualEthernetConfig
(
int
interface, BOOL speed100Mbit, BOOL fullDuplex, BOOL autoNegotiate);
77
87
void
DisablePHY
(
int
ifn);
88
99
void
EnablePHY
(
int
ifn);
100
108
#define NO_AUTOMATIC_2ND_ETHERNET extern const bool bAutomatic2ndEther = false;
109
110
#endif
111
DisablePHY
void DisablePHY(int ifn)
Disable the specified Ethernet PHY.
EnablePHY
void EnablePHY(int ifn)
Disable the specified Ethernet PHY.
ManualEthernetConfig
void ManualEthernetConfig(int interface, BOOL speed100Mbit, BOOL fullDuplex, BOOL autoNegotiate)
Manually configure Ethernet speed and duplex settings.
AddEthernetInterfaces
void AddEthernetInterfaces()
Add an Ethernet interface.
_EthernetFrameHeader
Ethernet Type II Frame Header.
Definition
ethernet.h:44
_EthernetFrameHeader::destinationMacAddress
MACADDRESS_48 destinationMacAddress
Destination MAC address.
Definition
ethernet.h:45
_EthernetFrameHeader::etherType
beuint16_t etherType
Protocol.
Definition
ethernet.h:47
_EthernetFrameHeader::sourceMacAddress
MACADDRESS_48 sourceMacAddress
Source MAC address.
Definition
ethernet.h:46
nbrtos
include
ethernet.h
Generated by
1.18.0