[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ifconfig data



On Fri, Feb 27, 2009 at 12:36 PM, Andrew McGlashan
<andrew.mcglashan@affinityvision.com.au> wrote:
> Hi,
>
> Aneurin Price wrote:
>>
>> Maybe this would suit you:
>> http://www.geekpage.jp/en/programming/linux-network/get-ipaddr.php
>> (Changing eth0 to ppp0 obviously)
>
> Okay.
>
>> NB. To get that example to work I had to change the includes as
>
> I got it to work fine without _any_ changes.
>

That's interesting. I got a segfault, which turned out to be caused by
include problems; -Wall says:
test.c: In function ‘main’:
test.c:27: warning: implicit declaration of function ‘close’
test.c:30: warning: implicit declaration of function ‘inet_ntoa’
test.c:30: warning: format ‘%s’ expects type ‘char *’, but argument 2
has type ‘int’

I wonder why my headers don't declare the same things as yours...

Nye


Reply to: