Subject: Re: mopd output
To: Jon Grubbs <jgrubbs@nwu.edu>
From: Mats O Jansson <maja@celsiustech.se>
List: port-vax
Date: 07/23/1997 22:40:50
On Wed, 23 Jul 1997, Jon Grubbs wrote:
> Kevin,
>
> I ran into this problem myself. This is a problem with mopd in that it
> assumes BPF is still broken in FreeBSD, even if you are running the "fixed"
> version in 2.0 or later (I know its fixed in 2.1+ anyway...)
>
> If you look for the ifdef's in the mopd code for the FreeBSD ones and take
> out the one that reverses the type code (I think thats the bytes it munges)
> in the ethernet packet and recompile, you should be working.
>
> Sorry for being a bit vauge, but I dont have access to my mopd machine at
> the moment to give you the exact incantation to fix the problem.
>
> Hope this helps some.
>
It's a known problem. This was reported to me a couple of weeks ago.
I supply the fix Ari Suutari sent me. It will be fixed in next
release of mopd. I have a machine that has FreeBSD installed, but I havn't
benn running it since last summer when I added the support for FreeBSD.
-moj
------------------------------------------------------------------------------
Mats O Jansson, CelsiusTech Systems, Jaerfaella, Sweden
email: maja@celsiustech.se (or moj@stacken.kth.se)
From: Ari Suutari <ari@suutari.iki.fi>
Message-Id: <199707011242.PAA02867@kn6-045.ktvlpr.inet.fi>
Subject: Re: mopd and FreeBSD
In-Reply-To: <Pine.SUN.3.91.970701141616.12444A-100000@world> from Mats O Jansson at "Jul 1, 97 02:29:20 pm"
To: maja@celsiustech.se (Mats O Jansson)
Date: Tue, 1 Jul 1997 15:42:09 +0300 (EET DST)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Status: RO
Hi again,
> If I remember correctly (it's over a year since I looked at the FreeBSD
> parts), then problem with FreeBSD at that time was that it didn't accept
> the ethernet protocol number in network byte order as BSD/OS, NetBSD and
> OpenBSD. I think I used 2.1.0 or 2.1.5 when I wrote the code, and FreeBSD
> might have fixed the bug since then...
>
Yeah, I remember something like being discussed
a long time ago now. I'll include diffs to put.c
in this mail in case you have time to put them
into future mopd release.
Ari S.
*** put.c.orig Tue Jul 1 15:34:34 1997
--- put.c Tue Jul 1 15:38:18 1997
***************
*** 35,40 ****
--- 35,43 ----
#include <sys/types.h>
#include <time.h>
#include "common/mopdef.h"
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #endif
void
mopPutChar(pkt, index, value)
***************
*** 137,143 ****
mopPutChar (pkt, index, 0x00);
mopPutChar (pkt, index, 0x2b);
}
! #if !defined(__FreeBSD__)
mopPutChar(pkt, index, (proto / 256));
mopPutChar(pkt, index, (proto % 256));
#else
--- 140,146 ----
mopPutChar (pkt, index, 0x00);
mopPutChar (pkt, index, 0x2b);
}
! #if !defined(__FreeBSD__) || __FreeBSD_version >= 220000
mopPutChar(pkt, index, (proto / 256));
mopPutChar(pkt, index, (proto % 256));
#else
***************
*** 170,176 ****
break;
case TRANS_8023:
index = 12;
! #if !defined(__FreeBSD__)
mopPutChar(pkt, &index, ((len - 14) / 256));
mopPutChar(pkt, &index, ((len - 14) % 256));
#else
--- 173,179 ----
break;
case TRANS_8023:
index = 12;
! #if !defined(__FreeBSD__) || __FreeBSD_version >= 220000
mopPutChar(pkt, &index, ((len - 14) / 256));
mopPutChar(pkt, &index, ((len - 14) % 256));
#else