aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-02-02 11:23:24 +0000
committerJoão Valverde <j@v6e.pt>2017-02-04 21:26:11 +0000
commit55b3de86c2ea4e47e660820e78cd4434eede8b34 (patch)
tree35def2b0565099962387fe7de25a84894d243486
parent0b25b1ab072c559fc897348dce286ee32ff7308b (diff)
IPv6: Update SRH dissection to draft-*-05
Change-Id: Ia61e8ffb4499e2ea25e66e9e05a6d2881f15d6ae Reviewed-on: https://code.wireshark.org/review/19914 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--epan/dissectors/packet-ipv6.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 18e9ff246d..15e9de71e5 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -260,12 +260,12 @@ static int hf_ipv6_routing_rpl_fulladdr = -1;
static int hf_ipv6_routing_srh_first_seg = -1;
static int hf_ipv6_routing_srh_flags = -1;
-static int hf_ipv6_routing_srh_flag_c = -1;
+static int hf_ipv6_routing_srh_flag_unused1 = -1;
static int hf_ipv6_routing_srh_flag_p = -1;
static int hf_ipv6_routing_srh_flag_o = -1;
static int hf_ipv6_routing_srh_flag_a = -1;
static int hf_ipv6_routing_srh_flag_h = -1;
-static int hf_ipv6_routing_srh_flag_unused = -1;
+static int hf_ipv6_routing_srh_flag_unused2 = -1;
static int hf_ipv6_routing_srh_reserved = -1;
static int hf_ipv6_routing_srh_addr = -1;
@@ -1051,7 +1051,7 @@ dissect_routing6_rpl(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
}
/* Segment Routing Header (Type 4) */
-/* draft-ietf-6man-segment-routing-header-01 */
+/* draft-ietf-6man-segment-routing-header-05 */
static void
dissect_routing6_srh(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *rthdr_tree,
struct rthdr_proto_item *rthdr_ti, struct ip6_rthdr rt)
@@ -1063,12 +1063,12 @@ dissect_routing6_srh(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
const struct e_in6_addr *addr;
proto_tree *rthdr_srh_addr_tree;
static const int *srh_flags[] = {
- &hf_ipv6_routing_srh_flag_c,
+ &hf_ipv6_routing_srh_flag_unused1,
&hf_ipv6_routing_srh_flag_p,
&hf_ipv6_routing_srh_flag_o,
&hf_ipv6_routing_srh_flag_a,
&hf_ipv6_routing_srh_flag_h,
- &hf_ipv6_routing_srh_flag_unused,
+ &hf_ipv6_routing_srh_flag_unused2,
NULL
};
@@ -1082,11 +1082,11 @@ dissect_routing6_srh(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *
ett_ipv6_routing_srh_flags, srh_flags, ENC_BIG_ENDIAN);
expert_add_info_format(pinfo, ti, &ei_ipv6_routing_undecoded,
"Dissection for SRH TLVs not yet implemented");
- offset += 2;
-
- proto_tree_add_item(rthdr_tree, hf_ipv6_routing_srh_reserved, tvb, offset, 1, ENC_NA);
offset += 1;
+ proto_tree_add_item(rthdr_tree, hf_ipv6_routing_srh_reserved, tvb, offset, 2, ENC_NA);
+ offset += 2;
+
if (rt.ip6r_segleft > srh_first_seg) {
expert_add_info_format(pinfo, rthdr_ti->segs, &ei_ipv6_routing_invalid_segleft,
"IPv6 Type 4 Routing Header segments left field must not exceed first segment (%u)", srh_first_seg);
@@ -3202,37 +3202,37 @@ proto_register_ipv6(void)
},
{ &hf_ipv6_routing_srh_flags,
{ "Flags", "ipv6.routing.srh.flags",
- FT_UINT16, BASE_HEX, NULL, 0x0,
+ FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
- { &hf_ipv6_routing_srh_flag_c,
- { "Cleanup", "ipv6.routing.srh.flag_c",
- FT_BOOLEAN, 16, TFS(&tfs_true_false), 0x8000,
- NULL, HFILL }
+ { &hf_ipv6_routing_srh_flag_unused1,
+ { "Unused", "ipv6.routing.srh.flag_unused1",
+ FT_UINT8, BASE_HEX, NULL, 0x80,
+ "Unset on transmission and ignored on receipt", HFILL }
},
{ &hf_ipv6_routing_srh_flag_p,
{ "Protected", "ipv6.routing.srh.flag_p",
- FT_BOOLEAN, 16, TFS(&tfs_true_false), 0x4000,
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x40,
NULL, HFILL }
},
{ &hf_ipv6_routing_srh_flag_o,
{ "OAM", "ipv6.routing.srh.flag_o",
- FT_BOOLEAN, 16, TFS(&tfs_true_false), 0x2000,
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x20,
NULL, HFILL }
},
{ &hf_ipv6_routing_srh_flag_a,
{ "Alert", "ipv6.routing.srh.flag_a",
- FT_BOOLEAN, 16, TFS(&tfs_present_not_present), 0x1000,
+ FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x10,
NULL, HFILL }
},
{ &hf_ipv6_routing_srh_flag_h,
{ "HMAC", "ipv6.routing.srh.flag_h",
- FT_BOOLEAN, 16, TFS(&tfs_present_not_present), 0x0800,
+ FT_BOOLEAN, 8, TFS(&tfs_present_not_present), 0x08,
NULL, HFILL }
},
- { &hf_ipv6_routing_srh_flag_unused,
- { "Unused", "ipv6.routing.srh.flag_unused",
- FT_UINT16, BASE_HEX, NULL, 0x07FF,
+ { &hf_ipv6_routing_srh_flag_unused2,
+ { "Unused", "ipv6.routing.srh.flag_unused2",
+ FT_UINT8, BASE_HEX, NULL, 0x07,
NULL, HFILL }
},
{ &hf_ipv6_routing_srh_reserved,