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

if_ether.h File Reference


Detailed Description

Ethernet interface definitions.

A more elaborated file description.


Defines

#define ETHERTYPE_IP   0x0800
 IP protocol.
#define ETHERTYPE_ARP   0x0806
 Address resolution protocol.
#define ETHERMTU   1500
 Ethernet maximum transfer unit.
#define ETHERMIN   (60-14)
 Ethernet minimum transfer unit.

Typedefs

typedef ether_header ETHERHDR
 Ethernet protocol header type.
typedef ether_arp ETHERARP
 Ethernet ARP protocol type.

Functions

u_charether_aton (CONST char *str)
 Convert an ASCII string to a binary Ethernet address.
char * ether_ntoa (CONST u_char *mac)
 Convert a binary Ethernet address to an ASCII string.
void NutArpInput (NUTDEVICE *dev, NETBUF *nb)
 Handle incoming ARP packets.
NETBUFNutArpAllocNetBuf (u_short type, u_long ip, u_char *mac)
 Allocate an ARP network buffer structure.
int NutArpOutput (NUTDEVICE *dev, NETBUF *nb)
 Send an ARP packet.
void NutArpCacheUpdate (NUTDEVICE *dev, u_long ip, u_char *ha)
 Update an ARP entry.
int NutArpCacheQuery (NUTDEVICE *dev, u_long ip, u_char *mac)


Function Documentation

u_char* ether_aton CONST char *  str  ) 
 

Convert an ASCII string to a binary Ethernet address.

Note:
This function returns a pointer to internal static storage space that will be overwritten by subsequent calls.
Parameters:
str String to convert.
Returns:
Pointer to a static string that contains the converted binary address.

char* ether_ntoa CONST u_char mac  ) 
 

Convert a binary Ethernet address to an ASCII string.

Note:
This function returns a pointer to internal static storage space that will be overwritten by subsequent calls.
Parameters:
mac Address to convert.
Returns:
Pointer to a static string that contains the converted ASCII string.


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