diff options
author | Templin, Fred L <Fred.L.Templin@boeing.com> | 2008-03-11 18:35:59 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-04-02 21:05:58 -0400 |
commit | fadf6bf06069138f8e97c9a963be38348ba2708b (patch) | |
tree | a21470d3db41e5969143f5cd272bc6270dcb384a /include | |
parent | f0bdb7ba5af5a7028479e9067ee74e9d66eea6df (diff) |
[IPV6] SIT: Add PRL management for ISATAP.
This patch updates the Linux the Intra-Site Automatic Tunnel Addressing
Protocol (ISATAP) implementation. It places the ISATAP potential router
list (PRL) in the kernel and adds three new private ioctls for PRL
management.
[Add several changes of structure name, constant names etc. - yoshfuji]
Signed-off-by: Fred L. Templin <fred.l.templin@boeing.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_tunnel.h | 18 | ||||
-rw-r--r-- | include/linux/skbuff.h | 3 | ||||
-rw-r--r-- | include/net/ipip.h | 7 | ||||
-rw-r--r-- | include/net/ndisc.h | 9 |
4 files changed, 33 insertions, 4 deletions
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 228eb4eb3129..f20c224d544c 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -7,6 +7,9 @@ | |||
7 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) | 7 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
8 | #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) | 8 | #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) |
9 | #define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3) | 9 | #define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3) |
10 | #define SIOCADDPRL (SIOCDEVPRIVATE + 5) | ||
11 | #define SIOCDELPRL (SIOCDEVPRIVATE + 6) | ||
12 | #define SIOCCHGPRL (SIOCDEVPRIVATE + 7) | ||
10 | 13 | ||
11 | #define GRE_CSUM __constant_htons(0x8000) | 14 | #define GRE_CSUM __constant_htons(0x8000) |
12 | #define GRE_ROUTING __constant_htons(0x4000) | 15 | #define GRE_ROUTING __constant_htons(0x4000) |
@@ -17,9 +20,6 @@ | |||
17 | #define GRE_FLAGS __constant_htons(0x00F8) | 20 | #define GRE_FLAGS __constant_htons(0x00F8) |
18 | #define GRE_VERSION __constant_htons(0x0007) | 21 | #define GRE_VERSION __constant_htons(0x0007) |
19 | 22 | ||
20 | /* i_flags values for SIT mode */ | ||
21 | #define SIT_ISATAP 0x0001 | ||
22 | |||
23 | struct ip_tunnel_parm | 23 | struct ip_tunnel_parm |
24 | { | 24 | { |
25 | char name[IFNAMSIZ]; | 25 | char name[IFNAMSIZ]; |
@@ -31,4 +31,16 @@ struct ip_tunnel_parm | |||
31 | struct iphdr iph; | 31 | struct iphdr iph; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | /* SIT-mode i_flags */ | ||
35 | #define SIT_ISATAP 0x0001 | ||
36 | |||
37 | struct ip_tunnel_prl { | ||
38 | __be32 addr; | ||
39 | __u16 flags; | ||
40 | __u16 __reserved; | ||
41 | }; | ||
42 | |||
43 | /* PRL flags */ | ||
44 | #define PRL_DEFAULT 0x0001 | ||
45 | |||
34 | #endif /* _IF_TUNNEL_H_ */ | 46 | #endif /* _IF_TUNNEL_H_ */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index ff72145d5d9e..e10e55c9b081 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -313,7 +313,8 @@ struct sk_buff { | |||
313 | __u16 tc_verd; /* traffic control verdict */ | 313 | __u16 tc_verd; /* traffic control verdict */ |
314 | #endif | 314 | #endif |
315 | #endif | 315 | #endif |
316 | /* 2 byte hole */ | 316 | __u8 ndisc_nodetype:2; |
317 | /* 14 bit hole */ | ||
317 | 318 | ||
318 | #ifdef CONFIG_NET_DMA | 319 | #ifdef CONFIG_NET_DMA |
319 | dma_cookie_t dma_cookie; | 320 | dma_cookie_t dma_cookie; |
diff --git a/include/net/ipip.h b/include/net/ipip.h index 549e132bca9c..205536a014e8 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
@@ -24,6 +24,13 @@ struct ip_tunnel | |||
24 | int mlink; | 24 | int mlink; |
25 | 25 | ||
26 | struct ip_tunnel_parm parms; | 26 | struct ip_tunnel_parm parms; |
27 | struct ip_tunnel_prl_entry *prl; /* potential router list */ | ||
28 | }; | ||
29 | |||
30 | struct ip_tunnel_prl_entry | ||
31 | { | ||
32 | struct ip_tunnel_prl_entry *next; | ||
33 | struct ip_tunnel_prl entry; | ||
27 | }; | 34 | }; |
28 | 35 | ||
29 | #define IPTUNNEL_XMIT() do { \ | 36 | #define IPTUNNEL_XMIT() do { \ |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 5aedf324de66..9f2bae68d28c 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h | |||
@@ -12,6 +12,15 @@ | |||
12 | #define NDISC_REDIRECT 137 | 12 | #define NDISC_REDIRECT 137 |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * Router type: cross-layer information from link-layer to | ||
16 | * IPv6 layer reported by certain link types (e.g., RFC4214). | ||
17 | */ | ||
18 | #define NDISC_NODETYPE_UNSPEC 0 /* unspecified (default) */ | ||
19 | #define NDISC_NODETYPE_HOST 1 /* host or unauthorized router */ | ||
20 | #define NDISC_NODETYPE_NODEFAULT 2 /* non-default router */ | ||
21 | #define NDISC_NODETYPE_DEFAULT 3 /* default router */ | ||
22 | |||
23 | /* | ||
15 | * ndisc options | 24 | * ndisc options |
16 | */ | 25 | */ |
17 | 26 | ||