SOURCES: mopd-253patched-254.patch (NEW), mopd-alpha.patch (NEW), ...
baggins
baggins at pld-linux.org
Wed Feb 14 19:41:30 CET 2007
Author: baggins Date: Wed Feb 14 18:41:30 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
The following patches were downloaded from
ftp://ftp3.ds.pg.gda.pl/people/macro/mopd/
mopd-2.5.3-linux.patch
mopd-2.5.3-mcast.patch
mopd-2.5.3-aout.patch mopd-2.5.3-pf.patch
mopd-2.5.3-bind.patch mopd-2.5.3-pmax.patch
mopd-2.5.3-eaddr.patch mopd-2.5.3-proto.patch
mopd-2.5.3-elf.patch mopd-2.5.3-select.patch
mopd-2.5.3-fddi.patch mopd-2.5.3-syslog.patch
mopd-2.5.3-freebsd-put.patch mopd-2.5.3-vax-linux.patch
mopd-2.5.3-length.patch
The rest were created by patrick at debian.org:
253patched-254.patch - adds back in the changes from 2.5.3 to 2.5.4
to the new, patched, codebase.
debian254.patch - is the code patches for the Debian 2.5.4-7
release that apply to the code after all the previous patches
alpha.patch - define NOAOUT for alpha builds. May be needed for other archs too
---- Files affected:
SOURCES:
mopd-253patched-254.patch (NONE -> 1.1) (NEW), mopd-alpha.patch (NONE -> 1.1) (NEW), mopd-aout.patch (NONE -> 1.1) (NEW), mopd-bind.patch (NONE -> 1.1) (NEW), mopd-debian254.patch (NONE -> 1.1) (NEW), mopd-eaddr.patch (NONE -> 1.1) (NEW), mopd-elf.patch (NONE -> 1.1) (NEW), mopd-fddi.patch (NONE -> 1.1) (NEW), mopd-freebsd-put.patch (NONE -> 1.1) (NEW), mopd-gcc34.patch (NONE -> 1.1) (NEW), mopd-gcc4.patch (NONE -> 1.1) (NEW), mopd-length.patch (NONE -> 1.1) (NEW), mopd-linux.patch (NONE -> 1.1) (NEW), mopd-mcast.patch (NONE -> 1.1) (NEW), mopd-pf.patch (NONE -> 1.1) (NEW), mopd-pld.patch (NONE -> 1.1) (NEW), mopd-pmax.patch (NONE -> 1.1) (NEW), mopd-proto.patch (NONE -> 1.1) (NEW), mopd-select.patch (NONE -> 1.1) (NEW), mopd-syslog.patch (NONE -> 1.1) (NEW), mopd-vax-linux.patch (NONE -> 1.1) (NEW), mopd.init (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mopd-253patched-254.patch
diff -u /dev/null SOURCES/mopd-253patched-254.patch:1.1
--- /dev/null Wed Feb 14 19:41:30 2007
+++ SOURCES/mopd-253patched-254.patch Wed Feb 14 19:41:25 2007
@@ -0,0 +1,3697 @@
+diff -rwu mopd-2.5.3.patched/Makefile mopd-2.5.4.orig/Makefile
+--- mopd-2.5.3.patched/Makefile 2003-03-27 09:12:15.000000000 +0000
++++ mopd-2.5.4.orig/Makefile 2000-08-09 00:57:03.000000000 +0100
+@@ -1,18 +1,19 @@
+-AR = ar
+-CC = gcc
+-RANLIB = ranlib
++#make file to build linux-mopd
++SUBDIRS=common mopd mopchk mopprobe moptrace
++CFLAGS=-g
+
+-CFLAGS = -O2 -g
+-LDFLAGS =
+-LIBELF = -lelf
++all:
++ for dir in ${SUBDIRS}; \
++ do \
++ echo making $$dir; \
++ (cd $$dir; make CFLAGS="$(CFLAGS)" ) ; \
++ done
+
+-SUBDIRS = common mopd mopchk mopprobe moptrace
+
+-all clean:
+- @for dir in $(SUBDIRS); do \
+- (cd $$dir && \
+- $(MAKE) "AR=$(AR)" "CC=$(CC)" "RANLIB=$(RANLIB)" \
+- "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)" \
+- "LIBELF=$(LIBELF)" $@) || \
+- exit 1; \
++clean:
++ for dir in ${SUBDIRS} ; \
++ do \
++ (cd $$dir ; make clean); \
+ done
++
++
+diff -rwu mopd-2.5.3.patched/common/Makefile mopd-2.5.4.orig/common/Makefile
+--- mopd-2.5.3.patched/common/Makefile 2003-03-27 09:05:58.000000000 +0000
++++ mopd-2.5.4.orig/common/Makefile 2000-08-09 00:57:49.000000000 +0100
+@@ -1,21 +1,14 @@
+-LIBS = libcommon.a
+-OBJS = cmp.o device.o dl.o file.o get.o loop-bsd.o mopdef.o nma.o pf-linux.o \
+- pf.o print.o put.o rc.o version.o
++#simple make file for linux
+
+-CPPFLAGS =
+
+-all: $(LIBS)
++OBJS=cmp.o dl.o get.o mopdef.o pf-linux2.o put.o device.o file.o loop-linux2.o nma.o print.o rc.o
+
+-libcommon.a: $(OBJS)
+- -rm -f libcommon.a
+- $(AR) cru libcommon.a $(OBJS)
+- $(RANLIB) libcommon.a
++libcommon.a: ${OBJS}
++ ar -rs libcommon.a ${OBJS}
+
+-.c.o:
+- $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
+-
+-version.c: VERSION
+- sed 's/.*/char version[] = "&";/' < VERSION > version.c
++.c.o: .o
++ cc -c $(CFLAGS) $<
+
+ clean:
+- rm -f core *.a *.o version.c
++ rm -f *.o *.a *~
++
+diff -rwu mopd-2.5.3.patched/common/cmp.c mopd-2.5.4.orig/common/cmp.c
+--- mopd-2.5.3.patched/common/cmp.c 1995-09-29 13:32:23.000000000 +0100
++++ mopd-2.5.4.orig/common/cmp.c 2000-08-08 23:41:50.000000000 +0100
+@@ -1,3 +1,5 @@
++/* $NetBSD: cmp.c,v 1.2 1997/03/25 03:07:02 thorpej Exp $ */
++
+ /*
+ * Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
+ *
+@@ -27,15 +29,17 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#ifndef LINT
+-static char rcsid[] = "$Id$";
++#include <sys/cdefs.h>
++#ifndef lint
++static char rcsid[]="$NetBSD: cmp.c,v 1.2 1997/03/25 03:07:02 thorpej Exp $";
+ #endif
+
+ #include "os.h"
++#include "cmp.h"
+
+ int
+ mopCmpEAddr(addr1, addr2)
+- register u_char *addr1, *addr2;
++ u_char *addr1, *addr2;
+ {
+- return(bcmp((char *)addr1, (char *)addr2, 6));
++ return(memcmp((char *)addr1, (char *)addr2, 6));
+ }
+diff -rwu mopd-2.5.3.patched/common/cmp.h mopd-2.5.4.orig/common/cmp.h
+--- mopd-2.5.3.patched/common/cmp.h 1995-09-28 11:26:09.000000000 +0100
++++ mopd-2.5.4.orig/common/cmp.h 2000-08-08 22:48:05.000000000 +0100
+@@ -1,3 +1,5 @@
++/* $NetBSD: cmp.h,v 1.2 1997/03/25 03:07:04 thorpej Exp $ */
++
+ /*
+ * Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
+ *
+@@ -26,19 +28,15 @@
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+- * $Id$
++ * $NetBSD: cmp.h,v 1.2 1997/03/25 03:07:04 thorpej Exp $
+ *
+ */
+
+ #ifndef _CMP_H_
+ #define _CMP_H_
+
+-#ifdef NO__P
+-int mopCmpEAddr (/* u_char *,u_char * */);
+-#else
+ __BEGIN_DECLS
+ int mopCmpEAddr __P((u_char *,u_char *));
+ __END_DECLS
+-#endif
+
+ #endif _CMP_H_
+diff -rwu mopd-2.5.3.patched/common/device.c mopd-2.5.4.orig/common/device.c
+--- mopd-2.5.3.patched/common/device.c 2003-03-27 09:14:41.000000000 +0000
++++ mopd-2.5.4.orig/common/device.c 2000-08-08 23:42:20.000000000 +0100
+@@ -1,3 +1,5 @@
++/* $NetBSD: device.c,v 1.2 1997/03/25 03:07:06 thorpej Exp $ */
++
+ /*
+ * Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
+ *
+@@ -27,29 +29,20 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#ifndef LINT
+-static char rcsid[] = "$Id$";
++#include <sys/cdefs.h>
++#ifndef lint
++static char rcsid[]="$NetBSD: device.c,v 1.2 1997/03/25 03:07:06 thorpej Exp $";
+ #endif
+
+ #include "os.h"
+ #include "common.h"
++#include "device.h"
+ #include "mopdef.h"
+ #include "pf.h"
+
+ struct if_info *iflist; /* Interface List */
+
+-void mopReadDL();
+-void mopReadRC();
+-#ifdef NO__P
+-int mopOpenDL(/* struct if_info *, int */);
+-int mopOpenRC(/* struct if_info *, int */);
+-#else
+-int mopOpenDL(struct if_info *, int);
+-int mopOpenRC(struct if_info *, int);
+-#endif
+-int pfTrans();
+-int pfInit();
+-int pfWrite();
++void deviceOpen __P((char *, u_short, int));
+
+ #ifdef DEV_NEW_CONF
+ /*
+@@ -83,7 +76,6 @@
+ if (ioctl(fd, SIOCGIFCONF, (caddr_t)&ifc) < 0 ||
+ ifc.ifc_len < sizeof(struct ifreq)) {
+ syslog(LOG_ERR, "deviceEthAddr: SIOGIFCONF: %m");
+- (void) close(fd);
+ exit(1);
+ }
+ ifr = ifc.ifc_req;
+@@ -95,14 +87,12 @@
+ sdl->sdl_alen != 6)
+ continue;
+ if (!strncmp(ifr->ifr_name, ifname, sizeof(ifr->ifr_name))) {
+- bcopy((caddr_t)LLADDR(sdl), (caddr_t)eaddr, 6);
+- (void) close(fd);
++ memmove((caddr_t)eaddr, (caddr_t)LLADDR(sdl), 6);
+ return;
+ }
+ }
+
+ syslog(LOG_ERR, "deviceEthAddr: Never saw interface `%s'!", ifname);
+- (void) close(fd);
+ exit(1);
+ }
+ #endif /* DEV_NEW_CONF */
+@@ -146,14 +136,11 @@
+ p->iopen = tmp.iopen;
+ p->write = pfWrite;
+ p->read = tmp.read;
+- bzero((char *)p->eaddr,sizeof(p->eaddr));
++ memset((char *)p->eaddr, 0, sizeof(p->eaddr));
+ p->fd = tmp.fd;
+- p->trans = trans;
+
+ #ifdef DEV_NEW_CONF
+ deviceEthAddr(p->if_name,&p->eaddr[0]);
+-#elif defined(__linux__)
+- pfEthAddr(0, p->if_name,&p->eaddr[0]);
+ #else
+ p->eaddr[0]= tmp.eaddr[0];
+ p->eaddr[1]= tmp.eaddr[1];
+@@ -163,16 +150,6 @@
+ p->eaddr[5]= tmp.eaddr[5];
+ #endif /* DEV_NEW_CONF */
+
+- switch (proto) {
+- case MOP_K_PROTO_RC:
+- pfAddMulti(-1,p->if_name,&rc_mcst[0]);
+- break;
+- case MOP_K_PROTO_DL:
+- pfAddMulti(-1,p->if_name,&dl_mcst[0]);
+- break;
+- default:
+- break;
+- }
+ }
+ }
+
+@@ -230,26 +207,17 @@
+
+ switch (trans) {
+ case TRANS_ETHER:
++ deviceOpen(interface,MOP_K_PROTO_RC,TRANS_ETHER);
++ break;
+ case TRANS_8023:
+- case TRANS_FDDI_8021H:
+- case TRANS_FDDI_8022:
+- deviceOpen(interface, MOP_K_PROTO_RC, trans);
++ deviceOpen(interface,MOP_K_PROTO_RC,TRANS_8023);
+ break;
+ case TRANS_ETHER + TRANS_8023:
+ deviceOpen(interface, MOP_K_PROTO_RC, TRANS_ETHER);
+ deviceOpen(interface, MOP_K_PROTO_RC, TRANS_8023);
+ break;
+- case TRANS_FDDI_8021H + TRANS_FDDI_8022:
+- deviceOpen(interface, MOP_K_PROTO_RC, TRANS_FDDI_8021H);
+- deviceOpen(interface, MOP_K_PROTO_RC, TRANS_FDDI_8022);
+- break;
+ case TRANS_ETHER + TRANS_8023 + TRANS_AND:
+- deviceOpen(interface, MOP_K_PROTO_RC,
+- TRANS_ETHER + TRANS_8023);
+- break;
+- case TRANS_FDDI_8021H + TRANS_FDDI_8022 + TRANS_AND:
+- deviceOpen(interface, MOP_K_PROTO_RC,
+- TRANS_FDDI_8021H + TRANS_FDDI_8022);
++ deviceOpen(interface,MOP_K_PROTO_RC,TRANS_ETHER+TRANS_8023);
+ break;
+ }
+ #endif
+@@ -259,26 +227,17 @@
+
+ switch (trans) {
+ case TRANS_ETHER:
++ deviceOpen(interface,MOP_K_PROTO_DL,TRANS_ETHER);
++ break;
+ case TRANS_8023:
+- case TRANS_FDDI_8021H:
+- case TRANS_FDDI_8022:
+- deviceOpen(interface, MOP_K_PROTO_DL, trans);
++ deviceOpen(interface,MOP_K_PROTO_DL,TRANS_8023);
+ break;
+ case TRANS_ETHER + TRANS_8023:
+ deviceOpen(interface, MOP_K_PROTO_DL, TRANS_ETHER);
+ deviceOpen(interface, MOP_K_PROTO_DL, TRANS_8023);
+ break;
+- case TRANS_FDDI_8021H + TRANS_FDDI_8022:
+- deviceOpen(interface, MOP_K_PROTO_DL, TRANS_FDDI_8021H);
+- deviceOpen(interface, MOP_K_PROTO_DL, TRANS_FDDI_8022);
+- break;
+ case TRANS_ETHER + TRANS_8023 + TRANS_AND:
+- deviceOpen(interface, MOP_K_PROTO_DL,
+- TRANS_ETHER + TRANS_8023);
+- break;
+- case TRANS_FDDI_8021H + TRANS_FDDI_8022 + TRANS_AND:
+- deviceOpen(interface, MOP_K_PROTO_DL,
+- TRANS_FDDI_8021H + TRANS_FDDI_8022);
++ deviceOpen(interface,MOP_K_PROTO_DL,TRANS_ETHER+TRANS_8023);
+ break;
+ }
+ #endif
+@@ -344,7 +303,7 @@
+ ifc.ifc_len = sizeof ibuf;
+ ifc.ifc_buf = (caddr_t)ibuf;
+ if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 ||
+- ifc.ifc_len < (int)sizeof(struct ifreq)) {
++ ifc.ifc_len < sizeof(struct ifreq)) {
+ syslog(LOG_ERR, "deviceInitAll: old SIOCGIFCONF: %m");
+ exit(1);
+ }
+diff -rwu mopd-2.5.3.patched/common/device.h mopd-2.5.4.orig/common/device.h
+--- mopd-2.5.3.patched/common/device.h 1995-09-28 11:51:48.000000000 +0100
++++ mopd-2.5.4.orig/common/device.h 2000-08-08 22:48:05.000000000 +0100
+@@ -1,3 +1,5 @@
++/* $NetBSD: device.h,v 1.2 1997/03/25 03:07:07 thorpej Exp $ */
++
+ /*
+ * Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
+ *
+@@ -26,27 +28,26 @@
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+- * $Id$
++ * $NetBSD: device.h,v 1.2 1997/03/25 03:07:07 thorpej Exp $
+ *
+ */
+
+ #ifndef _DEVICE_H_
+ #define _DEVICE_H_
+
+-#ifdef NO__P
+-#ifdef DEV_NEW_CONF
+-void deviceEthAddr (/* char *,u_char * */);
+-#endif
+-void deviceInitOne (/* char * */);
+-void deviceInitAll (/* void */);
+-#else
+ __BEGIN_DECLS
+ #ifdef DEV_NEW_CONF
+ void deviceEthAddr __P((char *,u_char *));
+ #endif
+ void deviceInitOne __P((char *));
+ void deviceInitAll __P((void));
++
++/* from loop-bsd.c */
++void Loop __P((void));
++int mopOpenDL __P((struct if_info *, int));
++int mopOpenRC __P((struct if_info *, int));
++void mopReadDL __P((void));
++void mopReadRC __P((void));
+ __END_DECLS
+-#endif
+
+ #endif _DEVICE_H_
+Only in mopd-2.5.3.patched/common: device.o
+diff -rwu mopd-2.5.3.patched/common/dl.c mopd-2.5.4.orig/common/dl.c
+--- mopd-2.5.3.patched/common/dl.c 2003-03-27 09:14:41.000000000 +0000
++++ mopd-2.5.4.orig/common/dl.c 2000-08-09 19:36:41.000000000 +0100
+@@ -1,3 +1,5 @@
++/* $NetBSD: dl.c,v 1.3 1997/10/16 23:24:31 lukem Exp $ */
++
+ /*
+ * Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
+ *
+@@ -27,14 +29,16 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#ifndef LINT
+-static char rcsid[] = "$Id$";
++#include <sys/cdefs.h>
++#ifndef lint
++static char rcsid[]="$NetBSD: dl.c,v 1.3 1997/10/16 23:24:31 lukem Exp $";
+ #endif
+
+ #include "os.h"
++#include "dl.h"
+ #include "get.h"
+-#include "print.h"
+ #include "mopdef.h"
++#include "print.h"
+
+ void
+ mopDumpDL(fd, pkt, trans)
+@@ -43,33 +47,26 @@
+ int trans;
+ {
+ int i,index = 0;
+- u_int tmpl;
++ u_int32_t tmpl;
+ u_char tmpc,c,program[257],code,*ucp;
+- int len,tmps,moplen;
++ u_short len,tmps,moplen;
+
+ len = mopGetLength(pkt, trans);
+
+ switch (trans) {
+- case TRANS_ETHER:
+- index = 16;
+- moplen = len;
+- break;
+ case TRANS_8023:
+ index = 22;
+ moplen = len - 8;
+ break;
+- case TRANS_FDDI_8021H:
+- case TRANS_FDDI_8022:
+- index = 23;
+- moplen = len;
+- break;
+ default:
+- moplen = 0;
++ index = 16;
++ moplen = len;
+ }
+- if (moplen < 1) /* broken packet */
+- return;
+ code = mopGetChar(pkt,&index);
+
++ /* see above, if (len < 8) then moplen ends up around 65535 */
++ if (moplen > len) moplen = len;
++
+ switch (code) {
+ case MOP_K_CODE_MLT:
+
+diff -rwu mopd-2.5.3.patched/common/dl.h mopd-2.5.4.orig/common/dl.h
+--- mopd-2.5.3.patched/common/dl.h 1995-10-13 20:29:04.000000000 +0100
++++ mopd-2.5.4.orig/common/dl.h 2000-08-08 22:48:06.000000000 +0100
+@@ -1,3 +1,5 @@
++/* $NetBSD: dl.h,v 1.2 1997/03/25 03:07:10 thorpej Exp $ */
++
+ /*
+ * Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
+ *
+@@ -26,19 +28,15 @@
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+- * $Id$
++ * $NetBSD: dl.h,v 1.2 1997/03/25 03:07:10 thorpej Exp $
+ *
+ */
+
+ #ifndef _DL_H_
+ #define _DL_H_
+
+-#ifdef NO__P
+-void mopDumpDL (/* FILE *, u_char *, int */);
+-#else
+ __BEGIN_DECLS
+ void mopDumpDL __P((FILE *, u_char *, int));
+ __END_DECLS
+-#endif
+
+ #endif _DL_H_
+Only in mopd-2.5.3.patched/common: dl.o
+diff -rwu mopd-2.5.3.patched/common/get.c mopd-2.5.4.orig/common/get.c
+--- mopd-2.5.3.patched/common/get.c 2003-03-27 09:14:41.000000000 +0000
++++ mopd-2.5.4.orig/common/get.c 2000-08-08 23:43:28.000000000 +0100
+@@ -1,3 +1,5 @@
++/* $NetBSD: get.c,v 1.2 1997/03/25 03:07:15 thorpej Exp $ */
++
+ /*
+ * Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
+ *
+@@ -27,18 +29,19 @@
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+-#ifndef LINT
+-static char rcsid[] = "$Id$";
++#include <sys/cdefs.h>
++#ifndef lint
++static char rcsid[]="$NetBSD: get.c,v 1.2 1997/03/25 03:07:15 thorpej Exp $";
+ #endif
+
+-#include <sys/types.h>
+-#include <netinet/in.h>
++#include "os.h"
++#include "get.h"
+ #include "mopdef.h"
+
+ u_char
+ mopGetChar(pkt, index)
+- register u_char *pkt;
+- register int *index;
++ u_char *pkt;
++ int *index;
+ {
+ u_char ret;
+
+@@ -49,8 +52,8 @@
+
+ u_short
+ mopGetShort(pkt, index)
+- register u_char *pkt;
+- register int *index;
++ u_char *pkt;
++ int *index;
+ {
+ u_short ret;
+
+@@ -59,12 +62,12 @@
+ return(ret);
+ }
+
+-u_int
++u_int32_t
+ mopGetLong(pkt, index)
+- register u_char *pkt;
+- register int *index;
++ u_char *pkt;
++ int *index;
+ {
+- u_long ret;
++ u_int32_t ret;
+
+ ret = pkt[*index] +
+ pkt[*index+1]*0x100 +
+@@ -76,8 +79,8 @@
+
+ void
+ mopGetMulti(pkt, index, dest, size)
+- register u_char *pkt,*dest;
+- register int *index,size;
++ u_char *pkt,*dest;
++ int *index,size;
+ {
+ int i;
+
+@@ -95,31 +98,16 @@
+ {
+ u_short *ptype;
+
+- if ((trans & (TRANS_ETHER + TRANS_8023))) {
++ if (trans == 0) {
+ ptype = (u_short *)(pkt+12);
+ if (ntohs(*ptype) < 1600) {
+- trans &= TRANS_8023;
++ trans = TRANS_8023;
+ } else {
+- trans &= TRANS_ETHER;
++ trans = TRANS_ETHER;
+ }
+- return(trans);
+- }
+- if ((trans & (TRANS_FDDI_8021H + TRANS_FDDI_8022))) {
+- if (*pkt >= MOP_K_FDDI_FC_MIN && *pkt <= MOP_K_FDDI_FC_MAX) {
+- if (!bcmp((char *)(pkt+16), (char *)dl_802_proto, 3)) {
+- trans &= TRANS_FDDI_8022;
+- return(trans);
+ }
+- if (!bcmp((char *)(pkt+16),
+- (char *)dl_8021h_proto, 3)) {
+- trans &= TRANS_FDDI_8021H;
+ return(trans);
+ }
+- }
+- return(0);
+- }
+- return(0);
+-}
+
+ void
+ mopGetHeader(pkt, index, dst, src, proto, len, trans)
+@@ -127,35 +115,23 @@
+ int *index, *len, trans;
+ u_short *proto;
+ {
+- switch(trans) {
+- case TRANS_ETHER:
+ *dst = pkt;
+ *src = pkt + 6;
+ *index = *index + 12;
++
++ switch(trans) {
++ case TRANS_ETHER:
+ *proto = (u_short)(pkt[*index]*256 + pkt[*index+1]);
+ *index = *index + 2;
+ *len = (int)(pkt[*index+1]*256 + pkt[*index]);
+ *index = *index + 2;
+ break;
+ case TRANS_8023:
+- *dst = pkt;
+- *src = pkt + 6;
+- *index = *index + 12;
+ *len = (int)(pkt[*index]*256 + pkt[*index+1]);
+ *index = *index + 8;
+ *proto = (u_short)(pkt[*index]*256 + pkt[*index+1]);
+ *index = *index + 2;
+ break;
+- case TRANS_FDDI_8021H:
+- case TRANS_FDDI_8022:
+- *dst = pkt + 1;
+- *src = pkt + 7;
+- *index = *index + 19;
+- *proto = (u_short)(pkt[*index]*256 + pkt[*index+1]);
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list