Robert Elz wrote:
Date: Tue, 22 Jan 2013 19:43:24 -0500 (EST) From: Mouse <mouse%Rodents-Montreal.ORG@localhost> Message-ID: <201301230043.TAA26137%Sparkle.Rodents-Montreal.ORG@localhost> | Unfortunately I think it's the only solution, not only just because we | don't have any APIs more sophisicated but because it's not an easy | problem. Not easy to solve every case, that is perhaps, not easy to achieve perfection, I agree - and the option of binding a particular source address from the application would always be there. But for most applications, a rather simpler API that the application can use would solve enough of the problem (what typical apps actually need, most of the time) that it would be useful I think.
I don't think that the API needs to change. For the most part, the way in which the various networking APIs is sufficient for what we need to do. The problem at hand is that the multitude of addresses available on a host now means that applications need to either make educated guesses (for example, putting 169.254 at the bottom of the list to choose) or allow users to manually configure which address they want to use with a particular application. For large applications, this isn't unreasonable but for utilities such as mount, well we need a better way for them to work. In the original case of using mount, it isn't just one mount call or socket that needs to use a specific IP address/interface but a whole host of them. Thus what's required is a way to influence the networking environment of a command all of its successors. Darren