NetBurner 3.5.0
PDF Version
 
ethernet.h
Go to the documentation of this file.
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
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)
38#define IP_20BYTE_ID (0x4500)
39
40// Data Structures
41
44{
45 MACADDRESS_48 destinationMacAddress;
46 MACADDRESS_48 sourceMacAddress;
47 beuint16_t etherType;
48
49} __attribute__((packed)) EthernetFrameHeader;
50
58
76void ManualEthernetConfig(int interface, BOOL speed100Mbit, BOOL fullDuplex, BOOL autoNegotiate);
77
87void DisablePHY(int ifn);
88
99void EnablePHY(int ifn);
100
108#define NO_AUTOMATIC_2ND_ETHERNET extern const bool bAutomatic2ndEther = false;
109
110#endif
111
NetBurner Buffers API.
void DisablePHY(int ifn)
Disable the specified Ethernet PHY.
void EnablePHY(int ifn)
Disable the specified Ethernet PHY.
struct _EthernetFrameHeader EthernetFrameHeader
Ethernet Type II Frame Header.
void ManualEthernetConfig(int interface, BOOL speed100Mbit, BOOL fullDuplex, BOOL autoNegotiate)
Manually configure Ethernet speed and duplex settings.
void AddEthernetInterfaces()
Add an Ethernet interface.
NetBurner IPADDR4 Class. See the IPADDR4 Class page for complete documentation.
Ethernet Type II Frame Header.
Definition ethernet.h:44
MACADDRESS_48 destinationMacAddress
Destination MAC address.
Definition ethernet.h:45
beuint16_t etherType
Protocol.
Definition ethernet.h:47
MACADDRESS_48 sourceMacAddress
Source MAC address.
Definition ethernet.h:46