On Thu, 2009-05-14 at 14:40 -0400, James Carlson wrote: > Sebastien Roy writes: > > > > On Thu, 2009-05-14 at 14:12 -0400, Dan McDonald wrote: > > > - Insert something into the sendmsg() path that explicitly sets the > > > local IP & port for a single datagram. > > > > > > This involves kernel modifications, which would be awful if > > > anyone requested such a daemon to run on older kernels. > > > > This is the cleanest and most sensible approach, IMO. A new ancillary > > data type that specifies the source address and/or port makes sense to > > me. > > Yep. You could call it IP_PKTINFO. ;-}
That only goes part of the way, though. If I understood the problem correctly, the application also needs to specify the source port, and presumably the transport layer would need to drop the packet if that port was in use. I may be misinterpreting the intent of the function, but as Dan specified it, it takes a full source sockaddr, and not just an IP source address. -Seb _______________________________________________ networking-discuss mailing list [email protected]
