Operations on network interfaces

Richard Tobin richard at aiva.ed.ac.uk
Wed May 4 02:29:43 AEST 1988


(Sun OS, probably BSD as well)

Can someone explain why the operations on networks interfaces are implemented
in the way that they are?  That is, why does one do an ioctl on a socket,
with an ifreq structure containing the name of the interface, rather than on
a device in /dev?

While I'm here, I suppose I might as well ask something else.  I'd like
one machine to pretend to be several (perhaps a whole network-full).  So
that (for example) an attempt to rlogin in to a machine (say) 192.9.202.1
(which doesn't exist) will result in a daemon on some other machine waking
up.  Part of it seems straightforward: have the simulating machine send
out packets saying that it's a gateway to the other machines.  But how to
have a process on the simulating machine bind to address 192.9.202.1?
Something like having a loopback interface configured to that address
sounds plausible... Any suggestions?

-- Richard

-- 
Richard Tobin,                         JANET: R.Tobin at uk.ac.ed             
AI Applications Institute,             ARPA:  R.Tobin%uk.ac.ed at nss.cs.ucl.ac.uk
Edinburgh University.                  UUCP:  ...!ukc!ed.ac.uk!R.Tobin



More information about the Comp.unix.wizards mailing list