tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: binding a socket to a specific interface



> See ip(4) which describes a CMSG instruction called IP_PKTINFO
Ah, thanks.
Unfortunately, this doesn't seem to be available in 6, which my production 
servers are still on.

> where you can set ipi_ifindex to the index of the outbound interface.
The manpage (from 7) says
	The IP_PKTINFO option can be used to turn on receiving of information
	about the source address of the packet, and the interface index.
which doesn't sound (to me) like you can set the outgoing interface.

What does dhcpcd do? If it doesen't go the bpf route, can you point me at 
the relevant code?


Home | Main Index | Thread Index | Old Index