]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: add doc for in6_pton()
authorAmerigo Wang <amwang@redhat.com>
Thu, 11 Oct 2012 21:06:16 +0000 (21:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 Oct 2012 17:56:52 +0000 (13:56 -0400)
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>
net/core/utils.c

index f5613d569c23a17a806d8579d08a3b103735a84a..30f3879faecc4a61a7de2e419be063ed38603070 100644 (file)
@@ -161,6 +161,18 @@ out:
 }
 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)