From 4f3cb4d32666eb40026850ce304c8a00447f5728 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Tue, 5 Nov 2024 14:14:26 -0800 Subject: [PATCH] Removes ether.h and merges Lisp interface structs into lsptypes.h --- CMakeLists.txt | 1 - bin/makefile-dos | 2 +- bin/makefile-tail | 8 +-- inc/ether.h | 120 --------------------------------------------- inc/lsptypes.h | 107 ++++++++++++++++++++++++++++++++++++++++ src/ether_nethub.c | 1 - src/ether_sunos.c | 1 - src/inet.c | 1 - 8 files changed, 112 insertions(+), 129 deletions(-) delete mode 100644 inc/ether.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 3247af2..22bcb2c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -316,7 +316,6 @@ SET(MAIKO_HDRS inc/emlglob.h inc/eqfdefs.h inc/etherdefs.h - inc/ether.h inc/fast_dsp.h inc/findkeydefs.h inc/foreigndefs.h diff --git a/bin/makefile-dos b/bin/makefile-dos index 85d28b0..f74f954 100644 --- a/bin/makefile-dos +++ b/bin/makefile-dos @@ -18,7 +18,7 @@ SRCFILES = conspage.c gcoflow.c shift.c dbgtool.c gcr.c gcrcell.c llstk. OFILES = conspage.obj gcoflow.obj shift.obj dbgtool.obj gcr.obj gcrcell.obj llstk.obj gcscan.obj loopsops.obj storage.obj allocmds.obj dir.obj gvar2.obj lowlev1.obj subr.obj arithops.obj lowlev2.obj subr0374.obj doscomm.obj hardrtn.obj lsthandl.obj sxhash.obj draw.obj main.obj testtool.obj array.obj dsk.obj inet.obj misc7.obj timer.obj array2.obj dspif.obj initdsp.obj miscn.obj typeof.obj array3.obj initkbd.obj ubf1.obj array4.obj dspsubrs.obj initsout.obj mkatom.obj ubf2.obj array5.obj eqf.obj intcall.obj mkcell.obj ubf3.obj array6.obj ether.obj ufn.obj atom.obj findkey.obj kbdsubrs.obj mouseif.obj ufs.obj bbtsub.obj foreign.obj keyevent.obj unixcomm.obj bin.obj fp.obj binds.obj fvar.obj mvs.obj unwind.obj bitblt.obj gc.obj uraid.obj blt.obj gc2.obj kprint.obj osmsg.obj usrsubr.obj byteswap.obj gcarray.obj perrno.obj uutils.obj carcdr.obj asmbbt.obj gccode.obj vars3.obj gcfinal.obj ldsout.obj return.obj vmemsave.obj chardev.obj gchtfind.obj lineblt8.obj rpc.obj xc.obj common.obj gcmain3.obj lisp2c.obj rplcons.obj z2.obj vdate.obj $(COLORFILES) $(ARCHFILES) $(LPFILES) -HFILES = address.h adr68k.h arithopsdefs.h arith.h cell.h dbprint.h display.h dspif.h ifpage.h iopage.h lispemul.h lispmap.h lsptypes.h miscstat.h lspglob.h array.h bb.h bitblt.h debug.h devconf.h dspdata.h ether.h fast_dsp.h gcdata.h initatms.h inlinec.h keyboard.h lispver1.h lispver2.h lldsp.h locfile.h medleyfp.h mouseif.h my.h opcodes.h osmsg.h pilotbbt.h print.h return.h stack.h stream.h subrs.h timeout.h tos1defs.h tosfns.h tosret.h xdefs.h xbitmaps.h xkeymap.h +HFILES = address.h adr68k.h arithopsdefs.h arith.h cell.h dbprint.h display.h dspif.h ifpage.h iopage.h lispemul.h lispmap.h lsptypes.h miscstat.h lspglob.h array.h bb.h bitblt.h debug.h devconf.h dspdata.h fast_dsp.h gcdata.h initatms.h inlinec.h keyboard.h lispver1.h lispver2.h lldsp.h locfile.h medleyfp.h mouseif.h my.h opcodes.h osmsg.h pilotbbt.h print.h return.h stack.h stream.h subrs.h timeout.h tos1defs.h tosfns.h tosret.h xdefs.h xbitmaps.h xkeymap.h diff --git a/bin/makefile-tail b/bin/makefile-tail index 5a5d173..e0f5fc7 100644 --- a/bin/makefile-tail +++ b/bin/makefile-tail @@ -478,21 +478,21 @@ $(OBJECTDIR)ether_common.o: $(SRCDIR)ether_common.c $(REQUIRED-INCS) \ $(INCDIR)commondefs.h $(INCDIR)lispemul.h \ $(INCDIR)lispmap.h $(INCDIR)emlglob.h $(INCDIR)lsptypes.h $(INCDIR)lspglob.h \ $(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)adr68k.h \ - $(INCDIR)ether.h $(INCDIR)dbprint.h $(INCDIR)etherdefs.h + $(INCDIR)dbprint.h $(INCDIR)etherdefs.h $(CC) $(RFLAGS) $(SRCDIR)ether_common.c -o $(OBJECTDIR)ether_common.o $(OBJECTDIR)ether_sunos.o: $(SRCDIR)ether_sunos.c $(REQUIRED-INCS) \ $(INCDIR)commondefs.h $(INCDIR)lispemul.h \ $(INCDIR)lispmap.h $(INCDIR)emlglob.h $(INCDIR)lsptypes.h $(INCDIR)lspglob.h \ $(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)adr68k.h \ - $(INCDIR)ether.h $(INCDIR)dbprint.h $(INCDIR)etherdefs.h + $(INCDIR)dbprint.h $(INCDIR)etherdefs.h $(CC) $(RFLAGS) $(SRCDIR)ether_sunos.c -o $(OBJECTDIR)ether_sunos.o $(OBJECTDIR)ether_nethub.o: $(SRCDIR)ether_nethub.c $(REQUIRED-INCS) \ $(INCDIR)commondefs.h $(INCDIR)lispemul.h \ $(INCDIR)lispmap.h $(INCDIR)emlglob.h $(INCDIR)lsptypes.h $(INCDIR)lspglob.h \ $(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)adr68k.h \ - $(INCDIR)ether.h $(INCDIR)dbprint.h $(INCDIR)etherdefs.h + $(INCDIR)dbprint.h $(INCDIR)etherdefs.h $(CC) $(RFLAGS) $(SRCDIR)ether_nethub.c -o $(OBJECTDIR)ether_nethub.o $(OBJECTDIR)findkey.o: $(SRCDIR)findkey.c $(REQUIRED-INCS) \ @@ -640,7 +640,7 @@ $(OBJECTDIR)inet.o: $(SRCDIR)inet.c $(REQUIRED-INCS) \ $(INCDIR)lispemul.h $(INCDIR)lispmap.h \ $(INCDIR)lsptypes.h $(INCDIR)arith.h $(INCDIR)emlglob.h $(INCDIR)lspglob.h \ $(INCDIR)ifpage.h $(INCDIR)iopage.h $(INCDIR)miscstat.h $(INCDIR)adr68k.h \ - $(INCDIR)ether.h $(INCDIR)dbprint.h $(INCDIR)locfile.h $(INCDIR)lispver2.h \ + $(INCDIR)dbprint.h $(INCDIR)locfile.h $(INCDIR)lispver2.h \ $(INCDIR)inetdefs.h $(INCDIR)byteswapdefs.h $(INCDIR)commondefs.h \ $(INCDIR)mkcelldefs.h $(CC) $(RFLAGS) $(SRCDIR)inet.c -o $(OBJECTDIR)inet.o diff --git a/inc/ether.h b/inc/ether.h deleted file mode 100644 index 4e651df..0000000 --- a/inc/ether.h +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef ETHER_H -#define ETHER_H 1 -/* $Id: ether.h,v 1.2 1999/01/03 02:05:59 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */ - -/************************************************************************/ -/* */ -/* (C) Copyright 1989-92 Venue. All Rights Reserved. */ -/* Manufactured in the United States of America. */ -/* */ -/************************************************************************/ -#include "lispemul.h" /* for LispPTR, DLword */ - -#ifndef BYTESWAP - -typedef struct { - DLword DLLOCALHOST0; - DLword DLLOCALHOST1; - DLword DLLOCALHOST2; - DLword DLFIRSTICB; - DLword DLINPUTMASK; - DLword DLFIRSTOCB; - DLword DLOUTPUTMASK; - DLword DLMISSEDPACKETS; - DLword DLLASTICB; - DLword DLLASTOCB; -} DLETHERCSB; - -typedef struct{ - DLword DLIOCBLENGTH; - DLword DLIOCBBUFFERLO; - DLword DLIOCBBUFFERHI; - DLword DLRETRANSMISSIONMASK; - DLword DLIOCBBYTESUSED; - DLword DLIOCBSTATUS; - DLword DLNEXTIOCB; - DLword DLFOROUTPUTUSE; -} DLETHERIOCB; - -typedef struct { - unsigned int NETTYPE : 8; - unsigned int NDBNEXT : 24; - unsigned int NDBPUPNET : 8; - unsigned int NDBNSNET : 24; - unsigned int NDBTASK : 8; - unsigned int NDBBROADCASTP : 24; - unsigned int NDBPUPHOST : 8; - unsigned int NDBTRANSMITTER : 24; - unsigned int nil1: 8; - unsigned int NDBENCAPSULATOR : 24; - unsigned int NDBIQLENGTH : 8; /* DATATYPE */ - unsigned int NDBCSB : 24; /* DATATYPE */ - LispPTR NDBIQ; - LispPTR NDBTQ; - LispPTR NDBTRANSLATIONS; - LispPTR NDBETHERFLUSHER; - LispPTR NDBWATCHER; - LispPTR NDBCANHEARSELF; - LispPTR NDBIPNET; - LispPTR NDBIPHOST; - DLword NDBPUPTYPE; - DLword nil2; - LispPTR nil3; -} NDB; -#else - /***********************************************/ - /* Byte-swapped definitions, for e.g., 80386's */ - /***********************************************/ -typedef struct { - DLword DLLOCALHOST1; - DLword DLLOCALHOST0; - DLword DLFIRSTICB; - DLword DLLOCALHOST2; - DLword DLFIRSTOCB; - DLword DLINPUTMASK; - DLword DLMISSEDPACKETS; - DLword DLOUTPUTMASK; - DLword DLLASTOCB; - DLword DLLASTICB; -} DLETHERCSB; - -typedef struct{ - DLword DLIOCBBUFFERLO; - DLword DLIOCBLENGTH; - DLword DLRETRANSMISSIONMASK; - DLword DLIOCBBUFFERHI; - DLword DLIOCBSTATUS; - DLword DLIOCBBYTESUSED; - DLword DLFOROUTPUTUSE; - DLword DLNEXTIOCB; -} DLETHERIOCB; - -typedef struct { - unsigned int NDBNEXT : 24; - unsigned int NETTYPE : 8; - unsigned int NDBNSNET : 24; - unsigned int NDBPUPNET : 8; - unsigned int NDBBROADCASTP : 24; - unsigned int NDBTASK : 8; - unsigned int NDBTRANSMITTER : 24; - unsigned int NDBPUPHOST : 8; - unsigned int NDBENCAPSULATOR : 24; - unsigned int nil1: 8; - unsigned int NDBCSB : 24; /* DATATYPE */ - unsigned int NDBIQLENGTH : 8; /* DATATYPE */ - LispPTR NDBIQ; - LispPTR NDBTQ; - LispPTR NDBTRANSLATIONS; - LispPTR NDBETHERFLUSHER; - LispPTR NDBWATCHER; - LispPTR NDBCANHEARSELF; - LispPTR NDBIPNET; - LispPTR NDBIPHOST; - DLword nil2; - DLword NDBPUPTYPE; - LispPTR nil3; -} NDB; - -#endif /* BYTESWAP */ - -#endif /* ETHER_H */ diff --git a/inc/lsptypes.h b/inc/lsptypes.h index ff07eaa..cdc934d 100644 --- a/inc/lsptypes.h +++ b/inc/lsptypes.h @@ -699,4 +699,111 @@ typedef /* low-order 12 bits first. */ } BIGNUM; + +/* Ethernet records */ + +#ifndef BYTESWAP +typedef struct { + DLword DLLOCALHOST0; + DLword DLLOCALHOST1; + DLword DLLOCALHOST2; + DLword DLFIRSTICB; + DLword DLINPUTMASK; + DLword DLFIRSTOCB; + DLword DLOUTPUTMASK; + DLword DLMISSEDPACKETS; + DLword DLLASTICB; + DLword DLLASTOCB; +} DLETHERCSB; + +typedef struct{ + DLword DLIOCBLENGTH; + DLword DLIOCBBUFFERLO; + DLword DLIOCBBUFFERHI; + DLword DLRETRANSMISSIONMASK; + DLword DLIOCBBYTESUSED; + DLword DLIOCBSTATUS; + DLword DLNEXTIOCB; + DLword DLFOROUTPUTUSE; +} DLETHERIOCB; + +typedef struct { + unsigned int NETTYPE : 8; + unsigned int NDBNEXT : 24; + unsigned int NDBPUPNET : 8; + unsigned int NDBNSNET : 24; + unsigned int NDBTASK : 8; + unsigned int NDBBROADCASTP : 24; + unsigned int NDBPUPHOST : 8; + unsigned int NDBTRANSMITTER : 24; + unsigned int nil1: 8; + unsigned int NDBENCAPSULATOR : 24; + unsigned int NDBIQLENGTH : 8; /* DATATYPE */ + unsigned int NDBCSB : 24; /* DATATYPE */ + LispPTR NDBIQ; + LispPTR NDBTQ; + LispPTR NDBTRANSLATIONS; + LispPTR NDBETHERFLUSHER; + LispPTR NDBWATCHER; + LispPTR NDBCANHEARSELF; + LispPTR NDBIPNET; + LispPTR NDBIPHOST; + DLword NDBPUPTYPE; + DLword nil2; + LispPTR nil3; +} NDB; +#else + /***********************************************/ + /* Byte-swapped definitions, for e.g., 80386's */ + /***********************************************/ +typedef struct { + DLword DLLOCALHOST1; + DLword DLLOCALHOST0; + DLword DLFIRSTICB; + DLword DLLOCALHOST2; + DLword DLFIRSTOCB; + DLword DLINPUTMASK; + DLword DLMISSEDPACKETS; + DLword DLOUTPUTMASK; + DLword DLLASTOCB; + DLword DLLASTICB; +} DLETHERCSB; + +typedef struct{ + DLword DLIOCBBUFFERLO; + DLword DLIOCBLENGTH; + DLword DLRETRANSMISSIONMASK; + DLword DLIOCBBUFFERHI; + DLword DLIOCBSTATUS; + DLword DLIOCBBYTESUSED; + DLword DLFOROUTPUTUSE; + DLword DLNEXTIOCB; +} DLETHERIOCB; + +typedef struct { + unsigned int NDBNEXT : 24; + unsigned int NETTYPE : 8; + unsigned int NDBNSNET : 24; + unsigned int NDBPUPNET : 8; + unsigned int NDBBROADCASTP : 24; + unsigned int NDBTASK : 8; + unsigned int NDBTRANSMITTER : 24; + unsigned int NDBPUPHOST : 8; + unsigned int NDBENCAPSULATOR : 24; + unsigned int nil1: 8; + unsigned int NDBCSB : 24; /* DATATYPE */ + unsigned int NDBIQLENGTH : 8; /* DATATYPE */ + LispPTR NDBIQ; + LispPTR NDBTQ; + LispPTR NDBTRANSLATIONS; + LispPTR NDBETHERFLUSHER; + LispPTR NDBWATCHER; + LispPTR NDBCANHEARSELF; + LispPTR NDBIPNET; + LispPTR NDBIPHOST; + DLword nil2; + DLword NDBPUPTYPE; + LispPTR nil3; +} NDB; +#endif /* BYTESWAP */ #endif /* LSPTYPES_H */ diff --git a/src/ether_nethub.c b/src/ether_nethub.c index e93e19c..df27eec 100644 --- a/src/ether_nethub.c +++ b/src/ether_nethub.c @@ -31,7 +31,6 @@ #include "lsptypes.h" #include "lspglob.h" #include "adr68k.h" -#include "ether.h" #include "dbprint.h" #include "etherdefs.h" #include "ifpage.h" diff --git a/src/ether_sunos.c b/src/ether_sunos.c index d64f0aa..deb4afe 100644 --- a/src/ether_sunos.c +++ b/src/ether_sunos.c @@ -71,7 +71,6 @@ #include "lsptypes.h" #include "lspglob.h" #include "adr68k.h" -#include "ether.h" #include "dbprint.h" #include "etherdefs.h" #include "ifpage.h" diff --git a/src/inet.c b/src/inet.c index 1526a57..141e75d 100644 --- a/src/inet.c +++ b/src/inet.c @@ -41,7 +41,6 @@ #include "emlglob.h" #include "lspglob.h" #include "adr68k.h" -#include "ether.h" #include "dbprint.h" #include "locfile.h"