Skip to content

Commit

Permalink
Add modified sources
Browse files Browse the repository at this point in the history
  • Loading branch information
mamccollum committed Mar 27, 2023
1 parent e739b79 commit 4c06d8a
Show file tree
Hide file tree
Showing 32 changed files with 3,269 additions and 3 deletions.
44 changes: 44 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
File Name Archive # Description
----------------------------------------------------------
PACKNOTES 1
README 1
MANIFEST 1
Makefile 4
dialslip 1
dialslip/Makefile 4
dialslip/README.dialslip 4
dialslip/dslipuser.c 4
dialslip/mkslipuser.c 3
dialslip/slip.c 3
dialslip/slip.config 4
dialslip/slip.h 3
dialslip/slip.hosts 4
driver 1
driver/ID 1
driver/ID/Master 2
driver/ID/Node 4
driver/ID/Space.c 2
driver/ID/System 4
driver/io 1
driver/io/slip.c 1
driver/io/slip.mk 4
driver/sys 1
driver/sys/slip.h 4
driver/v2.ip.fix 1
driver/v2.ip.fix/Driver.UU.01 2
driver/v2.ip.fix/Driver.UU.02 1
man 1
man/man1 1
man/man1/dslipuser.1 3
man/man1/mkslipuser.1 3
man/man1/slattach.1 3
man/man1/sldetach.1 3
man/man1/slhangupd.1 4
man/man1/slip.1 3
man/man7 1
man/man7/slip.7 3
utils 1
utils/Makefile 4
utils/slattach.c 3
utils/sldetach 4
utils/slhangupd.c 3
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Makefile file for SLIP
#

all:
cd driver/io; make -f slip.mk all install
cd utils; make all install
cd dialslip; make all install

clean:
cd driver/io; make -f slip.mk clean
cd utils; make clean
cd dialslip; make clean
5 changes: 5 additions & 0 deletions PACKNOTES
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# "driver/v2.ip.fix//Driver.o.UU" was split into 2 parts; to create it, do
cat driver/v2.ip.fix//Driver.UU.0[1-9] >driver/v2.ip.fix//Driver.o.UU
# Run uudecode to create "driver/v2.ip.fix//Driver.o":
uudecode driver/v2.ip.fix//Driver.o.UU
105 changes: 105 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@

SLIP (Serial Link Internet Protocol)

To build and install the slip driver, the slip utilities, and the slip login
(dialslip) utilities, type the following command:

make


SLIP DRIVER

If you are using Unix System V Release 4.0.2 or below, you will need to copy
v2.ip.fix/Driver.o to /etc/conf/pack.d/ip/Driver.o before you build the
kernel. The ip driver of Unix System V R 4.0.2 has a bug for a point to point
connection which panics the system. The v2.ip.fix/Driver.o fixes the problem.
SLIP (Serial Link Internet Protocol)

If you need to configure the second serial port, because your first serial
port is used by other device, refer to Intel's Unix System V.4.0 Administra-
tors Guide.

Once the new ip driver and the slip have been installed, and your serial port
has been set up, you can build the kernel using the idbuild command. Don't
forget to reboot your system after the idbuild command completes succesfully
for the new kernel to take into effect.


SLIP UTILITIES

slattach

The slattach command links the slip streams driver to the serial port and links
the ip driver to the slip driver.

The syntax of slattach is as following:

slattach [-i] nodename interface_name
OR slattach -d [-i] devname interface_name [ baudrate ]
OR slattach - interface_name

The first option uses the Basic Networking Utilities (Advanced System
Administration Volume 1 Chapter 7-15). Once the administration files
are set up, you can use the remote node name to attach slip directly
or through your modem. Example:
slattach venus sl0

The "-d" does not use BNU but directly open the next argument which is
the serial device and link it to the slip driver. The baudrate sets up
the line speed of the serial line; the default baudrate is 9600.

To start the slip interface using the first serial port at 1200 baud
execute the below command:

slattach -d /dev/tty00 sl0 1200

If the slip hangup daemon (slhangupd) is run, slattach by default is set
to receive hangup signal (SIGHUP) sent by the slip driver through slhangupd.
The -i option ignores any hangup signal.


ifconfig

This utility is included in the standard base Unix System V Release 4.0
product. Ifconfig is used to configure your system to the remote slip node.

ifconfig interface_name source destination up


slhangupd

