* Help On function to get IPV6 address of an interface in kernel
@ 2010-03-04 9:41 Mohan Reddy
2010-03-04 16:17 ` Brian Haley
0 siblings, 1 reply; 4+ messages in thread
From: Mohan Reddy @ 2010-03-04 9:41 UTC (permalink / raw)
To: netdev
Hi,
Is there a function or a way in kernel to get an interface ipv6 address if interface name or net_device object is known? I searched in the kernel i got a function ipv6_get_ifaddr(). But it is expecting an ipv6 address as a parameter.
Thanks for your help in advance.
-Mohan Reddy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help On function to get IPV6 address of an interface in kernel
2010-03-04 9:41 Help On function to get IPV6 address of an interface in kernel Mohan Reddy
@ 2010-03-04 16:17 ` Brian Haley
2010-03-05 15:49 ` Venkata Mohan Reddy
0 siblings, 1 reply; 4+ messages in thread
From: Brian Haley @ 2010-03-04 16:17 UTC (permalink / raw)
To: Mohan Reddy; +Cc: netdev
Mohan Reddy wrote:
> Hi,
>
> Is there a function or a way in kernel to get an interface ipv6 address if interface name or net_device object is known? I searched in the kernel i got a function ipv6_get_ifaddr(). But it is expecting an ipv6 address as a parameter.
What type of IPv6 address? For link-locals you can use ipv6_get_lladdr(), but
for others ipv6_dev_get_saddr() is more comprehensive, but you'll need a
destination address. There's lots of reference code in addrconf.c to do
other things.
-Brian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help On function to get IPV6 address of an interface in kernel
2010-03-04 16:17 ` Brian Haley
@ 2010-03-05 15:49 ` Venkata Mohan Reddy
2010-03-06 23:23 ` Mark Smith
0 siblings, 1 reply; 4+ messages in thread
From: Venkata Mohan Reddy @ 2010-03-05 15:49 UTC (permalink / raw)
To: Brian Haley; +Cc: netdev
Thanks a lot Brain. ipv6_get_lladdr() helped me. Actually I want to get site-local or univeral(global) address. Though there is no direct function to get theseaddresses, ipv6_get_lladdr() shows how we can get the other addresses too.
Thanks,
Mohan Reddy
On Thu, Mar 04, 2010 at 11:17:39AM -0500, Brian Haley wrote:
> Mohan Reddy wrote:
> > Hi,
> >
> > Is there a function or a way in kernel to get an interface ipv6 address if interface name or net_device object is known? I searched in the kernel i got a function ipv6_get_ifaddr(). But it is expecting an ipv6 address as a parameter.
>
> What type of IPv6 address? For link-locals you can use ipv6_get_lladdr(), but
> for others ipv6_dev_get_saddr() is more comprehensive, but you'll need a
> destination address. There's lots of reference code in addrconf.c to do
> other things.
>
> -Brian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help On function to get IPV6 address of an interface in kernel
2010-03-05 15:49 ` Venkata Mohan Reddy
@ 2010-03-06 23:23 ` Mark Smith
0 siblings, 0 replies; 4+ messages in thread
From: Mark Smith @ 2010-03-06 23:23 UTC (permalink / raw)
To: Venkata Mohan Reddy; +Cc: Brian Haley, netdev
On Fri, 5 Mar 2010 21:19:34 +0530
Venkata Mohan Reddy <mohanreddykv@gmail.com> wrote:
> Thanks a lot Brain. ipv6_get_lladdr() helped me. Actually I want to get site-local or univeral(global) address. Though there is no direct function to get theseaddresses, ipv6_get_lladdr() shows how we can get the other addresses too.
>
Site-locals are deprecated (http://www.rfc-editor.org/rfc/rfc3879.txt),
so I wouldn't think you'll ever find a site-local specific address
function. If you do find one, I'd be fairly sure it'd go away.
> Thanks,
> Mohan Reddy
>
> On Thu, Mar 04, 2010 at 11:17:39AM -0500, Brian Haley wrote:
> > Mohan Reddy wrote:
> > > Hi,
> > >
> > > Is there a function or a way in kernel to get an interface ipv6 address if interface name or net_device object is known? I searched in the kernel i got a function ipv6_get_ifaddr(). But it is expecting an ipv6 address as a parameter.
> >
> > What type of IPv6 address? For link-locals you can use ipv6_get_lladdr(), but
> > for others ipv6_dev_get_saddr() is more comprehensive, but you'll need a
> > destination address. There's lots of reference code in addrconf.c to do
> > other things.
> >
> > -Brian
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-06 23:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-04 9:41 Help On function to get IPV6 address of an interface in kernel Mohan Reddy
2010-03-04 16:17 ` Brian Haley
2010-03-05 15:49 ` Venkata Mohan Reddy
2010-03-06 23:23 ` Mark Smith
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.