On Tue, 11 Dec 2012 19:33:15 +0800, Bill Kenworthy wrote about
"[gentoo-user] ifconfig and ppp0 address":

>For years I have been using ifconfig and some simple shell magic to
>extract the ip address from the adsl ppp session when it changes.  The
>latest update has changed the output format of ifconfig breaking things
>so if ifconfig cant be relied on, what's normally used to extract an
>interfaces IP address?  I can easily rewrite the shell magic, but its
>worth asking if there is some command better suited.

I wrote a command in C++ that interrogates the TCP/IP stack directly to
obtain the IP address of any given interface.  I wrote it some years
ago, so it's only IPv4 at the moment; it will take a day or two to add
IPv6 support.

I can send you the source code if you want. Likewise to any other
interested reader -- or I can post it here as a mail attachment, since
it is quite tiny.
-- 
Regards,

Dave  [RLU #314465]
======================================================================
dwn...@ntlworld.com (David W Noon)
======================================================================

Attachment: signature.asc
Description: PGP signature

Reply via email to