Update of /cvsroot/blob/blob/src/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv23098
Modified Files:
ip_bits.c
Log Message:
- use ethernet header struct
Index: ip_bits.c
===================================================================
RCS file: /cvsroot/blob/blob/src/lib/ip_bits.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ip_bits.c 1 Apr 2003 18:55:19 -0000 1.3
+++ ip_bits.c 3 Apr 2003 14:18:09 -0000 1.4
@@ -76,8 +76,10 @@
/* handle broadcast packets. For arp requests */
int do_bcast( unsigned char *ptr, unsigned int size )
{
+ struct ether_hdr *ether = (struct ether_hdr*)ptr;
+
/* check whether or not ARP proto */
- if (((ptr[OFF_ETHER + 12] << 8) | ptr[OFF_ETHER + 13]) != 0x0806)
+ if ( ether->proto != HTON(0x0806) )
return 0; /* not ARP */
/* ok, its an arp. handle it. */
|