Re: [OxLUG] List network interfaces and find their address/n…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Chris Wareham
Date:  
To: Oxfordshire Linux User Group Discussion List
Subject: Re: [OxLUG] List network interfaces and find their address/netmask in C
Bob Dunlop wrote:
> On Thu, Oct 15 at 11:54, Chris Wareham wrote:
>> I don't have my copy of the Stevens network programming book to hand,
>> but I need to write a C program to list all the network devices on a
>> Linux machine, and then query them for IP address and netmask. A few
>> function names to set me off down the right path would be greatly
>> appreciated!
>
> man getifaddrs
>
> The manpage even includes your program as a worked example.
>


My thanks to both yourself and Raymond. The Stevens example reminds me
that I need to replace my first edition of Unix Network Programming with
a recent one, while the getifaddrs example is sufficient for my current
needs.

Chris
--



Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside
London SE1 2RR

Tel: +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753

http://www.visitlondon.com/


Back England’s bid to host the 2018 FIFA World Cup. Visit http://www.england2018bid.com/ and choose London as your favourite host city when registering your support or Text ‘London’ to 62018




'Visit London Limited' is registered in England under No.761149;
Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.

Visit London is the official visitor organisation for London. Visit London is partly funded by Partnership, the Mayor's London Development Agency and London Councils.
The information contained in this e-mail is confidential and intended for the named recipient(s) only. If you have received it in error, please notify the sender immediately and then delete the message. If you are not the intended recipient, you must not use, disclose, copy or distribute this email. The views expressed in this e-mail are those of the individual and not of Visit London. We reserve the right to read and monitor any email or attachment entering or leaving our systems without prior notice.

Please don't print this e-mail unless you really need to.