From 4d1e1e7876a811d2c8720009ae1261a7701a1fc2 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 18 Jun 2014 14:25:38 -0700 Subject: Sort the Ethernet pseudo-wire types so that they're together. Separating the "try to guess whether there's a control word" type from the "yes, there's a control word" and "no, there's not a control word" types is just a huge UI botch. Make it clearer that the default is "Ethernet pseudo-wire, try to guess whether there's a control word". Change-Id: I91cc526fc709ad102b22ca67f5a9d7c98fffa0cc Reviewed-on: https://code.wireshark.org/review/2414 Reviewed-by: Guy Harris --- epan/dissectors/packet-mpls.c | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'epan/dissectors/packet-mpls.c') diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c index 1a87a99a55..ebc10428b4 100644 --- a/epan/dissectors/packet-mpls.c +++ b/epan/dissectors/packet-mpls.c @@ -121,13 +121,13 @@ static dissector_handle_t dissector_pw_cesopsn; enum mpls_default_dissector_t { MDD_PW_ETH_HEUR = 0 + ,MDD_MPLS_PW_ETH_CW + ,MDD_MPLS_PW_ETH_NOCW ,MDD_PW_SATOP ,MDD_PW_CESOPSN ,MDD_MPLS_PW_FR_DLCI ,MDD_MPLS_PW_HDLC_NOCW_FRPORT ,MDD_MPLS_PW_HDLC_NOCW_HDLC_PPP - ,MDD_MPLS_PW_ETH_CW - ,MDD_MPLS_PW_ETH_NOCW ,MDD_MPLS_PW_GENERIC ,MDD_ITDM ,MDD_MPLS_PW_ATM_N1_CW @@ -157,21 +157,6 @@ static const enum_val_t mpls_default_payload_defs[] = { ,"Ethernet MPLS PW (CW is heuristically detected)" ,MDD_PW_ETH_HEUR }, - { - "mpls pw fr dlci" - ,"Frame relay DLCI MPLS PW" - ,MDD_MPLS_PW_FR_DLCI - }, - { - "mpls pw hdlc no_cw fr_port" - ,"HDLC MPLS PW (no CW), FR Port mode" - ,MDD_MPLS_PW_HDLC_NOCW_FRPORT - }, - { - "mpls pw hdlc no_cw hdlc payload_ppp" - ,"HDLC MPLS PW (no CW), HDLC mode, PPP payload" - ,MDD_MPLS_PW_HDLC_NOCW_HDLC_PPP - }, { "mpls pw ethernet cw" ,"Ethernet MPLS PW (with CW)" @@ -187,6 +172,21 @@ static const enum_val_t mpls_default_payload_defs[] = { ,"Generic MPLS PW (with Generic/Preferred MPLS CW)" ,MDD_MPLS_PW_GENERIC }, + { + "mpls pw fr dlci" + ,"Frame relay DLCI MPLS PW" + ,MDD_MPLS_PW_FR_DLCI + }, + { + "mpls pw hdlc no_cw fr_port" + ,"HDLC MPLS PW (no CW), FR Port mode" + ,MDD_MPLS_PW_HDLC_NOCW_FRPORT + }, + { + "mpls pw hdlc no_cw hdlc payload_ppp" + ,"HDLC MPLS PW (no CW), HDLC mode, PPP payload" + ,MDD_MPLS_PW_HDLC_NOCW_HDLC_PPP + }, { "itdm" ,"Internal TDM" @@ -228,7 +228,7 @@ static int hf_mpls_exp = -1; static int hf_mpls_bos = -1; static int hf_mpls_ttl = -1; -static gint mpls_default_payload = 0; +static gint mpls_default_payload = MDD_PW_ETH_HEUR; static int hf_mpls_pw_ach_ver = -1; static int hf_mpls_pw_ach_res = -1; @@ -656,6 +656,12 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case MDD_PW_ETH_HEUR: call_dissector(dissector_pw_eth_heuristic, next_tvb, pinfo, tree); break; + case MDD_MPLS_PW_ETH_CW: + call_dissector(dissector_pw_eth_cw, next_tvb, pinfo, tree); + break; + case MDD_MPLS_PW_ETH_NOCW: + call_dissector(dissector_pw_eth_nocw, next_tvb, pinfo, tree); + break; case MDD_MPLS_PW_FR_DLCI: call_dissector(dissector_pw_fr, next_tvb, pinfo, tree); break; @@ -665,12 +671,6 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case MDD_MPLS_PW_HDLC_NOCW_HDLC_PPP: call_dissector(dissector_pw_hdlc_nocw_hdlc_ppp,next_tvb, pinfo, tree); break; - case MDD_MPLS_PW_ETH_CW: - call_dissector(dissector_pw_eth_cw, next_tvb, pinfo, tree); - break; - case MDD_MPLS_PW_ETH_NOCW: - call_dissector(dissector_pw_eth_nocw, next_tvb, pinfo, tree); - break; case MDD_ITDM: call_dissector(dissector_itdm, next_tvb, pinfo, tree); break; -- cgit v1.2.3