From: Masahide NAKAMURA <nakam@linux-ipv6.org>
To: shemminger@osdl.org
Cc: netdev@vger.kernel.org, Masahide NAKAMURA <nakam@linux-ipv6.org>
Subject: [PATCH 7/7] [IP] XFRM: Mobility header support.
Date: Tue, 5 Dec 2006 19:16:12 +0900 [thread overview]
Message-ID: <116531377212-git-send-email-nakam@linux-ipv6.org> (raw)
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
---
ip/ipxfrm.c | 9 +++++++++
ip/xfrm.h | 3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index 7c9fd0b..9c8b4bd 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -483,6 +483,14 @@ void xfrm_selector_print(struct xfrm_sel
if (sel->dport_mask)
fprintf(fp, "code %u ", ntohs(sel->dport));
break;
+ case IPPROTO_MH:
+ if (sel->sport_mask)
+ fprintf(fp, "type %u ", ntohs(sel->sport));
+ if (sel->dport_mask) {
+ if (show_stats > 0)
+ fprintf(fp, "(dport) 0x%.4x ", sel->dport);
+ }
+ break;
}
if (sel->ifindex > 0) {
@@ -1111,6 +1119,7 @@ static int xfrm_selector_upspec_parse(st
switch (sel->proto) {
case IPPROTO_ICMP:
case IPPROTO_ICMPV6:
+ case IPPROTO_MH:
break;
default:
fprintf(stderr, "\"type\" and \"code\" are invalid with proto=%s\n", strxf_proto(sel->proto));
diff --git a/ip/xfrm.h b/ip/xfrm.h
index d33ff94..03db37b 100644
--- a/ip/xfrm.h
+++ b/ip/xfrm.h
@@ -35,6 +35,9 @@ #endif
#ifndef IPPPROTO_DCCP
# define IPPROTO_DCCP 33
#endif
+#ifndef IPPROTO_MH
+# define IPPROTO_MH 135
+#endif
#define XFRMS_RTA(x) ((struct rtattr*)(((char*)(x)) + NLMSG_ALIGN(sizeof(struct xfrm_usersa_info))))
#define XFRMS_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct xfrm_usersa_info))
--
1.4.2
next reply other threads:[~2006-12-05 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-05 10:16 Masahide NAKAMURA [this message]
2006-12-05 18:11 ` [PATCH 7/7] [IP] XFRM: Mobility header support Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=116531377212-git-send-email-nakam@linux-ipv6.org \
--to=nakam@linux-ipv6.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).