aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2006-01-13 17:29:07 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-13 17:29:07 -0500
commit46b86a2da0fd14bd49765330df63a62279833acb (patch)
tree069b4741a970db9b03772a870b4d63398b1f56e0 /include
parent23b0ca5bf52cef0ab0f0fe247cb91cbef836e7eb (diff)
[NET]: Use NIP6_FMT in kernel.h
There are errors and inconsistency in the display of NIP6 strings. ie: net/ipv6/ip6_flowlabel.c There are errors and inconsistency in the display of NIPQUAD strings too. ie: net/netfilter/nf_conntrack_ftp.c This patch: adds NIP6_FMT to kernel.h changes all code to use NIP6_FMT fixes net/ipv6/ip6_flowlabel.c adds NIPQUAD_FMT to kernel.h fixes net/netfilter/nf_conntrack_ftp.c changes a few uses of "%u.%u.%u.%u" to NIPQUAD_FMT for symmetry to NIP6_FMT Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h2
-rw-r--r--include/net/sctp/sctp.h4
3 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index e6ee2d95da7a..323924edb26a 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -216,6 +216,7 @@ extern void dump_stack(void);
216 ((unsigned char *)&addr)[1], \ 216 ((unsigned char *)&addr)[1], \
217 ((unsigned char *)&addr)[2], \ 217 ((unsigned char *)&addr)[2], \
218 ((unsigned char *)&addr)[3] 218 ((unsigned char *)&addr)[3]
219#define NIPQUAD_FMT "%u.%u.%u.%u"
219 220
220#define NIP6(addr) \ 221#define NIP6(addr) \
221 ntohs((addr).s6_addr16[0]), \ 222 ntohs((addr).s6_addr16[0]), \
@@ -226,6 +227,7 @@ extern void dump_stack(void);
226 ntohs((addr).s6_addr16[5]), \ 227 ntohs((addr).s6_addr16[5]), \
227 ntohs((addr).s6_addr16[6]), \ 228 ntohs((addr).s6_addr16[6]), \
228 ntohs((addr).s6_addr16[7]) 229 ntohs((addr).s6_addr16[7])
230#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
229 231
230#if defined(__LITTLE_ENDIAN) 232#if defined(__LITTLE_ENDIAN)
231#define HIPQUAD(addr) \ 233#define HIPQUAD(addr) \
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index 14ce790e5c65..530ef1f75283 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -111,7 +111,7 @@ struct nf_conntrack_tuple
111#ifdef __KERNEL__ 111#ifdef __KERNEL__
112 112
113#define NF_CT_DUMP_TUPLE(tp) \ 113#define NF_CT_DUMP_TUPLE(tp) \
114DEBUGP("tuple %p: %u %u %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x %hu -> %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x %hu\n", \ 114DEBUGP("tuple %p: %u %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n", \
115 (tp), (tp)->src.l3num, (tp)->dst.protonum, \ 115 (tp), (tp)->src.l3num, (tp)->dst.protonum, \
116 NIP6(*(struct in6_addr *)(tp)->src.u3.all), ntohs((tp)->src.u.all), \ 116 NIP6(*(struct in6_addr *)(tp)->src.u3.all), ntohs((tp)->src.u.all), \
117 NIP6(*(struct in6_addr *)(tp)->dst.u3.all), ntohs((tp)->dst.u.all)) 117 NIP6(*(struct in6_addr *)(tp)->dst.u3.all), ntohs((tp)->dst.u.all))
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 8f241216f46b..a553f39f6aee 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -225,13 +225,13 @@ extern int sctp_debug_flag;
225 if (sctp_debug_flag) { \ 225 if (sctp_debug_flag) { \
226 if (saddr->sa.sa_family == AF_INET6) { \ 226 if (saddr->sa.sa_family == AF_INET6) { \
227 printk(KERN_DEBUG \ 227 printk(KERN_DEBUG \
228 lead "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x" trail, \ 228 lead NIP6_FMT trail, \
229 leadparm, \ 229 leadparm, \
230 NIP6(saddr->v6.sin6_addr), \ 230 NIP6(saddr->v6.sin6_addr), \
231 otherparms); \ 231 otherparms); \
232 } else { \ 232 } else { \
233 printk(KERN_DEBUG \ 233 printk(KERN_DEBUG \
234 lead "%u.%u.%u.%u" trail, \ 234 lead NIPQUAD_FMT trail, \
235 leadparm, \ 235 leadparm, \
236 NIPQUAD(saddr->v4.sin_addr.s_addr), \ 236 NIPQUAD(saddr->v4.sin_addr.s_addr), \
237 otherparms); \ 237 otherparms); \