Patch #: 13 Type: update Priority: none Submitted: David Hornsby Submitted: Dave Platt Submitted: Rob Newberry Submitted: Bill Hart Submitted: Ernie Elu Modification: add support for BSDI 1.1, FreeBSD 2.0, Linux (kernel > 1.1.70) Archived: munnari.OZ.AU mac/cap.patches/arns.patch013 Application: 'cd arns; patch -p < arns.patch013' *** arns.c.orig Thu May 19 20:13:27 1994 --- arns.c Sat Dec 17 17:06:05 1994 *************** *** 15,21 **** * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.9 $ * */ --- 15,21 ---- * djh@munnari.OZ.AU * * $Author: djh $ ! * $Revision: 1.10 $ * */ *************** *** 80,90 **** struct servent *s, *getservbyname(); void buildIPFilterList(), process(), usage(); void readeth(), readaarp(), readdev(), readip(); - #ifdef SYSTYPE_SYSV void readIPFilter(); - #else /* SYSTYPE_SYSV */ - int readIPFilter(); - #endif /* SYSTYPE_SYSV */ opterr = 0; progname = *argv; --- 80,86 ---- *************** *** 206,212 **** * get interface hardware address * */ ! eth_addr(etfd, eaddr); /* * Phase 2 setup --- 202,208 ---- * get interface hardware address * */ ! eth_addr(etfd, interface, eaddr); /* * Phase 2 setup *************** *** 266,279 **** */ nfds = 16; FD_ZERO(&fdset); - to.tv_sec = 0; - to.tv_usec = 200000; /* 200 ms */ for ( ; ; ) { FD_SET(ipfd, &fdset); FD_SET(etfd, &fdset); if (multiopen) FD_SET(aarpfd, &fdset); if ((res = select(nfds,&fdset,(fd_set *)0,(fd_set *)0,&to)) >= 0) { gettimeofday(&tn, NULL); if (FD_ISSET(ipfd, &fdset)) --- 262,275 ---- */ nfds = 16; FD_ZERO(&fdset); for ( ; ; ) { FD_SET(ipfd, &fdset); FD_SET(etfd, &fdset); if (multiopen) FD_SET(aarpfd, &fdset); + to.tv_sec = 0; + to.tv_usec = 200000; /* 200 ms */ if ((res = select(nfds,&fdset,(fd_set *)0,(fd_set *)0,&to)) >= 0) { gettimeofday(&tn, NULL); if (FD_ISSET(ipfd, &fdset)) *************** *** 888,894 **** addr = from->sin_addr.s_addr; ! if ((h = gethostbyaddr(&from->sin_addr, 4, AF_INET)) != NULL) { strncpy(name, h->h_name, sizeof(name)); return(name); } --- 884,890 ---- addr = from->sin_addr.s_addr; ! if ((h = gethostbyaddr((char *)&from->sin_addr, 4, AF_INET)) != NULL) { strncpy(name, h->h_name, sizeof(name)); return(name); } *************** *** 987,1001 **** * */ - #ifdef SYSTYPE_SYSV - /*ARGSUSED*/ void readIPFilter(num) int num; - #else /* SYSTYPE_SYSV */ - int - readIPFilter() - #endif /* SYSTYPE_SYSV */ { needIPFilter = 1; } --- 983,991 ---- *** pf.c.orig Tue Oct 18 10:58:27 1994 --- pf.c Sat Dec 17 17:20:14 1994 *************** *** 23,31 **** * Hewlett Packard HP-UX Link Level Access (LLAPF) * Berkeley Packet Filter (BPFILT) * AIX Ethernet Device (AIXETH) * * $Author: djh $ ! * $Revision: 1.16 $ * */ --- 23,32 ---- * Hewlett Packard HP-UX Link Level Access (LLAPF) * Berkeley Packet Filter (BPFILT) * AIX Ethernet Device (AIXETH) + * Linux SOCK_PACKET * * $Author: djh $ ! * $Revision: 1.18 $ * */ *************** *** 67,72 **** --- 68,84 ---- #define BPFILT #endif __386BSD__ + #ifdef FreeBSD + #define BPFILT + #endif FreeBSD + + #ifdef bsdi + #define BPFILT + #endif bsdi + + #ifdef linux + #endif linux + /* * include header files * *************** *** 104,110 **** --- 116,124 ---- #ifdef BPFILT #include #include + #if (!(defined(bsdi) || defined(FreeBSD) || defined(__386BSD__))) #include + #endif /* bsdi || FreeBSD || __386BSD__ */ #endif BPFILT #ifdef UPFILT *************** *** 153,158 **** --- 167,182 ---- #include #endif SOLARIS + #ifdef bsdi + #include + #include + #endif bsdi + + #ifdef linux + #include + #include + #endif linux + #include #include *************** *** 190,198 **** #ifdef BPFILT #define USE_WRITEV #define USE_GIFADDR - #ifndef __386BSD__ /* no multicast support, yet */ #define USE_SADDMULTI - #endif __386BSD__ #endif BPFILT #ifdef UPFILT --- 214,220 ---- *************** *** 219,224 **** --- 241,261 ---- #ifdef AIXETH #endif AIXETH + #ifdef __386BSD__ + #undef USE_SADDMULTI + #endif __386BSD__ + + #ifdef FreeBSD + #endif FreeBSD + + #ifdef bsdi + #undef USE_GIFADDR + #endif bsdi + + #ifdef linux + #define USE_SADDMULTI + #endif linux + /* * definitions * *************** *** 250,255 **** --- 287,298 ---- u_int pf_bufsize = READBUFSIZ; #endif BPFILT + #ifdef linux + struct socklist { + struct sockaddr sa; + } socklist[32 /* ZZ */]; + #endif linux + struct ifreq ifr; extern int errno; extern int promisc; *************** *** 421,426 **** --- 464,487 ---- } #endif AIXETH + + #ifdef linux + { u_short prot; + + prot = ((typ == 2) ? htons(ETH_P_ALL) : htons(protocol)); + if ((s = socket(AF_INET, SOCK_PACKET, prot)) < 0) { + perror(interface); + return(-1); + } + /* ZZ */ + if (s >= 32) { + fprintf(stderr, "OOPS: socket() returned %d\n", s); + return(-1); + } + /* ZZ */ + } + #endif linux + /* * set filter for protocol and type (IPTalk, Phase 1/2) * *************** *** 606,611 **** --- 667,678 ---- #ifdef AIXETH #endif AIXETH + + #ifdef linux + /* record socket interface name */ + strncpy(socklist[s].sa.sa_data, interface, sizeof(socklist[s].sa.sa_data)); + #endif linux + return(s); } *************** *** 898,903 **** --- 965,974 ---- } #endif AIXETH + + #ifdef linux + #endif linux + return(0); } *************** *** 907,941 **** */ int ! eth_addr(s, addr) int s; u_char *addr; { #ifdef USE_GIFADDR ! struct sockaddr *sa; ! if (ioctl(s, SIOCGIFADDR, &ifr) < 0) { ! perror("SIOCGIFADDR"); ! return(-1); } - #if (defined(sgi) || defined(__386BSD__)) - sa = (struct sockaddr *)&ifr.ifr_data; - #else sgi - sa = (struct sockaddr *)ifr.ifr_data; - #endif sgi - bcopy((char *)sa->sa_data, (char *)addr, 6); #endif USE_GIFADDR #ifdef USE_ENET ! struct endevp endev; ! if (ioctl(s, EIOCDEVP, &endev) < 0) { ! perror("EIOCDEVP"); ! return(-1); } - bcopy(endev.end_addr, addr, 6); #endif USE_ENET --- 978,1021 ---- */ int ! eth_addr(s, interface, addr) int s; + char *interface; u_char *addr; { + #ifdef bsdi + return(get_eth_addr(s, interface, addr)); + #endif bsdi + + #ifdef USE_GIFADDR ! { struct sockaddr *sa; ! strcpy(ifr.ifr_name, interface); ! if (ioctl(s, SIOCGIFADDR, &ifr) < 0) { ! perror("SIOCGIFADDR"); ! return(-1); ! } ! #if (defined(sgi) || defined(__386BSD__) || defined(FreeBSD)) ! sa = (struct sockaddr *)&ifr.ifr_data; ! #else /* sgi || __386BSD__ || FreeBSD */ ! sa = (struct sockaddr *)ifr.ifr_data; ! #endif /* sgi || __386BSD__ || FreeBSD */ ! bcopy((char *)sa->sa_data, (char *)addr, 6); } #endif USE_GIFADDR #ifdef USE_ENET ! { struct endevp endev; ! if (ioctl(s, EIOCDEVP, &endev) < 0) { ! perror("EIOCDEVP"); ! return(-1); ! } ! bcopy(endev.end_addr, addr, 6); } #endif USE_ENET *************** *** 993,998 **** --- 1073,1092 ---- } #endif DLPIPF + + #ifdef linux + strcpy(ifr.ifr_name, interface); + if (ioctl(s, SIOCGIFHWADDR, &ifr) < 0) { + perror("SIOCGIFHWADDR"); + return(-1); + } + #ifdef OLD_SIOCGIFHWADDR + memcpy((char *)addr, ifr.ifr_hwaddr.sa_data, 6); + #else OLD_SIOCGIFHWADDR + memcpy((char *)addr, ifr.ifr_hwaddr, 6); + #endif OLD_SIOCGIFHWADDR + #endif linux + return(0); } *************** *** 1265,1270 **** --- 1359,1370 ---- return(0); #endif sgi + + #ifdef linux + if (phase == 2) + return(0); + #endif linux + return(1); } *************** *** 1374,1380 **** return(cc+off); #endif hpux ! #if (!(defined(BPFILT) || defined(sgi) || defined(hpux))) RDS[0].dataLen = 0; if ((cc = read(fd, (char *)buf, len)) <= 0) --- 1474,1516 ---- return(cc+off); #endif hpux ! ! #ifdef linux ! int fromlen; ! struct sockaddr sa; ! /* ! * this is slightly less than optimal due to Linux SOCK_PACKET limitations ! * ! */ ! RDS[0].dataLen = 0; ! fromlen = sizeof(struct sockaddr); ! ! #ifdef USE_MSG_PEEK ! if ((cc = recvfrom(fd, (char *)buf, 22, MSG_PEEK, &sa, &fromlen)) <= 0) ! return(cc); ! #else USE_MSG_PEEK ! if ((cc = recvfrom(fd, (char *)buf, len, 0, &sa, &fromlen)) <= 0) ! return(cc); ! #endif USE_MSG_PEEK ! ! /* check if right interface */ ! if (strcmp(sa.sa_data, socklist[fd].sa.sa_data)) ! return(0); ! ! #ifdef USE_MSG_PEEK ! if ((cc = recvfrom(fd, (char *)buf, len, 0, NULL, NULL)) <= 0) ! return(cc); ! #endif USE_MSG_PEEK ! ! RDS[0].dataLen = cc; ! RDS[0].dataPtr = buf; ! RDS[1].dataLen = 0; ! ! return(cc); ! #endif linux ! ! ! #if (!(defined(BPFILT) || defined(sgi) || defined(hpux) || defined(linux))) RDS[0].dataLen = 0; if ((cc = read(fd, (char *)buf, len)) <= 0) *************** *** 1419,1424 **** --- 1555,1567 ---- #ifdef USE_WRITEV struct iovec iov[2]; + #ifdef FreeBSD_SWAP_BUG + u_char swap; + + swap = buf[12]; + buf[12] = buf[13]; + buf[13] = swap; + #endif FreeBSD_SWAP_BUG iov[0].iov_base = (caddr_t)buf; iov[0].iov_len = 14; *************** *** 1461,1469 **** --- 1604,1619 ---- return(len); #endif AIXETH + + #ifdef linux + if (sendto(fd, buf, len, 0, &socklist[fd].sa, sizeof(struct sockaddr)) == len) + return(len); + #endif linux + return(-1); } + #ifdef sgi /* * NB: in non-promiscuous mode using DRAIN, we can't see typ==0 (IPTalk) *************** *** 1697,1699 **** --- 1847,1950 ---- return(0); } #endif DLPIPF + + #ifdef bsdi + struct nlist nlst[] = { + { "_ifnet" }, + "", + }; + + /* + * BSDI + * + * Get interface address from the kernel since the SIOCGIFADDR + * ioctl isn't implemented in a number of ethernet drivers. + * + */ + + int + get_eth_addr(s, interface, addr) + int s; + char *interface; + u_char *addr; + { + kvm_t *kvmd; + int err = -1; + off_t ifnetptr; + off_t aifnetptr; + off_t ifaddrptr; + struct sockaddr sa; + struct ifnet ifnet; + struct ifaddr ifaddr; + struct arpcom arpcom; + struct sockaddr_dl *sdl; + char *cp, if_name[16]; + + if ((kvmd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL)) == NULL) { + fprintf(stderr, "kvm_open: can't open kernel!\n"); + return(-1); + } + if (kvm_nlist(kvmd, nlst) < 0 || nlst[0].n_type == 0) { + fprintf(stderr, "kvm_list: can't find namelist!\n"); + kvm_close(kvmd); + return(-1); + } + if (nlst[0].n_value == 0) { + fprintf(stderr, "kvm_list: _ifnet symbol not defined!\n"); + kvm_close(kvmd); + return(-1); + } + if (kvm_read(kvmd, nlst[0].n_value, (char *)&ifnetptr, + sizeof(ifnetptr)) != sizeof(ifnetptr)) { + fprintf(stderr, "kvm_read: bogus read!\n"); + kvm_close(kvmd); + return(-1); + } + while (ifnetptr) { + aifnetptr = ifnetptr; + if (kvm_read(kvmd, ifnetptr, (char *)&ifnet, + sizeof(ifnet)) == sizeof(ifnet)) { + if (kvm_read(kvmd, (off_t)ifnet.if_name, if_name, + sizeof(if_name)) == sizeof(if_name)) { + ifnetptr = (off_t)ifnet.if_next; + if_name[15] = '\0'; + cp = (char *)index(if_name, '\0'); + sprintf(cp, "%d", ifnet.if_unit); + if (strcmp(if_name, interface) != 0) + continue; + ifaddrptr = (off_t)ifnet.if_addrlist; + while (ifaddrptr) { + if (kvm_read(kvmd, ifaddrptr, (char *)&ifaddr, + sizeof(ifaddr)) == sizeof(ifaddr)) { + ifaddrptr = (off_t)ifaddr.ifa_next; + if (kvm_read(kvmd, (off_t)ifaddr.ifa_addr, (char *)&sa, + sizeof(sa)) == sizeof(sa)) { + if (sa.sa_family == AF_LINK) { + sdl = (struct sockaddr_dl *)&sa; + cp = (char *)LLADDR(sdl); + if (sdl->sdl_alen == 0) { + /* no address here, try ethernet driver */ + if (kvm_read(kvmd, aifnetptr, (char *)&arpcom, + sizeof(arpcom)) == sizeof(arpcom)) + cp = (char *)arpcom.ac_enaddr; + } + bcopy(cp, (char *)addr, 6); + fprintf(stderr, "BSDI: %-5s eth address %x:%x:%x:%x:%x:%x\n", + interface, addr[0], addr[1], addr[2], + addr[3], addr[4], addr[5]); + err = 0; + break; + } + continue; + } + } + break; + } + } + } + break; + } + kvm_close(kvmd); + return(err); + } + #endif bsdi *** Makefile.orig Thu May 19 20:26:33 1994 --- Makefile Fri Dec 16 18:09:50 1994 *************** *** 1,7 **** # # A Remote Network Server for AppleTalk # ! # Copyright (c) 1992-1993, The University of Melbourne # djh@munnari.OZ.AU # --- 1,7 ---- # # A Remote Network Server for AppleTalk # ! # Copyright (c) 1992-1994, The University of Melbourne # djh@munnari.OZ.AU # *************** *** 34,44 **** # LFLAGS= # LIBS=pfopen.o # ! # For 386BSD, FreeBSD ! # CFLAGS=-DBPFILT # LFLAGS= # LIBS= ! # # For HP 9000/700 HP-UX 9.x, with HP cc, (optimization suggestion only) # Using Archive libraries does not result in noticeable performance gain. # CFLAGS=+ESlit -J +O3 --- 34,55 ---- # LFLAGS= # LIBS=pfopen.o # ! # For 386BSD, FreeBSD 1.0, Phase 1 only ! # CFLAGS=-D__386BSD__ # LFLAGS= # LIBS= ! # ! # For FreeBSD 2.0, Phase 1 or Phase 2 ! # Also define FreeBSD_SWAP_BUG to workaround ethernet driver bug ! # CFLAGS=-DFreeBSD -DFreeBSD_SWAP_BUG ! # LFLAGS= ! # LIBS= ! # ! # For BSDI BSD/386, Phase 1 or Phase 2 ! # CFLAGS= ! # LFLAGS= ! # LIBS=-lkvm ! # # For HP 9000/700 HP-UX 9.x, with HP cc, (optimization suggestion only) # Using Archive libraries does not result in noticeable performance gain. # CFLAGS=+ESlit -J +O3 *************** *** 50,55 **** --- 61,67 ---- # LFLAGS= # LIBS= # + CFLAGS= LFLAGS= LIBS= *** clients/Makefile.orig Wed Jan 12 20:28:32 1994 --- clients/Makefile Mon Dec 19 17:24:14 1994 *************** *** 21,28 **** --- 21,33 ---- # LFLAGS= # CC=cc # + # For Linux + # CFLAGS=-DSYSTYPE_SYSV + # LFLAGS=-lbsd + CFLAGS= LFLAGS= + CC=cc PROGS=async *************** *** 31,37 **** all: ${PROGS} async: async.o ! ${CC} ${LFLAGS} -o async async.o async.o: async.c async.h arns.h ${CC} ${CFLAGS} -c async.c --- 36,42 ---- all: ${PROGS} async: async.o ! ${CC} -o async async.o ${LFLAGS} async.o: async.c async.h arns.h ${CC} ${CFLAGS} -c async.c *** clients/async.c.orig Fri Dec 10 02:37:34 1993 --- clients/async.c Mon Dec 19 17:21:39 1994 *************** *** 16,22 **** * started on the ARNS server host by inetd(8)) * * $Author: djh $ ! * $Revision: 1.6 $ * * */ --- 16,22 ---- * started on the ARNS server host by inetd(8)) * * $Author: djh $ ! * $Revision: 1.7 $ * * */ *************** *** 26,32 **** /* structures */ ! struct sockaddr_in sin; /* server UDP address */ struct sockaddr_in tin; /* server TCP address */ struct timeval timeout; /* select() timeout structure */ struct timeval echoout; /* IP link delay time tickle out */ --- 26,32 ---- /* structures */ ! struct sockaddr_in lsin; /* server UDP address */ struct sockaddr_in tin; /* server TCP address */ struct timeval timeout; /* select() timeout structure */ struct timeval echoout; /* IP link delay time tickle out */ *************** *** 114,126 **** long len; int i, res; fd_set readfds; - #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) void cleanup(); void linkerr(); - #else /* SYSTYPE_SYSV */ - int cleanup(); - int linkerr(); - #endif /* SYSTYPE_SYSV */ struct hostent *ho; struct passwd *pw; void doAALAPRead(); --- 114,121 ---- *************** *** 176,191 **** endpwent(); } ! sin.sin_family = AF_INET; ! sin.sin_addr.s_addr = bridgeIP; ! sin.sin_port = (u_short)htons(ARNS_PORT); if (debug) dbg = fopen("asyncLog", "w"); - /* select() timeout */ - timeout.tv_sec = 15; - timeout.tv_usec = 0; - (void)signal(SIGHUP, cleanup); (void)signal(SIGINT, cleanup); (void)signal(SIGQUIT, cleanup); --- 171,182 ---- endpwent(); } ! lsin.sin_family = AF_INET; ! lsin.sin_addr.s_addr = bridgeIP; ! lsin.sin_port = (u_short)htons(ARNS_PORT); if (debug) dbg = fopen("asyncLog", "w"); (void)signal(SIGHUP, cleanup); (void)signal(SIGINT, cleanup); (void)signal(SIGQUIT, cleanup); *************** *** 217,222 **** --- 208,217 ---- if (serOpen) FD_SET(pty, &readfds); + /* select() timeout */ + timeout.tv_sec = 15; + timeout.tv_usec = 0; + if ((res = select(nfds, &readfds, (fd_set *)0, (fd_set *)0, (struct timeval *)&timeout)) >= 0) { if (FD_ISSET(sifd, &readfds)) *************** *** 249,254 **** --- 244,250 ---- u_char buf[1500]; u_char LAPType; u_char *data; + void cleanup(); void doSrvrWrite(); void processSerial(); void recvIM(), recvUR(); *************** *** 487,492 **** --- 483,489 ---- short pktlen; char *p, *getpass(), *fgets(); void connectReq(), echoReq(); + void cleanup(); void requestREDIR(); void doAALAPWrite(); void doLinkTest(); *************** *** 794,801 **** } /* otherwise send via UDP directly to server */ ! if (sendto(udpfd, pkt+2, len, 0, (struct sockaddr *)&sin, ! sizeof(sin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } --- 791,798 ---- } /* otherwise send via UDP directly to server */ ! if (sendto(udpfd, pkt+2, len, 0, (struct sockaddr *)&lsin, ! sizeof(lsin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } *************** *** 833,840 **** dumppacket(pkt, len); } ! if (sendto(udpfd, pkt, len, 0, (struct sockaddr *)&sin, ! sizeof(sin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } --- 830,837 ---- dumppacket(pkt, len); } ! if (sendto(udpfd, pkt, len, 0, (struct sockaddr *)&lsin, ! sizeof(lsin)) != len) { if (debug) fprintf(dbg, "Server UDP write failed\n"); return; /* drop it, do nothing */ } *************** *** 1104,1114 **** { int on = 1; int pid, i; - #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) void funeral(); - #else /* SYSTYPE_SYSV */ - int funeral(); - #endif /* SYSTYPE_SYSV */ char *line; char c; --- 1101,1107 ---- *************** *** 1180,1191 **** */ #ifndef SYSTYPE_SYSV ! { ! struct sgttyb b; ! gtty(tty, &b); ! b.sg_flags = ECHO|CRMOD; ! stty(tty, &b); } #endif /* SYSTYPE_SYSV */ --- 1173,1184 ---- */ #ifndef SYSTYPE_SYSV ! { struct sgttyb b; ! if (ioctl(tty, TIOCGETP, &b) != -1) { ! b.sg_flags = ECHO|CRMOD; ! ioctl(tty, TIOCSETP, &b); ! } } #endif /* SYSTYPE_SYSV */ *************** *** 1368,1373 **** --- 1361,1367 ---- doLinkTest() { u_char ch; + void linkerr(); void setUPTerm(); alarm(5); *************** *** 1437,1451 **** * */ - #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) /*ARGSUSED*/ void cleanup(num) int num; - #else /* SYSTYPE_SYSV */ - int - cleanup() - #endif /* SYSTYPE_SYSV */ { void connectReq(); --- 1431,1440 ---- *************** *** 1490,1506 **** exit(1); } - #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) /*ARGSUSED*/ void linkerr(num) int num; - #else /* SYSTYPE_SYSV */ - int - linkerr() - #endif /* SYSTYPE_SYSV */ { char msgbuf[128]; sprintf(msgbuf, " Link Test failed at character: 0x%02x\r\n",linkChar); write(sofd, msgbuf, strlen(msgbuf)); --- 1479,1491 ---- exit(1); } /*ARGSUSED*/ void linkerr(num) int num; { char msgbuf[128]; + void cleanup(); sprintf(msgbuf, " Link Test failed at character: 0x%02x\r\n",linkChar); write(sofd, msgbuf, strlen(msgbuf)); *************** *** 1509,1523 **** return; } - #if defined(SYSTYPE_SYSV) && !defined(__STRICT_BSD__) /*ARGSUSED*/ void funeral(num) int num; - #else /* SYSTYPE_SYSV */ - int - funeral() - #endif /* SYSTYPE_SYSV */ { #if defined(SYSTYPE_SYSV) || defined(NeXT) union wait junk; --- 1494,1503 ---- *** clients/async.h.orig Sat May 1 23:52:24 1993 --- clients/async.h Mon Dec 19 17:21:41 1994 *************** *** 16,22 **** * on the ARNS server host by INETD) * * $Author: djh $ ! * $Revision: 1.2 $ * * */ --- 16,22 ---- * on the ARNS server host by INETD) * * $Author: djh $ ! * $Revision: 1.3 $ * * */ *************** *** 24,30 **** --- 24,34 ---- #include #include #include + #ifdef linux + #include + #else linux #include + #endif linux #include #define AALAP 600 /* maximum bytes of data */ *** README.orig Wed Nov 2 12:36:24 1994 --- README Fri Dec 16 18:01:30 1994 *************** *** 5,11 **** The University of Melbourne djh@munnari.OZ.AU January, 1992 ! version 1.12 ARNS is 'A Remote Network Server' package for AppleTalk that allows a --- 5,11 ---- The University of Melbourne djh@munnari.OZ.AU January, 1992 ! version 1.13 ARNS is 'A Remote Network Server' package for AppleTalk that allows a *************** *** 52,60 **** ARNS SERVER The ARNS server currently supports Phase 1 and Phase 2 EtherTalk networks ! on SUN SunOS/Solaris, DEC ULTRIX/Alpha, SGI IRIX, Sony NEWS 4.2, HP-UX 8.07 ! and IBM RS6000 AIX workstations, and Phase 1 only on Sony NEWS pre-4.2 and ! 386BSD/FreeBSD workstations. Security for access to the server is provided with an optional server password and/or username & password pair. Access can be restricted to --- 52,60 ---- ARNS SERVER The ARNS server currently supports Phase 1 and Phase 2 EtherTalk networks ! on SUN SunOS/Solaris, DEC ULTRIX/Alpha, SGI IRIX, Sony NEWS 4.2, HP-UX 8.07, ! IBM RS6000 AIX, Linux 1.1.74, BSDI BSD/386 1.1 and FreeBSD 2.0 workstations, ! and Phase 1 only on Sony NEWS pre-4.2 and 386BSD/FreeBSD 1.0 workstations. Security for access to the server is provided with an optional server password and/or username & password pair. Access can be restricted to *************** *** 101,113 **** ARNS SERVER RESTRICTIONS ! The ARNS server has been tested under SunOS 4.1.1, DEC ULTRIX 4.2, SGI IRIX ! 3.3.3 and 4.0.4, Sony NEWS 4.N, IBM AIX 3.1.5 and HP-UX 8.07. Under ULTRIX ! 4.N it may be necessary to run the command 'pfconfig +copyall '. ! Additionally, to run on Phase 2 networks, you need the appropriate ULTRIX ! Packet Filter patches (the same requirements as for CAP Native EtherTalk). ! Eventually, ARNS should run with the Berkeley Packet Filter on BSD Systems, ! more work needs to be done in this area. It's not currently possible to run ARNS on the same host with CAP in Native EtherTalk mode. The shareware version of UAR (UNIX AppleTalk Router) acts --- 101,110 ---- ARNS SERVER RESTRICTIONS ! Under ULTRIX 4.N it may be necessary to run the command 'pfconfig +copyall ! '. Additionally, to run on Phase 2 networks, you need the ! appropriate ULTRIX Packet Filter patches (the same requirements as for CAP ! Native EtherTalk). It's not currently possible to run ARNS on the same host with CAP in Native EtherTalk mode. The shareware version of UAR (UNIX AppleTalk Router) acts *************** *** 295,307 **** You MUST manually set the define for LIBS=pfopen.o in the Makefile and copy /usr/lib/examples/packetfilter/pfopen.c to the ARNS directory. ! ----------------------- ! Notes for 386BSD users: You must install the Berkeley Packet Filter on your system and define ! -DBPFILT in the CFLAGS= line in the Makefile. At this stage, 386BSD supports only Phase 1 EtherTalk due to limitations in multicast support in the 386BSD ethernet driver. -------------------------- Notes for Sony NEWS users: --- 292,318 ---- You MUST manually set the define for LIBS=pfopen.o in the Makefile and copy /usr/lib/examples/packetfilter/pfopen.c to the ARNS directory. ! ---------------------- ! Notes for HP-UX users: ! ! If you receive the message "/dev/lan0: device busy" then you may need ! to upgrade your operating system to HP-UX 9.04 or greater. ! ! --------------------------------------- ! Notes for 386BSD and FreeBSD 1.0 users: You must install the Berkeley Packet Filter on your system and define ! -D__386BSD__ in the CFLAGS= line in the Makefile. At this stage, 386BSD supports only Phase 1 EtherTalk due to limitations in multicast support in the 386BSD ethernet driver. + + --------------------------- + Notes for FreeBSD 2.0 users: + + You must define -DFreeBSD in the CFLAGS= line in the Makefile. There + appears to be an error in the ethernet driver (at least in the ed0 version) + which causes the IEEE 802.3 length bytes to be reversed. You may also need + to define -DFreeBSD_SWAP_BUG in the Makefile. -------------------------- Notes for Sony NEWS users: