Robert - Would it make any sense to bring this logic into core instead of relying on shelling out to various command line tools?
I'm unsure the repercussions ( if any ) that having a piece of code like this would have in core. On Sun, Aug 5, 2012 at 6:44 PM, Robert Mustacchi <r...@fingolfin.org> wrote: > On 08/05/2012 06:22 PM, Marak Squires wrote: > > That's been the general consensus from everyone I've spoken with so far. > > > > Will that work 100% of the time? > > You'll need to parse the full routing table and correlate that with the > IP address that you're sending to. The default gateway may not be the > one that specific traffic is going over. You may also need to use > netstat -rn, as the Linux route command doesn't seem to have a get > option like the SunOS one does. > > Note that the output of route / netstat isn't standardized across the > different *nixes. > > Robert >