Subject: Re: [Patch] Establishing more than 64K outgoing TCP connections

From: Evgeniy Polyakov <[email-masked]>
Date: Sat, 8 Nov 2008 02:04:00 +0300

On Fri, Nov 07, 2008 at 05:37:33PM -0500, Yavor Goulishev ([email-masked]) wrote:
> It is not the entire table. It is O(number_of_local_interfaces).
> In general, if you have more then one interface you either need to flatten the
> ip/port space and have a smart way to access it in O(1) or you have the O(number_of_local_interfaces).
> The case of ANY can be solved with special ANY interface. So you can get O(1) even there, but the space will grow.

As was already pointed, you can use SO_BINDTODEVICE for this purpose.
Next solution you may think of is already implemented as SO_REUSEADDR
socket option.

-- 
	Evgeniy Polyakov