Skip to contentSkip to conversation

How to get IPv6 interface?

DISCUSSION Zheng Jianping 4 participants 6 messages Nov 26, 2002 – Nov 28, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

My linux kernel is 2.4.7.10, how to get the information of all IPv6 interfaces, including the interfaces index, flags,name and address,etc ?

Thanks,
Zheng

[[HTML alternate version deleted]]

#1 lore raw

--On Tuesday, November 26, 2002 04:28:31 PM +0800 Zheng Jianping

Quoted 3 lines · <[email protected]> wrote:

My linux kernel is 2.4.7.10, how to get the information of all IPv6 interfaces, including the interfaces index, flags,name and address,etc ?

Userspace: ip -6 addr

Peter
---
Dr. Peter Bieringer
mailto: pb at bieringer dot de
http://www.bieringer.de/pb/
Key 0x958F422D : B501 24F4 9418 23E2 C0F3 F833 7B57 AA7B 958F 422D

#2 lore raw

----- Original Message -----
From: "Peter Bieringer" <[email protected]>
To: <[email protected]>
Cc: "Zheng Jianping" <[email protected]>
Sent: Wednesday, November 27, 2002 3:08 AM
Subject: Re: How to get IPv6 interface?

--On Tuesday, November 26, 2002 04:28:31 PM +0800 Zheng Jianping

Quoted 5 lines · <[email protected]> wrote:
Quoted 3 lines

My linux kernel is 2.4.7.10, how to get the information of all IPv6 interfaces, including the interfaces index, flags,name and address,etc ?

Userspace: ip -6 addr

Peter,

I'm writing an IPv6 application, so which function can get the IPv6 inteface information? And how to call it?

Thanks,
Zheng

#3 lore raw

--On Thursday, November 28, 2002 08:58:53 AM +0800 Zheng Jianping

Quoted 2 lines · <[email protected]> wrote:

I'm writing an IPv6 application, so which function can get the IPv6 inteface information? And how to call it?

Sorry, I'm not really an IPv6 programmer, hopefully others can help you.

BTW: if someone has some written information about using the APIs, would be nice if can be contributed to the HowTo.

Thanks,
Peter

---
Dr. Peter Bieringer
mailto: pb at bieringer dot de
http://www.bieringer.de/pb/
Key 0x958F422D : B501 24F4 9418 23E2 C0F3 F833 7B57 AA7B 958F 422D

#4 lore raw
Quoted 10 lines · Peter Bieringer

--On Thursday, November 28, 2002 08:58:53 AM +0800 Zheng Jianping

Quoted 2 lines · <[email protected]> wrote:

I'm writing an IPv6 application, so which function can get the IPv6 inteface information? And how to call it?

Sorry, I'm not really an IPv6 programmer, hopefully others can help you.

The best way is probably to look at the 'ip' sources which use netlink to query the kernel.

Quoted 2 lines

BTW: if someone has some written information about using the APIs, would be nice if can be contributed to the HowTo.

indeed.

Regards,

bert

Signature · 2 lines
http://www.PowerDNS.com          Versatile DNS Software & Services
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
#5 lore raw

In article <[email protected]> (at Thu, 28 Nov 2002 12:16:00 +0100), bert hubert <[email protected]> says:

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I'm writing an IPv6 application, so which function can get the IPv6 inteface information? And how to call it?

Sorry, I'm not really an IPv6 programmer, hopefully others can help you.

The best way is probably to look at the 'ip' sources which use netlink to query the kernel.

You may want to use getifaddrs() in USAGI libinet6.

Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA