Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Ethernet Protocol

RFC 894 IP over Ethernet. More...

Functions

void NutEtherInput (NUTDEVICE *dev, NETBUF *nb)
 Handle incoming Ethernet frames. More...

int NutEtherOutput (NUTDEVICE *dev, u_short type, u_char *ha, NETBUF *nb, u_char flags)
 Send Ethernet frame. More...


Detailed Description

RFC 894 IP over Ethernet.


Function Documentation

void NutEtherInput ( NUTDEVICE * dev,
NETBUF * nb )
 

Handle incoming Ethernet frames.

Note:
This routine is called by the device driver on incoming ethernet packets. Applications typically do not call this function.
Parameters:
dev   Identifies the device that received the frame.

int NutEtherOutput ( NUTDEVICE * dev,
u_short type,
u_char * ha,
NETBUF * nb,
u_char flags )
 

Send Ethernet frame.

Send an Ethernet frame of a given type using the specified device.

Parameters:
dev   Identifies the device to use.
nb   Network buffer structure containing the packet to be sent. The structure must have been allocated by a previous call NutNetBufAlloc(). This buffer will automatically released on asynchronous transmits or in case of an error.
flags   Set to 1 for asynchronous output, 0 otherwise.

Returns:
0 on success, -1 in case of any errors. Errors will automatically release the network buffer structure.


© 2000-2001 by egnite Software GmbH - visit http://www.ethernut.de/