From: Brian Haley <brian.haley@hp.com>
To: Mohan Reddy <mohanreddykv@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Help On function to get IPV6 address of an interface in kernel
Date: Thu, 04 Mar 2010 11:17:39 -0500 [thread overview]
Message-ID: <4B8FDD23.3070000@hp.com> (raw)
In-Reply-To: <20100304094103.GA6599@mohan-laptop>
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
next prev parent reply other threads:[~2010-03-04 16:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2010-03-05 15:49 ` Venkata Mohan Reddy
2010-03-06 23:23 ` Mark Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B8FDD23.3070000@hp.com \
--to=brian.haley@hp.com \
--cc=mohanreddykv@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).