nut/include/netinet/if_ether.h File Reference


Detailed Description

Ethernet interface definitions.

A more elaborated file description.

#include <sys/types.h>
#include <net/if_var.h>
#include <net/if_arp.h>

Defines

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

Functions

struct __attribute__ ((packed)) ether_header
 Operating system configuration type.
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.
NETBUFNutArpAllocNetBuf (u_short type, u_long ip, u_char *mac)
 Allocate an ARP network buffer structure.
int NutArpCacheQuery (NUTDEVICE *dev, u_long ip, u_char *mac)
void NutArpCacheUpdate (NUTDEVICE *dev, u_long ip, u_char *ha)
 Update an ARP entry.
void NutArpInput (NUTDEVICE *dev, NETBUF *nb)
 Handle incoming ARP packets.
int NutArpOutput (NUTDEVICE *dev, NETBUF *nb)
 Send an ARP packet.

Variables

 ETHERARP
 Ethernet ARP protocol type.
 ETHERHDR
 Ethernet protocol header type.


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.


Generated on Tue Jan 23 21:12:26 2007 for BTnut System Software by doxygen 1.4.7