http://git.community.i2p/PurpleI2P/i2pd/src/commit/8c218bd5dfbe063e4f826500ebd77530f11cfdf5/util.cpp
{ int fd = socket ( family , SOCK_DGRAM , 0 ) ; if ( fd > 0 ) { ifreq ifr ; strncpy ( ifr . ifr_name , ifa - > ifa_name , IFNAMSIZ ) ; // set interface for query if ( ioctl ( fd , SIOCGIFMTU , & ifr ) > = 0 ) mtu = ifr . ifr_mtu ; // MTU else LogPrint ( eLogError , " Failed to run ioctl " ) ; close ( fd ) ; } else LogPrint ( eLogError , " Failed to create datagram socket " ) ; } else LogPrint ( eLogWarning , " Interface for local address " , localAddress . to_string ( ) , " not found " ) ; freeifaddrs (...