Application of mopd-2.5.3-freebsd-put.patch:

* Sun Nov 17 2002 Maciej W. Rozycki <macro@ds2.pg.gda.pl> 2.5.3-15
- handle the FreeBSD peculiarities when sending 802.3 frames;
  from FreeBSD patches (freebsd-put)

Downloaded from:
ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/mopd/mopd-2.5.3-freebsd-put.patch.gz
.patch SHA256 = 30f88f8670e875e8617ff2ebf734e116065d4375b186559c9f360ce58578795b
Patch history copied from:
ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/mopd/mopd-2.5.3-15.spec
This commit is contained in:
Maciej W. Rozycki
2002-11-17 12:00:00 -05:00
committed by Boris Gjenero
parent 2e215f9d0f
commit 11b14351b0

View File

@@ -34,6 +34,9 @@ static char rcsid[] = "$Id: put.c,v 1.5 1996/08/16 22:42:56 moj Exp $";
#include <stddef.h>
#include <sys/types.h>
#include <time.h>
#ifdef __FreeBSD__
#include <osreldate.h>
#endif
#include "mopdef.h"
void
@@ -147,10 +150,7 @@ mopPutHeader(pkt, index, dst, src, proto, trans)
mopPutChar (pkt, index, 0x00);
mopPutChar (pkt, index, 0x2b);
}
#if !defined(__FreeBSD__)
mopPutChar(pkt, index, (proto / 256));
mopPutChar(pkt, index, (proto % 256));
#else
#if defined(__FreeBSD__) && __FreeBSD_version < 220000
if (trans == TRANS_ETHER) {
mopPutChar(pkt, index, (proto % 256));
mopPutChar(pkt, index, (proto / 256));
@@ -158,6 +158,9 @@ mopPutHeader(pkt, index, dst, src, proto, trans)
mopPutChar(pkt, index, (proto / 256));
mopPutChar(pkt, index, (proto % 256));
}
#else
mopPutChar(pkt, index, (proto / 256));
mopPutChar(pkt, index, (proto % 256));
#endif
if (trans != TRANS_8023)
mopPutShort(pkt, index, 0);
@@ -180,12 +183,12 @@ mopPutLength(pkt, trans, len)
break;
case TRANS_8023:
index = 12;
#if !defined(__FreeBSD__)
mopPutChar(pkt, &index, ((len - 14) / 256));
#if defined(__FreeBSD__) && __FreeBSD_version < 220000
mopPutChar(pkt, &index, ((len - 14) % 256));
mopPutChar(pkt, &index, ((len - 14) / 256));
#else
mopPutChar(pkt, &index, ((len - 14) % 256));
mopPutChar(pkt, &index, ((len - 14) / 256));
mopPutChar(pkt, &index, ((len - 14) % 256));
#endif
break;
case TRANS_FDDI_8021H: