summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-03-09 19:13:11 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2005-03-09 19:13:11 -0800
commit0f634eb32d3a5cba9d3411f23974962bb8f94bdd (patch)
treec30c1d4aa7eb159a8cc808b47409a595fe575b41 /include/net
parent6a1b925ddace110c6f91df7df0c725faba63d8ab (diff)
parent04db04202b006675c18c356aa69810f57e98a639 (diff)
Merge
Diffstat (limited to 'include/net')
-rw-r--r--include/net/addrconf.h2
-rw-r--r--include/net/dst.h9
-rw-r--r--include/net/ipv6.h26
-rw-r--r--include/net/ndisc.h14
-rw-r--r--include/net/neighbour.h3
5 files changed, 48 insertions, 6 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 591a29bc334b..7af9a13cb9be 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -102,6 +102,8 @@ extern int ipv6_is_mld(struct sk_buff *skb, int nexthdr);
extern void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len);
+extern int ipv6_get_hoplimit(struct net_device *dev);
+
/*
* anycast prototypes (anycast.c)
*/
diff --git a/include/net/dst.h b/include/net/dst.h
index 9bdf00279420..22e68ce4ca5c 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -134,6 +134,15 @@ static inline u32 dst_mtu(const struct dst_entry *dst)
return mtu;
}
+static inline u32
+dst_allfrag(const struct dst_entry *dst)
+{
+ int ret = dst_path_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG;
+ /* Yes, _exactly_. This is paranoia. */
+ barrier();
+ return ret;
+}
+
static inline int
dst_metric_locked(struct dst_entry *dst, int metric)
{
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 147d47ab7ca6..87c45cbfbaf6 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -305,6 +305,32 @@ static inline int ipv6_addr_equal(const struct in6_addr *a1,
a1->s6_addr32[3] == a2->s6_addr32[3]);
}
+static inline int __ipv6_prefix_equal(const u32 *a1, const u32 *a2,
+ unsigned int prefixlen)
+{
+ unsigned pdw, pbi;
+
+ /* check complete u32 in prefix */
+ pdw = prefixlen >> 5;
+ if (pdw && memcmp(a1, a2, pdw << 2))
+ return 0;
+
+ /* check incomplete u32 in prefix */
+ pbi = prefixlen & 0x1f;
+ if (pbi && ((a1[pdw] ^ a2[pdw]) & htonl((0xffffffff) << (32 - pbi))))
+ return 0;
+
+ return 1;
+}
+
+static inline int ipv6_prefix_equal(const struct in6_addr *a1,
+ const struct in6_addr *a2,
+ unsigned int prefixlen)
+{
+ return __ipv6_prefix_equal(a1->s6_addr32, a2->s6_addr32,
+ prefixlen);
+}
+
static inline int ipv6_addr_any(const struct in6_addr *a)
{
return ((a->s6_addr32[0] | a->s6_addr32[1] |
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 8f121905ea6d..f85d6e4b7442 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -15,11 +15,15 @@
* ndisc options
*/
-#define ND_OPT_SOURCE_LL_ADDR 1
-#define ND_OPT_TARGET_LL_ADDR 2
-#define ND_OPT_PREFIX_INFO 3
-#define ND_OPT_REDIRECT_HDR 4
-#define ND_OPT_MTU 5
+enum {
+ __ND_OPT_PREFIX_INFO_END = 0,
+ ND_OPT_SOURCE_LL_ADDR = 1, /* RFC2461 */
+ ND_OPT_TARGET_LL_ADDR = 2, /* RFC2461 */
+ ND_OPT_PREFIX_INFO = 3, /* RFC2461 */
+ ND_OPT_REDIRECT_HDR = 4, /* RFC2461 */
+ ND_OPT_MTU = 5, /* RFC2461 */
+ __ND_OPT_MAX
+};
#define MAX_RTR_SOLICITATION_DELAY HZ
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 4c9ddae8c866..4f33bbc21e7f 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -274,7 +274,8 @@ extern int neigh_sysctl_register(struct net_device *dev,
struct neigh_parms *p,
int p_id, int pdev_id,
char *p_name,
- proc_handler *proc_handler);
+ proc_handler *proc_handler,
+ ctl_handler *strategy);
extern void neigh_sysctl_unregister(struct neigh_parms *p);
static inline void __neigh_parms_put(struct neigh_parms *parms)