Skip to content

Commit

Permalink
net: add doc for in6_pton()
Browse files Browse the repository at this point in the history
It is not easy to use in6_pton() correctly without reading
its definition, so add some doc for it.

Cc: David S. Miller <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Amerigo Wang authored and davem330 committed Oct 12, 2012
1 parent 8437e76 commit 28194fc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions net/core/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,18 @@ int in4_pton(const char *src, int srclen,
}
EXPORT_SYMBOL(in4_pton);

/**
* in6_pton - convert an IPv6 address from literal to binary representation
* @src: the start of the IPv6 address string
* @srclen: the length of the string, -1 means strlen(src)
* @dst: the binary (u8[16] array) representation of the IPv6 address
* @delim: the delimiter of the IPv6 address in @src, -1 means no delimiter
* @end: A pointer to the end of the parsed string will be placed here
*
* Return one on success, return zero when any error occurs
* and @end will point to the end of the parsed string.
*
*/
int in6_pton(const char *src, int srclen,
u8 *dst,
int delim, const char **end)
Expand Down

0 comments on commit 28194fc

Please sign in to comment.