cURL / Mailing Lists / curl-library / Single Mail

curl-library

Using libcurl to get local Network IP for ETH0 and ETH1

From: Bernard Evensrud <bevensrud_at_gmail.com>
Date: Thu, 20 Dec 2012 15:36:26 +0100

Hello,

Can libcurl from within a C application be used to get the network IP
address for ETH0 and ETH1 on Linux, just like ifconfig eth0 | grep
\"inet addr\" | awk -F: '{print $2}' | awk '{print$1}'?
I do not need the localhost IP or external IP. Just the local network
IP received from DHCP.

Thanks!
Bernard E.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-20