* [PATCH 1/2] net: add doc for in6_pton()
@ 2012-10-12 7:06 Cong Wang
2012-10-12 7:06 ` [PATCH 2/2] net: add doc for in4_pton() Cong Wang
2012-10-12 17:58 ` [PATCH 1/2] net: add doc for in6_pton() David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Cong Wang @ 2012-10-12 7:06 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, David S. Miller
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>
---
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 f5613d5..30f3879 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -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)
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] net: add doc for in4_pton()
2012-10-12 7:06 [PATCH 1/2] net: add doc for in6_pton() Cong Wang
@ 2012-10-12 7:06 ` Cong Wang
2012-10-12 17:59 ` David Miller
2012-10-12 17:58 ` [PATCH 1/2] net: add doc for in6_pton() David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Cong Wang @ 2012-10-12 7:06 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, David S. Miller
It is not easy to use in4_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>
---
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 30f3879..e3487e46 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -107,6 +107,18 @@ static inline int xdigit2bin(char c, int delim)
return IN6PTON_UNKNOWN;
}
+/**
+ * in4_pton - convert an IPv4 address from literal to binary representation
+ * @src: the start of the IPv4 address string
+ * @srclen: the length of the string, -1 means strlen(src)
+ * @dst: the binary (u8[4] array) representation of the IPv4 address
+ * @delim: the delimiter of the IPv4 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 in4_pton(const char *src, int srclen,
u8 *dst,
int delim, const char **end)
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] net: add doc for in6_pton()
2012-10-12 7:06 [PATCH 1/2] net: add doc for in6_pton() Cong Wang
2012-10-12 7:06 ` [PATCH 2/2] net: add doc for in4_pton() Cong Wang
@ 2012-10-12 17:58 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-10-12 17:58 UTC (permalink / raw)
To: amwang; +Cc: netdev
From: Cong Wang <amwang@redhat.com>
Date: Fri, 12 Oct 2012 15:06:16 +0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] net: add doc for in4_pton()
2012-10-12 7:06 ` [PATCH 2/2] net: add doc for in4_pton() Cong Wang
@ 2012-10-12 17:59 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-10-12 17:59 UTC (permalink / raw)
To: amwang; +Cc: netdev
From: Cong Wang <amwang@redhat.com>
Date: Fri, 12 Oct 2012 15:06:17 +0800
> It is not easy to use in4_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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-12 17:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12 7:06 [PATCH 1/2] net: add doc for in6_pton() Cong Wang
2012-10-12 7:06 ` [PATCH 2/2] net: add doc for in4_pton() Cong Wang
2012-10-12 17:59 ` David Miller
2012-10-12 17:58 ` [PATCH 1/2] net: add doc for in6_pton() David Miller
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).