Hi!
Here's a patch to update the HMIPv6 support to match
the latest draft (draft-ietf-mobileip-hmipv6-05.txt).
Martti
---
Martti Kuparinen <martti.kuparinen@xxxxxx> NetBSD - No media hype
http://www.iki.fi/~kuparine/ http://www.netbsd.org/
--- packet-icmpv6.c.orig Tue Jan 15 12:45:06 2002
+++ packet-icmpv6.c Tue Jan 15 12:48:58 2002
@@ -363,14 +363,11 @@
map = &mapbuf;
tvb_memcpy(tvb, (guint8 *)map, offset, sizeof *map);
proto_tree_add_text(icmp6opt_tree, tvb,
- offset + offsetof(struct nd_opt_map_info, nd_opt_map_distance),
- 1, "Distance: %u", map->nd_opt_map_distance);
+ offset + offsetof(struct nd_opt_map_info, nd_opt_map_dist_and_pref),
+ 1, "Distance: %u", (map->nd_opt_map_dist_and_pref >> 4));
proto_tree_add_text(icmp6opt_tree, tvb,
- offset + offsetof(struct nd_opt_map_info, nd_opt_map_preference),
- 1, "Preference: %u", map->nd_opt_map_preference);
- proto_tree_add_text(icmp6opt_tree, tvb,
- offset + offsetof(struct nd_opt_map_info, nd_opt_map_prefixlen),
- 1, "Prefix Length: %u", map->nd_opt_map_prefixlen);
+ offset + offsetof(struct nd_opt_map_info, nd_opt_map_dist_and_pref),
+ 1, "Preference: %u", (map->nd_opt_map_dist_and_pref & 0x0F));
flagoff = offset + offsetof(struct nd_opt_map_info,
nd_opt_map_flags);
tf = proto_tree_add_text(icmp6opt_tree, tvb, flagoff, 1,
@@ -393,6 +390,9 @@
proto_tree_add_text(field_tree, tvb, flagoff, 1, "%s",
decode_boolean_bitfield(map->nd_opt_map_flags,
ND_OPT_MAP_FLAG_P, 8, "P", "No P"));
+ proto_tree_add_text(field_tree, tvb, flagoff, 1, "%s",
+ decode_boolean_bitfield(map->nd_opt_map_flags,
+ ND_OPT_MAP_FLAG_V, 8, "V", "No V"));
proto_tree_add_text(icmp6opt_tree, tvb,
offset + offsetof(struct nd_opt_map_info, nd_opt_map_lifetime),
4, "Lifetime: %u", pntohl(&map->nd_opt_map_lifetime));
--- packet-ipv6.h.orig Tue Jan 15 12:45:06 2002
+++ packet-ipv6.h Tue Jan 15 12:45:54 2002
@@ -458,11 +458,8 @@
struct nd_opt_map_info { /* HMIPv6 MAP option */
guint8 nd_opt_map_type;
guint8 nd_opt_map_len;
- guint8 nd_opt_map_distance;
- guint8 nd_opt_map_preference;
- guint8 nd_opt_map_prefixlen;
+ guint8 nd_opt_map_dist_and_pref;
guint8 nd_opt_map_flags;
- guint16 nd_opt_map_unused;
guint32 nd_opt_map_lifetime;
struct e_in6_addr nd_opt_map_address;
};
@@ -472,6 +469,7 @@
#define ND_OPT_MAP_FLAG_I 0x20
#define ND_OPT_MAP_FLAG_T 0x10
#define ND_OPT_MAP_FLAG_P 0x08
+#define ND_OPT_MAP_FLAG_V 0x04
/*
* icmp6 node information