[comp.unix.wizards] Operations on network interfaces

richard@aiva.ed.ac.uk (Richard Tobin) (05/03/88)

(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@uk.ac.ed             
AI Applications Institute,             ARPA:  R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk
Edinburgh University.                  UUCP:  ...!ukc!ed.ac.uk!R.Tobin