BSD 3 development
[unix-history] / usr / src / cmd / net / READ_ME
B E R K E L E Y N E T W O R K
The code in this directory is the most up-to-date network source
on the machine.
*** Pre-processor Flags ***
This set of code is controlled by this set of conditional
compilation flags:
TESTING if defined, do not generate tests, etc. which require
super-user status.
OLDTTY if defined, compile for old 1 character TTY names
CCTTY if defined, compile for CC tty name format
if neither is defined, use v7 ttyname format
PASSWDF compile in code to handle /etc/passwdf - split passwd files
NEWPROT use the new protocol, instead of the default protocol
V7 use the v7 features
FUID use the funny uid's present on Cory and CC
ROPTION The local machine mail program has the magic -r option
ROPTION2 The local machine mail program has the magic -r option
HPASSWD The local machine has the hashed password stuff
SPACCT under certain circumstances, allow remote login without acct
SPOOLMAIL mail is in /usr/spool/mail/name
OLDMAIL mail is in home-directory/.mail
(default is /usr/mail/name)
CC machine is a Computer Center machine
NUID userid (as returned by getuid()) on this machine
UID1CHAR uses vanila Version6 userid's (only 1 byte for uid)
NOEUID does not have the geteuid() system call
At Berkeley, the conditonal flags are first defined
in "/usr/include/whoami.h" on the local machine..
They are VAX, CORY, A, C, D, E, SRC.
For "normal" version 6 machines, there is a dummy machine
definition for "VANILLA6" which indicates the v6 UNIX options.
For "normal" version 7 machines, there is a dummy machine
definition for "VANILLA7" which indicates the v7 UNIX options.
*** Adding a new machine
To add another machine to the network, change these programs:
The machine tables are all in config.h.
1. Change the path names in "Paths.h" and "nsh.c", and the makefile to suit.
2. Change "defs.h" to suit.
3. add in LOCALx section of config.h
the usual information about the machine interconnections
4. add the name of the machine to the machine
name table and its type to the machine type table
4.5 check routine "gothru" in sub.c
5. compile the network specifying the code type (CC, VAX, Cory, VANILLA)
and the machine type
*** Other files ***
interact.c, listen.c - manually send packets
speeds.c, speedr.c - send various length packets, use "time" to evaluate
store.c, receive.c - send a file (use for backup)
nettest.c - run daemons locally, using pipes instead of tty lines
setmode.c - set the mode on the tty line driver to "cat" things thru
*** Taxonomy of net pgms being sent around:
Internal: sendberkmail, prmail, mmail, mwrite
External: net, netcp, netlpr, netmail
Other: netdaemon, netstart, netq, netrm
*** Naming Conventions (in progress) ***
The names of simple variables are composed of three parts.
[type char] [string] [type tag]
where
typechar is one of
i integer (int)
l long integer (long)
ch character (char)
s string (char *)
f logical (char)
the (optional) string is any short descriptive string.
the (optional) type tag is noe of (assume string is "foo"):
fooMin minimum value of foo, for all foo, foo >= fooMin
fooMax maximum value of foo, foo <= fooMax
fooMac current maximum of foo, fooMin <= fooMac <= fooMax
usually used for array substript
fooOld old value of foo, as opposed to fooNew
fooNew new value of foo, as opposes to fooOld
Example:
sdate a string containing a date
sdateOld a string containing an old date
sdateNew a string containing the "current" date
Pointers
pointer names are composed of the
previous set of names precedd by a character "p", e.g.
pch pointer to char (same as string)
pi pointer to integer
pltime pointer to a long with the time in it
Counters
Variables that count instances of things are preceded
by 'n', e.g.
nch number of chars
nsdate number of date strings
Indices
Are stored as integers and preceded by 'i':
ich index into char array
is same as above
Added types:
uid userid as set by getuid()
sn local name, w/o ':'
fd (FILE *) file descriptor
mch (char) 1 - letter machine code
addr (char *) address, may include ':'
Procedure names list
parameters appear after procedure name, return value before.
(Remember for external names only the first 7 characters are significant.)
Compile Time Constants
Are in upper-case.
(Remember only first 8 characters are significant to the preprocessor).
PROBLEMS
If you have any problems or questions, don't hesitate
to call me.
Eric Schmidt
706 International House
Berkeley, Cal. 94720
415-642-9365
415-642-9490 (messages)
or
C.S. Department
Evans Hall
U.C. Berkeley
Berkeley, Cal. 94720
415-642-4951