Date: Wed, 4 Jan 1995 22:42:48 -0600 (CST) From: Guy Helmer <ghelmer@alpha.dsu.edu> To: freebsd-hackers@freefall.cdrom.com Subject: Suggestions solicited re: dynam. IP addr w/ sliplogin Message-ID: <Pine.OSF.3.91.950104222846.24406A-100000@alpha.dsu.edu>
next in thread | raw e-mail | index | archive | help
I've been hacking on sliplogin to dynamically assign IP addresses; it examines /etc/slip.hosts as before, but if it runs into a "group:<groupname>" that matches a group the current user belongs to, it uses the given remote-addr as a basis for assiging a dynamic SLIP address. I had the "bright idea" that I could just use the assigned SLIP unit # as an offset added to the base remote-addr and then report the address to the user, but I/O to the tty appears to be impossible after the line has been switched to the SLIP line discipline, so under this method I can't tell the user what his/her IP address is... I have implemented another method where a range of addresses is iteratively assigned (base remote-addr + n, where n is from 0 to whatever), but this method will fail should a particular SLIP line stay active until "n" cycles completely around... Might anyone have any thoughts regarding a tidy method of assigning dynamic IP address in sliplogin? I have reviewed someone else's solution (was it Robert Shady's?), but I would like to have a solution completely implemented within sliplogin and be certain it is immune to races. I could add code to sliplogin to review the current state of the SLIP interfaces, but I had been hoping for something "easier" :-) Thanks, Guy Guy Helmer, Dakota State University Computing Services - ghelmer@alpha.dsu.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.950104222846.24406A-100000>