Nut/OS  4.10.3
API Reference
Null Ethernet Driver

Null Driver. More...

Collaboration diagram for Null Ethernet Driver:

Functions

int NullEtherOutput (NUTDEVICE *dev, NETBUF *nb)
 Send Ethernet packet.
int NullEtherInit (NUTDEVICE *dev)
 Initialize Ethernet hardware.

Variables

NUTDEVICE devNullEther
 Device information structure.

Detailed Description

Null Driver.


Function Documentation

int NullEtherOutput ( NUTDEVICE dev,
NETBUF nb 
)

Send Ethernet packet.

This null devices silently discards all outgoing packets.

Parameters:
devIdentifies the device to use.
nbNetwork buffer structure containing the packet to be sent. The structure must have been allocated by a previous call NutNetBufAlloc().
Returns:
Always 0.

Definition at line 65 of file null_ether.c.

int NullEtherInit ( NUTDEVICE dev)

Initialize Ethernet hardware.

Parameters:
devIdentifies the device to initialize.
Returns:
Always 0.

Definition at line 77 of file null_ether.c.


Variable Documentation

Initial value:
 {
    0,                          
    {'e', 't', 'h', '0', 0, 0, 0, 0, 0},        
    IFTYP_NET,                  
    0,                          
    0,                          
    &ifn_eth0,                  
    NULL,                       
    NullEtherInit,              
    0,                          
    0,                          
    0,                          

    0,                          

    0,                          
    0,                          
    0                           
}

Device information structure.

A pointer to this structure must be passed to NutRegisterDevice() to bind this Ethernet device driver to the Nut/OS kernel. An application may then call NutNetIfConfig() with the name eth0 of this driver to initialize the network interface.

Definition at line 112 of file null_ether.c.