summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1995-10-27 10:48:31 +0000
committerjulian <julian@FreeBSD.org>1995-10-27 10:48:31 +0000
commit2494489f353737a9a0a0dfb412b041a447f76aa2 (patch)
tree79f62b7e310d8aaa41586909ba37d7589857ad4e
parent097421f540c5e463d5555f21dda599c749369da8 (diff)
downloadFreeBSD-src-2494489f353737a9a0a0dfb412b041a447f76aa2.zip
FreeBSD-src-2494489f353737a9a0a0dfb412b041a447f76aa2.tar.gz
Submitted by: john hay
patches to merge the two IPX packages to work with each other and to not break make-world :) IPXrouted should be working now, (or at least compiling) :)
-rw-r--r--etc/Makefile4
-rw-r--r--sbin/ifconfig/Makefile2
-rw-r--r--usr.bin/netstat/Makefile2
-rw-r--r--usr.sbin/IPXrouted/defs.h5
-rw-r--r--usr.sbin/IPXrouted/main.c30
-rw-r--r--usr.sbin/IPXrouted/sap.h4
-rw-r--r--usr.sbin/IPXrouted/trace.h22
7 files changed, 39 insertions, 30 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 7dd3f6b..ad08733 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
-# $Id: Makefile,v 1.122 1995/10/22 21:26:52 ache Exp $
+# $Id: Makefile,v 1.123 1995/10/26 10:05:55 ache Exp $
# disktab may be wrong -- hcx9 is a tahoe, but gets its own.
# -rw-r--r--
@@ -444,7 +444,7 @@ distrib-dirs:
mtree -deU -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
mtree -deU -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
# Compatibility stuff, remove obsoleted links, if exists
- if [ -d ${DESTDIR}/usr/share/locale ] ; \
+ -if [ -d ${DESTDIR}/usr/share/locale ] ; \
then \
cd ${DESTDIR}/usr/share/locale; \
for l in ${LATIN1LINKS} ; do \
diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile
index 1b93328..658e2e8 100644
--- a/sbin/ifconfig/Makefile
+++ b/sbin/ifconfig/Makefile
@@ -2,7 +2,7 @@
PROG= ifconfig
MAN8= ifconfig.8
-LDADD= -lkvm
+LDADD= -lkvm -lipx
DPADD= ${LIBKVM}
.include <bsd.prog.mk>
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index 1c34e30..6746ace 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -7,7 +7,7 @@ CFLAGS+=-I/sys # -g
.PATH: ${.CURDIR}/../../sys/netiso
BINGRP= kmem
BINMODE=2555
-LDADD= -lkvm
+LDADD= -lkvm -lipx
DPADD= ${LIBKVM}
.include <bsd.prog.mk>
diff --git a/usr.sbin/IPXrouted/defs.h b/usr.sbin/IPXrouted/defs.h
index 810bd7c..a5fb1f0 100644
--- a/usr.sbin/IPXrouted/defs.h
+++ b/usr.sbin/IPXrouted/defs.h
@@ -34,7 +34,7 @@
*
* @(#)defs.h 8.1 (Berkeley) 6/5/93
*
- * $Id: defs.h,v 1.5 1995/10/11 18:57:12 jhay Exp $
+ * $Id: defs.h,v 1.1 1995/10/26 21:28:14 julian Exp $
*/
#include <sys/types.h>
@@ -42,7 +42,6 @@
#include <net/route.h>
#include <netipx/ipx.h>
-#include <netipx/ipxdp.h>
#if defined(vax) || defined(pdp11)
#define xnnet(x) ((u_long) (x)->rip_dst[1] << 16 | (u_long) (x)->rip_dst[0] )
#else
@@ -88,7 +87,7 @@ extern int r; /* Routing socket to install updates with */
extern int gateway;
extern struct sockaddr_ipx ipx_netmask; /* Used in installing routes */
-extern char packet[MAXPACKETSIZE+sizeof(struct ipxdp)+1];
+extern char packet[MAXPACKETSIZE+sizeof(struct ipx)+1];
extern struct rip *msg;
extern char **argv0;
diff --git a/usr.sbin/IPXrouted/main.c b/usr.sbin/IPXrouted/main.c
index 9a0a6ab..4797a6a 100644
--- a/usr.sbin/IPXrouted/main.c
+++ b/usr.sbin/IPXrouted/main.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: main.c,v 1.6 1995/10/11 18:57:21 jhay Exp $
+ * $Id: main.c,v 1.1 1995/10/26 21:28:19 julian Exp $
*/
#ifndef lint
@@ -79,16 +79,16 @@ int noteremoterequests; /* squawk on requests from non-local nets */
int r; /* Routing socket to install updates with */
struct sockaddr_ipx ipx_netmask; /* Used in installing routes */
-char packet[MAXPACKETSIZE+sizeof(struct ipxdp)+1];
+char packet[MAXPACKETSIZE+sizeof(struct ipx)+1];
char **argv0;
int supplier = -1; /* process should supply updates */
int dosap = 1; /* By default do SAP services. */
-struct rip *msg = (struct rip *) &packet[sizeof (struct ipxdp)];
+struct rip *msg = (struct rip *) &packet[sizeof (struct ipx)];
struct sap_packet *sap_msg =
- (struct sap_packet *) &packet[sizeof (struct ipxdp)];
+ (struct sap_packet *) &packet[sizeof (struct ipx)];
void hup(), fkexit(), timer();
void process(int fd, int pkt_type);
int getsocket(int type, int proto, struct sockaddr_ipx *sipx);
@@ -248,7 +248,7 @@ process(fd, pkt_type)
{
struct sockaddr from;
int fromlen = sizeof (from), cc, omask;
- struct ipxdp *ipxdp = (struct ipxdp *)packet;
+ struct ipx *ipxdp = (struct ipx *)packet;
cc = recvfrom(fd, packet, sizeof (packet), 0, &from, &fromlen);
if (cc <= 0) {
@@ -258,22 +258,22 @@ process(fd, pkt_type)
}
if (tracepackets > 1 && ftrace) {
fprintf(ftrace,"rcv %d bytes on %s ",
- cc, ipxdp_ntoa(&ipxdp->ipxdp_dna));
- fprintf(ftrace," from %s\n", ipxdp_ntoa(&ipxdp->ipxdp_sna));
+ cc, ipxdp_ntoa(&ipxdp->ipx_dna));
+ fprintf(ftrace," from %s\n", ipxdp_ntoa(&ipxdp->ipx_sna));
}
if (noteremoterequests &&
- !ipx_neteqnn(ipxdp->ipxdp_sna.x_net, ipx_zeronet) &&
- !ipx_neteq(ipxdp->ipxdp_sna, ipxdp->ipxdp_dna))
+ !ipx_neteqnn(ipxdp->ipx_sna.x_net, ipx_zeronet) &&
+ !ipx_neteq(ipxdp->ipx_sna, ipxdp->ipx_dna))
{
syslog(LOG_ERR,
"net of interface (%s) != net on ether (%s)!\n",
- ipxdp_nettoa(ipxdp->ipxdp_dna.x_net),
- ipxdp_nettoa(ipxdp->ipxdp_sna.x_net));
+ ipxdp_nettoa(ipxdp->ipx_dna.x_net),
+ ipxdp_nettoa(ipxdp->ipx_sna.x_net));
}
/* We get the IPX header in front of the RIF packet*/
- cc -= sizeof (struct ipxdp);
+ cc -= sizeof (struct ipx);
#define mask(s) (1<<((s)-1))
omask = sigblock(mask(SIGALRM));
switch(pkt_type) {
@@ -309,15 +309,15 @@ getsocket(type, proto, sipx)
if (retry == 0)
return (-1);
if (domain==AF_IPX) {
- struct ipxdp ipxdp;
+ struct ipx ipxdp;
if (setsockopt(s, 0, SO_HEADERS_ON_INPUT, &on, sizeof(on))) {
syslog(LOG_ERR, "setsockopt SEE HEADERS: %m");
exit(1);
}
if (ntohs(sipx->sipx_addr.x_port) == IPXPORT_RIP)
- ipxdp.ipxdp_pt = IPXPROTO_RI;
+ ipxdp.ipx_pt = IPXPROTO_RI;
else if (ntohs(sipx->sipx_addr.x_port) == IPXPORT_SAP)
- ipxdp.ipxdp_pt = IPXPROTO_SAP;
+ ipxdp.ipx_pt = IPXPROTO_SAP;
else {
syslog(LOG_ERR, "port should be either RIP or SAP");
exit(1);
diff --git a/usr.sbin/IPXrouted/sap.h b/usr.sbin/IPXrouted/sap.h
index 9b7cb53..221220f 100644
--- a/usr.sbin/IPXrouted/sap.h
+++ b/usr.sbin/IPXrouted/sap.h
@@ -28,11 +28,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sap.h,v 1.5 1995/10/11 18:57:26 jhay Exp $
+ * $Id: sap.h,v 1.1 1995/10/26 21:28:22 julian Exp $
*/
#ifndef _SAP_H_
#define _SAP_H_
+#define IPXPROTO_SAP IPXPROTO_PXP
+
#define SAP_REQ 1
#define SAP_RESP 2
#define SAP_REQ_NEAR 3
diff --git a/usr.sbin/IPXrouted/trace.h b/usr.sbin/IPXrouted/trace.h
index 41d21ae..6a88079 100644
--- a/usr.sbin/IPXrouted/trace.h
+++ b/usr.sbin/IPXrouted/trace.h
@@ -37,7 +37,7 @@
*
* @(#)trace.h 8.1 (Berkeley) 6/5/93
*
- * $Id: trace.h,v 1.4 1995/10/11 18:57:34 jhay Exp $
+ * $Id: trace.h,v 1.1 1995/10/26 21:28:30 julian Exp $
*/
/*
@@ -83,30 +83,38 @@ FILE *ftrace; /* output trace file */
if (tracing) { \
ifp = if_iflookup(src); \
if (ifp) \
- trace(&ifp->int_input, src, &packet[sizeof(struct ipxdp)], size, \
+ trace(&ifp->int_input, src, \
+ &packet[sizeof(struct ipx)], size, \
ntohl(ifp->int_metric)); \
} \
if (tracepackets && ftrace) \
- dumppacket(ftrace, "from", src, &packet[sizeof(struct ipxdp)], size); \
+ dumppacket(ftrace, "from", src, \
+ &packet[sizeof(struct ipx)], size); \
}
#define TRACE_OUTPUT(ifp, dst, size) { \
if (tracing) { \
ifp = if_iflookup(dst); \
if (ifp) \
- trace(&ifp->int_output, dst, &packet[sizeof(struct ipxdp)], size, ifp->int_metric); \
+ trace(&ifp->int_output, dst, \
+ &packet[sizeof(struct ipx)], \
+ size, ifp->int_metric); \
} \
if (tracepackets && ftrace) \
- dumppacket(ftrace, "to", dst, &packet[sizeof(struct ipxdp)], size); \
+ dumppacket(ftrace, "to", dst, \
+ &packet[sizeof(struct ipx)], size); \
}
#define TRACE_SAP_OUTPUT(ifp, dst, size) { \
if (tracing) { \
ifp = if_iflookup(dst); \
if (ifp) \
- trace(&ifp->int_output, dst, &packet[sizeof(struct ipxdp)], size, ifp->int_metric); \
+ trace(&ifp->int_output, dst, \
+ &packet[sizeof(struct ipx)], \
+ size, ifp->int_metric); \
} \
if (tracepackets && ftrace) \
- dumpsappacket(ftrace, "to", dst, &packet[sizeof(struct ipxdp)], size); \
+ dumpsappacket(ftrace, "to", dst, \
+ &packet[sizeof(struct ipx)], size); \
}
void traceinit(struct interface *);
OpenPOWER on IntegriCloud