Subject: Re: dhcpd(8) _cannot_ be completely disabled on an interface
To: None <firstname.lastname@example.org, email@example.com>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 01/08/2002 01:18:25
>> IP_RECVIF gets you the if_index value for the interface in question.
>> Mapping that to anything useful is up to the packet recipient.
> egad. i thought it was more useful than that. i wonder what sort of
> issues would be be incurred by *making* it more useful...
What would you consider "useful"? The if_index values are the only
unambiguous fixed-size names interfaces have, as far as I know.
> i tried adding an arp entry via a routing socket once. i wasn't sure
> of the exact formatting and construction of the routing messages,
They _are_ poorly documented. IIRC there's at least one define that
you need but which isn't provided by any .h file; hazy memory says it's
something about padding.
> what i did expect, however, was that the kernel would not let you add
> an arp entry for an ip address which was not "local" to one of the
> interfaces. this is not so?
Well, if I change identifying details, it looks like this:
Note that if2's netmask is a /32. The major reason for it to have an
address at all is to make the machine recognize 10.0.2.1 as one of its
Using arp(8) to add an arp entry for (say) 10.0.2.3 will make it point
to if3. But for this application, I needed to make it point out if2.
According to the netmasks, this was off-subnet for that interface, but
did what in these circumstances was the Right Thing (send packets out
if2 with the MAC address from the arp entry in the Ethernet destination
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML firstname.lastname@example.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B