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

nicrtl.h File Reference

Network interface controller definitions. More...

#include <dev/netbuf.h>
#include <net/if_var.h>

Go to the source code of this file.

Data Structures

struct  _NICINFO
 Network interface controller information structure. More...


Typedefs

typedef _NICINFO NICINFO
 Network interface controller information type.


Functions

int NicInit (NUTDEVICE *dev)
 Initialize Ethernet hardware.

int NicOutput (NUTDEVICE *dev, NETBUF *nb)
 Send Ethernet packet.


Variables

NUTDEVICE devEth0
 Device information structure.


Detailed Description

Network interface controller definitions.


Function Documentation

int NicInit NUTDEVICE   dev
 

Initialize Ethernet hardware.

Resets RTL8019AS Ethernet controller, initializes all required hardware registers and starts two additional threads, one for incoming and another for outgoing Ethernet traffic.

This function takes more than 2 seconds to execute and should be called only once during system initialization.

Applications typically do not use this function, but call NutNetIfConfig().

Parameters:
dev  Identifies the device to initialize. The structure must be properly set.

int NicOutput NUTDEVICE   dev,
NETBUF   nb
 

Send Ethernet packet.

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().
Returns:
0 on success, -1 in case of any errors.


Variable Documentation

NUTDEVICE devEth0  
 

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.


Generated on Thu Jan 30 22:30:54 2003 for EduNet by doxygen1.2.18