NetBurner 3.5.0
PDF Version
 
Ethernet

Topics

 Ethernet I/O Counters
 

Classes

struct  _EthernetFrameHeader
 Ethernet Type II Frame Header. More...
 

Macros

#define NO_AUTOMATIC_2ND_ETHERNET   extern const bool bAutomatic2ndEther = false;
 Disable automatic initialization of second Ethernet interface.
 

Typedefs

typedef struct _EthernetFrameHeader EthernetFrameHeader
 Ethernet Type II Frame Header.
 

Functions

void AddEthernetInterfaces ()
 Add an Ethernet interface.
 
void ManualEthernetConfig (int interface, BOOL speed100Mbit, BOOL fullDuplex, BOOL autoNegotiate)
 Manually configure Ethernet speed and duplex settings.
 
void DisablePHY (int ifn)
 Disable the specified Ethernet PHY.
 
void EnablePHY (int ifn)
 Disable the specified Ethernet PHY.
 

Ethernet Interface Types

EtherType Field ( Ethernet Version II )

#define ETHERNET_ETHERTYPE_IPv4   (uint16_t)(0x0800)
 Internet Protocol, Version 4 (IPv4)
 
#define ETHERNET_ETHERTYPE_ARP   (uint16_t)(0x0806)
 Address Resolution Protocol (ARP)
 
#define ETHERNET_ETHERTYPE_IPv6   (uint16_t)(0x86DD)
 Internet Protocol, Version 6 (IPv6)
 
#define ETHERNET_ETHERTYPE_AARP   (uint16_t)(0x80F3)
 AppleTalk Address Resolution Prot. (AARP)
 
#define ETHERNET_ETHERTYPE_IPX   (uint16_t)(0x8137)
 Novell Internet Packet Exchange (IPX) (alt.)
 
#define ETHERNET_ETHERTYPE_EAPOL   (uint16_t)(0x888E)
 Extensible Authorization Protocol (EAP) over LAN.
 
#define ETHERNET_ETHERTYPE_VLAN   (uint16_t)(0x8100)
 Virtual Private Network (VLAN)
 

Detailed Description

#include< ethernet.h >

Functions to add, configure and disable Ethernet interfaces

Macro Definition Documentation

◆ NO_AUTOMATIC_2ND_ETHERNET

#define NO_AUTOMATIC_2ND_ETHERNET   extern const bool bAutomatic2ndEther = false;

#include <ethernet.h>

Disable automatic initialization of second Ethernet interface.

Include this macro in UserMain to prevent automatic system addition and initialization of the second Ethernet interface on dual Ethenet devices.

Function Documentation

◆ AddEthernetInterfaces()

void AddEthernetInterfaces ( )

#include <ethernet.h>

Add an Ethernet interface.

The default system behavior is all Ethernet interfaces will automatically be added and initialized. Interface numbers range from 1 to ( MAX_INTERFACES - 1 )

◆ DisablePHY()

void DisablePHY ( int ifn)

#include <ethernet.h>

Disable the specified Ethernet PHY.

Typically used for low power mode.

Parameters
ifnInterface number to disable
See also
EnablePHY

◆ EnablePHY()

void EnablePHY ( int ifn)

#include <ethernet.h>

Disable the specified Ethernet PHY.

Enable an Ethernet PHY previously disabled by DisablePHY()

Parameters
ifnInterface number to ensable
See also
DisablePHY()

◆ ManualEthernetConfig()

void ManualEthernetConfig ( int interface,
BOOL speed100Mbit,
BOOL fullDuplex,
BOOL autoNegotiate )

#include <ethernet.h>

Manually configure Ethernet speed and duplex settings.

The default setting to establish an Ethernet link is autonegotiate. This function can be used to disable autonegotiate and set the Ethernet link speed and duplex.

Warning
With autonegotiate disabled, the other Ethernet host must also be configured manually with the same settings. If the other host is set to autonegotiate, the link will have undefined behavior and data loss.
Parameters
interfaceThe network interface to modify. The first interface number is 1
speed100MbitTrue = 100Mbps, False = 10Mbps
fullDuplexTrue = full duplex, False = half duplex
autoNegotiateTrue = enabled, False = disabled. If enabled, will override manual settings.