I'm using similar hacks https://github.com/observing/square/blob/master/lib/watch.js#L124-138 which is really prone to errors.
On Monday 6 August 2012 at 13:45, Marak Squires wrote: > Anyone need a good laugh today? > > Here is how I'm doing it for now: > > https://gist.github.com/3273796 > > Looking forward to seeing the real solution implemented. > > On Mon, Aug 6, 2012 at 4:26 AM, Ben Noordhuis <i...@bnoordhuis.nl > (mailto:i...@bnoordhuis.nl)> wrote: > > On Mon, Aug 6, 2012 at 3:53 AM, Marak Squires <marak.squi...@gmail.com > > (mailto:marak.squi...@gmail.com)> wrote: > > > 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. > > > > I would reject the PR. It's a rather esoteric feature that almost no > > one needs. Core is not a dumping ground, that's what add-ons are for. > > :-) > > > > Besides, you *can* accomplish this from an add-on. On most Unices, > > it's a matter of creating a socket of the address family you're > > interested in (AF_INET, AF_INET6) and calling some ioctls to get the > > routing table. Windows has a more elaborate API that's documented > > here[1]. > > > > [1] > > http://msdn.microsoft.com/en-us/library/windows/desktop/aa373798%28v=vs.85%29.aspx >