diff options
| author | Amerigo Wang <amwang@redhat.com> | 2012-10-11 17:06:16 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-10-12 13:56:52 -0400 |
| commit | 28194fcdc150e4d5b418d01db3c29058f60ef32c (patch) | |
| tree | 9988b666e6551dff9f032f390ffe23a20b4c5227 | |
| parent | 8437e7610c2d3e06f87f71fb82e10ed4b291812a (diff) | |
net: add doc for in6_pton()
It is not easy to use in6_pton() correctly without reading
its definition, so add some doc for it.
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/core/utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/core/utils.c b/net/core/utils.c index f5613d569c23..30f3879faecc 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
| @@ -161,6 +161,18 @@ out: | |||
| 161 | } | 161 | } |
| 162 | EXPORT_SYMBOL(in4_pton); | 162 | EXPORT_SYMBOL(in4_pton); |
| 163 | 163 | ||
| 164 | /** | ||
| 165 | * in6_pton - convert an IPv6 address from literal to binary representation | ||
| 166 | * @src: the start of the IPv6 address string | ||
| 167 | * @srclen: the length of the string, -1 means strlen(src) | ||
| 168 | * @dst: the binary (u8[16] array) representation of the IPv6 address | ||
| 169 | * @delim: the delimiter of the IPv6 address in @src, -1 means no delimiter | ||
| 170 | * @end: A pointer to the end of the parsed string will be placed here | ||
| 171 | * | ||
| 172 | * Return one on success, return zero when any error occurs | ||
| 173 | * and @end will point to the end of the parsed string. | ||
| 174 | * | ||
| 175 | */ | ||
| 164 | int in6_pton(const char *src, int srclen, | 176 | int in6_pton(const char *src, int srclen, |
| 165 | u8 *dst, | 177 | u8 *dst, |
| 166 | int delim, const char **end) | 178 | int delim, const char **end) |
