Re: Multihoming problem
Re: Multihoming problem
- Subject: Re: Multihoming problem
- From: Peter Sichel <email@hidden>
- Date: Wed, 27 Feb 2008 10:30:08 -0500
On Feb 27, 2008, at 8:47 AM, Hamish Allan wrote:
INADDR_ANY has different meanings for send and receive. For send, it
means "on the primary interface". So if you want to send on more than
one interface, you have to send it separately to each. For receive
(bind), it means "listen on all interfaces". For your purposes, you'll
need a separate socket for each interface.
This is correct, but there is one more factor that may help you.
Routing in TCP/IP is based on the destination IP address.
If you bind to INADDR_ANY, outgoing packets will be routed
to any directly attached IP subnets that match the destination
address, and if none match will be sent to the next hop router
for the primary interface.
For broadcasting, you can set the destination IP to the subnet
broadcast address to determine which interface should broadcast,
or alternatively use bpftransmit to send raw frames from the data
link layer.
Kind Regards,
- Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden