Subject: How to find I/F to destination

From: David Howells <[email-masked]>
Date: Fri, 04 May 2007 13:48:48 +0100

Hi,

I would like to determine through which interface packets sent to a particular
UDP destination will go through, and so determine the MTU size for that
interface.  Can anyone suggest a good way of doing this from within the
kernel?

Doing this will permit AF_RXRPC to obtain a better initial guess as to the
maximum size of the packets that can be sent that way.

I could use the code Patrick gave me to allow AFS to iterate through all the
interfaces and then pick the smallest MTU, but that seems wrong somehow -
though it probably will result in the correct answer 99% of the time.

David