lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTik8vvY4Qk3iX+CFcDrUV6Dki2MA2tU5ji9R_uqW@mail.gmail.com>
Date:	Fri, 7 Jan 2011 13:41:31 +0800
From:	Chin Shi Hong <cshong87@...il.com>
To:	Alexander Clouter <alex@...riz.org.uk>
Cc:	netdev@...r.kernel.org
Subject: Re: Use ioctl() to list all network interfaces.

On Fri, Jan 7, 2011 at 1:07 AM, Alexander Clouter <alex@...riz.org.uk> wrote:
> Chin Shi Hong <cshong87@...il.com> wrote:
>>
>> The following codes are just part of my application's source codes:
>>
>> --begin of some codes--
>> ifconf ifc;
>> ret = ioctl(n, SIOCGIFCONF,&ifc);
>> --End of some codes--
>>
>> My application's role is to display all network interfaces, including
>> the network interface which are down.
>>
>> However, with the above codes, my application only display the network
>> interface which are already up. The network interface which are down
>> will not be displayed.
>>
>> So, what can I do to make my application display all network
>> interfaces, including the network interface which are down?
>>
> getifaddrs(), you get the IPv6 ones too this way.
>
> Cheers
>
> --
> Alexander Clouter
> .sigmonster says: I've only got 12 cards.
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

getifaddrs() helpful also. Thank you!

Regards,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