October 24, 2022
Simple Daytime client
On pages 5 and 6 of the book, a UDP client is presented.
It talks to the daytime server that used to be a standard thing on port 13 of unix
systems.
These days only a handful of internet experimenters are interested in it, and it seldoms
runs by default. On my linux system, I do this to start it up.
- be sure the xinetd package is installed
- edit /etc/xinetd.d/daytime-dgram and enable the service
- edit /etc/xinetd.d/daytime-stream and enable the service
- /bin/systemctl stop xinetd.service
I copied the code from the book, with some minor edits that I could not resist.
Then I added the TCP version of the same thing alongside.
(Seeing them side by side is instructive).
It is interesting that this code (from 1994) runs without changes in 2022 on a linux system.
This code originally ran on BSD and now, 30 years later, can be compiled and run on
an entirely different "unix" system. Very nice.
Have any comments? Questions?
Drop me a line!
Kyu / [email protected]