Slhangup (slip hangup daemon) is a daemon used to receive messages sent by
the slip driver. Whenever the slip driver receives a M_HANGUP message from
a particular line, the driver sends sends the process id of the controlling
slattach process to slhangupd. Slhangup then will send a SIGHUP (hangup
signal) to the pid received from the slip driver.

There is no restriction of the execution order of slattach and slhangupd.


sldetach

sldetach removes the serial line that is being used for slip connection.

sldetach interface_name


DIALSLIP (slip login utilities)

To install dialslip:

1. Set up the /etc/slip.hosts file. This file maps login names to IP
addresses, which # comments, as usual.

2. Set up the /etc/slip.config file. This file defines the IP address
of the local system on each interface. Set them all the same. There
can be as many simultaneous logins as lines in this file (not counting
comments).

3. Run "mkslipuser". This builds a file similar in nature to utmp that
keeps track of who's logged in and what interface they're using.
This command should also be run at boot time to clean things up.

4. Set up accounts for each system dialing in with "slip" as the shell
with its setuid bit set to root.

3 changes: 0 additions & 3 deletions README.md

This file was deleted.

22 changes: 22 additions & 0 deletions dialslip/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CC = cc
CFLAGS = -O -DUSG -I/usr/ucbinclude
LDFLAGS =
LIBS = -L/usr/ucblib -lsocket -lnsl -lucb

all: dslipuser mkslipuser slip

dslipuser: dslipuser.o
$(CC) $(LDFLAGS) -o dslipuser dslipuser.o $(LIBS)

mkslipuser: mkslipuser.o
$(CC) $(LDFLAGS) -o mkslipuser mkslipuser.o $(LIBS)

slip: slip.o
$(CC) $(LDFLAGS) -o slip slip.o $(LIBS)

clean:
rm -f *.o mkslipuser dslipuser slip

install:
cp dslipuser mkslipuser slip /usr/sbin
chmod 4755 /usr/sbin/slip
27 changes: 27 additions & 0 deletions dialslip/README.dialslip
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

src/new/slip.h
edit to customize path names and line discipline

src/new/slip.config
src/new/slip.hosts
move to location specified in slip.h

src/new/dslipuser.c
cc -O -o dslipuser dslipuser.c

src/new/mkslipuser.c
cc -O -o mkslipuser mkslipuser.c

src/new/slip.c
cc -O -o slip slip.c

Modifications:
01/31/91 Alan Batie
- Ported slip.c dslipuser.c mkslipuser.c for Unix System V/386
Release V.4.

02/08/91 Sudji Husodo
- modified to log slip activities to /var/slip/slip.log if the file exists.
- changed the call to "system" to fork and exec, so we don't have to setuid
slattach and ifconfig to root.

78 changes: 78 additions & 0 deletions dialslip/dslipuser.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* dslipuser.c
*
* Displays information on all of the users currently attached to the network.
*
* Copyright 1987 by University of California, Davis
*
* Greg Whitehead 10-1-87
* Computing Services
* University of California, Davis
*
* Revised: Geoff Arnold
* Sun Microsystems Inc.
* 10-28-87
*/

#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netdb.h>
#include <pwd.h>
#include "slip.h"

#ifdef USG
# include <sys/fcntl.h>
#endif

main(argc,argv)
int argc;
char **argv;
{
int ufd;
struct sl_urec urec;
int free;
struct passwd *upass;
struct hostent *hh;
int n = 0;
int f = 0;

/*
* Open USER_FL.
*
*/
if ((ufd=open(USER_FL,O_RDONLY))<0) {
perror(USER_FL);
exit(1);
}


/*
* Display USER_FL.
*
*/
while (read(ufd,&urec,sizeof(urec))==sizeof(urec)) {
if (urec.sl_uid >=0) {
n++;
upass=getpwuid(urec.sl_uid);
hh = gethostbyaddr(&urec.sl_haddr, 4, AF_INET);
printf("User %s connected as %s (%s) via %s%d\n",
upass->pw_name, hh->h_name, inet_ntoa(urec.sl_haddr),
IF_NAME,urec.sl_unit);
}
else
f++;
}

if (n == 0)
printf("No dialup SLIP users connected.\n");

printf("(%d free line%s)\n",f,(f==1)?"":"s");

close(ufd);
}
Loading

0 comments on commit 4c06d8a

Please sign in to comment.