From: Stefan E. <se...@us...> - 2003-03-18 16:19:07
|
Update of /cvsroot/blob/blob/include/net In directory sc8-pr-cvs1:/tmp/cvs-serv15412 Modified Files: arp.h ether.h ip_bits.h Log Message: - added comments Index: arp.h =================================================================== RCS file: /cvsroot/blob/blob/include/net/arp.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- arp.h 17 Mar 2003 15:16:46 -0000 1.1 +++ arp.h 18 Mar 2003 16:18:53 -0000 1.2 @@ -7,4 +7,13 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -extern void do_arp (unsigned char *thwaddr, unsigned char *tipaddr); + +/********************************************************************** + * do_arp - send ARP request to server + * @thwaddr: the target HW address we received + * @tipaddr: the server IP address we want the HAW address for + * + * Sends and ARP REQUEST packet to the network and tries to get the + * ethernet HW address <thwaddr> for the IP address <tipaddr>. + */ +int do_arp(unsigned char *thwaddr, unsigned char *tipaddr); Index: ether.h =================================================================== RCS file: /cvsroot/blob/blob/include/net/ether.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ether.h 17 Mar 2003 15:16:46 -0000 1.1 +++ ether.h 18 Mar 2003 16:18:54 -0000 1.2 @@ -7,5 +7,28 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -extern int writeether (void *buf, int length); -extern int readether (void *buf, int size); + +#ifndef _BLOB_ETHER_H +#define _BLOB_ETHER_H 1 + +/********************************************************************** + * writeether - send a ethernet packet + * @buf: the packet + * @size: its size + * + * This routine needs to be implemented by blob ethernet "drivers" in + * order to be able to use tftp/arp/bootp code + */ +int writeether (void *buf, int length); + +/********************************************************************** + * readether - receive a ethernet packet + * @buf: the packet buffer + * @size: its maximum size + * + * This routine needs to be implemented by blob ethernet "drivers" in + * order to be able to use tftp/arp/bootp code + */ +int readether (void *buf, int size); + +#endif Index: ip_bits.h =================================================================== RCS file: /cvsroot/blob/blob/include/net/ip_bits.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ip_bits.h 17 Mar 2003 15:16:46 -0000 1.1 +++ ip_bits.h 18 Mar 2003 16:18:54 -0000 1.2 @@ -7,6 +7,9 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#ifndef _BLOB_IPBITS_H +#define _BLOB_IPBITS_H 1 + #define SIZE_ETHER 14 #define SIZE_IP 20 #define SIZE_UDP 8 @@ -24,3 +27,5 @@ extern void printip (char *msg, unsigned char *ip); extern int ipbits_tx (unsigned char *ptr, unsigned int size); extern int ipbits_rcv (unsigned char *ptr, unsigned int size, unsigned int *dsz, int sport, int dport); + +#endif |