Subject: Re: rbootd for FreeBSD
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Scott Reynolds <scottr@plexus.com>
List: port-hp300
Date: 02/01/1996 15:32:07
On Tue, 30 Jan 1996, Jason Thorpe wrote:

> There is something different about the FreeBSD ethernet drivers, 
> apparently (or BPF, or something).

Well, I had thought that Mike Hibler had done the patch, but I think I'm
confusing that with an earlier patch he had sent Jason and I.  It is
indeed a FreeBSD BPF implementation issue.  The fix is appended, and
apparently a version of this has now been checked in to the -current
tree... 

--scott

*** rmpproto.c-dist	Fri Oct 13 23:07:11 1995
--- rmpproto.c	Wed Oct 18 09:18:07 1995
***************
*** 574,581 ****
--- 574,590 ----
  	 */
  	bcopy((char *)&rconn->rmp.hp_hdr.saddr[0],
  	      (char *)&rconn->rmp.hp_hdr.daddr[0], RMP_ADDRLEN);
+ 
+ 	/*
+ 	 *  FreeBSD BPF seems to want the length field to be
+ 	 *  in host order, not network order.
+ 	 */
+ #ifdef __FreeBSD__
+ 	rconn->rmp.hp_hdr.len = ntohs(rconn->rmplen) - sizeof(struct hp_hdr);
+ #else
  	rconn->rmp.hp_hdr.len = htons(ntohs(rconn->rmplen)
  					- sizeof(struct hp_hdr));
+ #endif
  
  	/*
  	 *  Reverse 802.2/HP Extended Source & Destination Access Pts.