Subject: libsa improvements, boot ROMs
To: None <current-users@NetBSD.ORG>
From: Matthias Drochner <>
List: current-users
Date: 08/23/1995 22:12:11
The network code in sys/lib/libsa is not little-endian clean.
After compiling it on the i386 the net monitor showed lots
of somehow twisted packets.
I hope that I fixed most of the inportabilities.

For simplicity, I changed all addresses and port numbers to be kept in network
byte order and only ntohxed for system I/O. To have the compiler look for
problems, all addresses are declared as "struct in_addr".

Some other small improvements I made:
-Final Timeout in sendrecv(), if no answer.
-TFTP implementation (as filesystem in the libsa framework, can even lseek)
-Some namespace protection (global variables removed or made static)
-Replaced Broadcast to portmapper with func "callit" by direct rpc call in
	bootparams. (The former didn't work with ULTRIX servers.)
-Can give a desired filename to bootp.
-Some error handling problems solved (caused by "if(res < 0)", where res is

The context diff (without the tftp) is nearly 1000 lines, so I don't want
to send it to the mailing list.
Nevertheless, I would like to contribute this to the developer(s).
Should I send a change-request?

Some more related work I did (probably of limited interest, but perhaps I can
hely anybody with it):
-diskless boot ROMs for 3com509 and wd80x3 with the libsa functions
-same as DOS executables
-diskless boot of LynxOS (real-time unixoid)

Feel free to mail me for this stuff!