aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-03-30 17:48:58 -0700
committerGuy Harris <guy@alum.mit.edu>2017-03-31 00:50:09 +0000
commitfb97e82cbe1f177034e8129c9bb48f5b30270003 (patch)
tree00b88bed3132f1d1054a70b3fd251320e5a266c5
parent0ea51ad82256f833a0d93efb16aa4e749c80eb5b (diff)
Distinguish between the two flavors of ITU-T AFIs.
As ISO 8348/X.213 Annex A says: A.5.2.1.2 Format and allocation of the IDI A specific combination of IDI format and DSP abstract syntax is associated with each allocated AFI value, as summarized for use in individual addresses in Table A.4 (the corresponding AFI values for use in group addresses is found via Table A.2). Two AFI values are associated with each combination that involves a variable-length IDI format. In each case, both of the AFI values identify the same combination of IDI format and DSP abstract syntax. The numerically lower AFI value is used when the first significant digit in the IDI is non-zero. The numerically greater AFI value is used when the first significant digit in the IDI is zero. and A.5.3 talks further about this. Change-Id: I3fdad04064451b3c891731dc8f107bc57586eb84 Reviewed-on: https://code.wireshark.org/review/20802 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/dissectors/packet-arp.c10
-rw-r--r--epan/dissectors/packet-isup.c68
-rw-r--r--epan/osi-utils.h65
3 files changed, 72 insertions, 71 deletions
diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c
index 25fe890423..4a83c98dd8 100644
--- a/epan/dissectors/packet-arp.c
+++ b/epan/dissectors/packet-arp.c
@@ -557,8 +557,8 @@ static const value_string atm_nsap_afi_vals[] = {
{ NSAP_IDI_ISO_DCC_DEC_GROUP, "DCC ATM group format"},
{ NSAP_IDI_ISO_6523_ICD_BIN, "ICD ATM format"},
{ NSAP_IDI_ISO_6523_ICD_BIN_GROUP, "ICD ATM group format"},
- { NSAP_IDI_E_164_BIN, "E.164 ATM format"},
- { NSAP_IDI_E_164_BIN_GROUP, "E.164 ATM group format"},
+ { NSAP_IDI_E_164_BIN_FSD_NZ, "E.164 ATM format"},
+ { NSAP_IDI_E_164_BIN_FSD_NZ_GROUP, "E.164 ATM group format"},
{ 0, NULL}
};
@@ -595,9 +595,9 @@ dissect_atm_nsap(tvbuff_t *tvb, packet_info* pinfo, int offset, int len, proto_t
proto_tree_add_item(tree, hf_atmarp_src_atm_selector, tvb, offset + 19, 1, ENC_BIG_ENDIAN);
break;
- case NSAP_IDI_E_164_BIN: /* E.164 ATM format */
- case NSAP_IDI_E_164_BIN_GROUP: /* E.164 ATM group format */
- proto_tree_add_item(tree, (afi == NSAP_IDI_E_164_BIN_GROUP) ? hf_atmarp_src_atm_e_164_isdn_group : hf_atmarp_src_atm_e_164_isdn,
+ case NSAP_IDI_E_164_BIN_FSD_NZ: /* E.164 ATM format */
+ case NSAP_IDI_E_164_BIN_FSD_NZ_GROUP: /* E.164 ATM group format */
+ proto_tree_add_item(tree, (afi == NSAP_IDI_E_164_BIN_FSD_NZ_GROUP) ? hf_atmarp_src_atm_e_164_isdn_group : hf_atmarp_src_atm_e_164_isdn,
tvb, offset + 1, 8, ENC_NA);
proto_tree_add_item(tree, hf_atmarp_src_atm_high_order_dsp, tvb, offset + 9, 4, ENC_NA);
proto_tree_add_item(tree, hf_atmarp_src_atm_end_system_identifier, tvb, offset + 13, 6, ENC_NA);
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index f41c978437..5ab029f7c3 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -4075,60 +4075,60 @@ dissect_isup_access_transport_parameter(tvbuff_t *parameter_tvb, proto_tree *par
static const value_string x213_afi_value[] = {
{ NSAP_IDI_IANA_ICP_DEC, "IANA ICP, decimal"},
{ NSAP_IDI_IANA_ICP_BIN, "IANA ICP, binary"},
- { NSAP_IDI_X_121_DEC, "X.121, decimal"},
- { NSAP_IDI_X_121_BIN, "X.121, binary"},
+ { NSAP_IDI_X_121_DEC_FSD_NZ, "X.121, decimal, first significant digit non-zero"},
+ { NSAP_IDI_X_121_BIN_FSD_NZ, "X.121, binary, first significant digit non-zero"},
{ NSAP_IDI_ISO_DCC_DEC, "ISO DCC, decimal"},
{ NSAP_IDI_ISO_DCC_BIN, "ISO DCC, binary"},
- { NSAP_IDI_F_69_DEC, "F.69, decimal"},
- { NSAP_IDI_F_69_BIN, "F.69, binary"},
- { NSAP_IDI_E_163_DEC, "E.163, decimal"},
- { NSAP_IDI_E_163_BIN, "E.163, binary"},
- { NSAP_IDI_E_164_DEC, "E.164, decimal"},
- { NSAP_IDI_E_164_BIN, "E.164, binary"},
+ { NSAP_IDI_F_69_DEC_FSD_NZ, "F.69, decimal, first significant digit non-zero"},
+ { NSAP_IDI_F_69_BIN_FSD_NZ, "F.69, binary, first significant digit non-zero"},
+ { NSAP_IDI_E_163_DEC_FSD_NZ, "E.163, decimal, first significant digit non-zero"},
+ { NSAP_IDI_E_163_BIN_FSD_NZ, "E.163, binary, first significant digit non-zero"},
+ { NSAP_IDI_E_164_DEC_FSD_NZ, "E.164, decimal, first significant digit non-zero"},
+ { NSAP_IDI_E_164_BIN_FSD_NZ, "E.164, binary, first significant digit non-zero"},
{ NSAP_IDI_ISO_6523_ICD_DEC, "ISO 6523-ICD, decimal"},
{ NSAP_IDI_ISO_6523_ICD_BIN, "ISO 6523-ICD, binary"},
{ NSAP_IDI_LOCAL_DEC, "Local, decimal"},
{ NSAP_IDI_LOCAL_BIN, "Local, binary"},
{ NSAP_IDI_LOCAL_ISO_646_CHAR, "Local, ISO/IEC 646 character"},
{ NSAP_IDI_LOCAL_NATIONAL_CHAR, "Local, National character"},
- { NSAP_IDI_X_121_DEC_2, "X.121, decimal"},
- { NSAP_IDI_X_121_BIN_2, "X.121, binary"},
- { NSAP_IDI_F_69_DEC_2, "F.69, decimal"},
- { NSAP_IDI_F_69_BIN_2, "F.69, binary"},
- { NSAP_IDI_E_163_DEC_2, "E.163, decimal"},
- { NSAP_IDI_E_163_BIN_2, "E.163, binary"},
- { NSAP_IDI_E_164_DEC_2, "E.164, decimal"},
- { NSAP_IDI_E_164_BIN_2, "E.164, binary"},
+ { NSAP_IDI_X_121_DEC_FSD_Z, "X.121, decimal, first significant digit zero"},
+ { NSAP_IDI_X_121_BIN_FSD_Z, "X.121, binary, first significant digit zero"},
+ { NSAP_IDI_F_69_DEC_FSD_Z, "F.69, decimal, first significant digit zero"},
+ { NSAP_IDI_F_69_BIN_FSD_Z, "F.69, binary, first significant digit zero"},
+ { NSAP_IDI_E_163_DEC_FSD_Z, "E.163, decimal, first significant digit zero"},
+ { NSAP_IDI_E_163_BIN_FSD_Z, "E.163, binary, first significant digit zero"},
+ { NSAP_IDI_E_164_DEC_FSD_Z, "E.164, decimal, first significant digit zero"},
+ { NSAP_IDI_E_164_BIN_FSD_Z, "E.164, binary, first significant digit zero"},
{ NSAP_IDI_ITU_T_IND_DEC, "ITU-T IND, decimal"},
{ NSAP_IDI_ITU_T_IND_BIN, "ITU-T IND, binary"},
{ NSAP_IDI_IANA_ICP_DEC_GROUP, "IANA ICP Group no, decimal"},
{ NSAP_IDI_IANA_ICP_BIN_GROUP, "IANA ICP Group no, binary"},
- { NSAP_IDI_X_121_DEC_GROUP, "X.121 Group no, decimal"},
- { NSAP_IDI_X_121_BIN_GROUP, "X.121 Group no, binary"},
+ { NSAP_IDI_X_121_DEC_FSD_NZ_GROUP, "X.121 Group no, decimal, first significant digit non-zero"},
+ { NSAP_IDI_X_121_BIN_FSD_NZ_GROUP, "X.121 Group no, binary, first significant digit non-zero"},
{ NSAP_IDI_ISO_DCC_DEC_GROUP, "ISO DCC Group no, decimal"},
{ NSAP_IDI_ISO_DCC_BIN_GROUP, "ISO DCC Group no, binary"},
- { NSAP_IDI_F_69_DEC_GROUP, "F.69 Group no, decimal"},
- { NSAP_IDI_F_69_BIN_GROUP, "F.69 Group no, binary"},
- { NSAP_IDI_E_163_DEC_GROUP, "E.163 Group no, decimal"},
- { NSAP_IDI_E_163_BIN_GROUP, "E.163 Group no, binary"},
- { NSAP_IDI_E_164_DEC_GROUP, "E.164 Group no, decimal"},
- { NSAP_IDI_E_164_BIN_GROUP, "E.164 Group no, binary"},
+ { NSAP_IDI_F_69_DEC_FSD_NZ_GROUP, "F.69 Group no, decimal, first significant digit non-zero"},
+ { NSAP_IDI_F_69_BIN_FSD_NZ_GROUP, "F.69 Group no, binary, first significant digit non-zero"},
+ { NSAP_IDI_E_163_DEC_FSD_NZ_GROUP, "E.163 Group no, decimal, first significant digit non-zero"},
+ { NSAP_IDI_E_163_BIN_FSD_NZ_GROUP, "E.163 Group no, binary, first significant digit non-zero"},
+ { NSAP_IDI_E_164_DEC_FSD_NZ_GROUP, "E.164 Group no, decimal, first significant digit non-zero"},
+ { NSAP_IDI_E_164_BIN_FSD_NZ_GROUP, "E.164 Group no, binary, first significant digit non-zero"},
{ NSAP_IDI_ISO_6523_ICD_DEC_GROUP, "ISO 6523-ICD Group no, decimal"},
{ NSAP_IDI_ISO_6523_ICD_BIN_GROUP, "ISO 6523-ICD Group no, binary"},
{ NSAP_IDI_LOCAL_DEC_GROUP, "Local Group no, decimal"},
{ NSAP_IDI_LOCAL_BIN_GROUP, "Local Group no, binary"},
{ NSAP_IDI_LOCAL_ISO_646_CHAR_GROUP, "Local Group no, ISO/IEC 646 character"},
{ NSAP_IDI_LOCAL_NATIONAL_CHAR_GROUP, "Local Group no, national character"},
- { NSAP_IDI_X_121_DEC_2_GROUP, "X.121 Group no, decimal"},
- { NSAP_IDI_X_121_BIN_2_GROUP, "X.121 Group no, binary"},
- { NSAP_IDI_X_121_DEC_2_GROUP, "F.69 Group no, decimal"},
- { NSAP_IDI_X_121_BIN_2_GROUP, "F.69 Group no, binary"},
- { NSAP_IDI_E_163_DEC_2_GROUP, "E.163 Group no, decimal"},
- { NSAP_IDI_E_163_BIN_2_GROUP, "E.163 Group no, binary"},
- { NSAP_IDI_E_164_DEC_2_GROUP, "E.164 Group no, decimal"},
- { NSAP_IDI_E_164_BIN_2_GROUP, "E.163 Group no, binary"},
+ { NSAP_IDI_X_121_DEC_FSD_Z_GROUP, "X.121 Group no, decimal, first significant digit zero"},
+ { NSAP_IDI_X_121_BIN_FSD_Z_GROUP, "X.121 Group no, binary, first significant digit zero"},
+ { NSAP_IDI_X_121_DEC_FSD_Z_GROUP, "F.69 Group no, decimal, first significant digit zero"},
+ { NSAP_IDI_X_121_BIN_FSD_Z_GROUP, "F.69 Group no, binary, first significant digit zero"},
+ { NSAP_IDI_E_163_DEC_FSD_Z_GROUP, "E.163 Group no, decimal, first significant digit zero"},
+ { NSAP_IDI_E_163_BIN_FSD_Z_GROUP, "E.163 Group no, binary, first significant digit zero"},
+ { NSAP_IDI_E_164_DEC_FSD_Z_GROUP, "E.164 Group no, decimal, first significant digit zero"},
+ { NSAP_IDI_E_164_BIN_FSD_Z_GROUP, "E.163 Group no, binary, first significant digit zero"},
{ NSAP_IDI_ITU_T_IND_DEC_GROUP, "ITU-T IND Group no, decimal"},
{ NSAP_IDI_ITU_T_IND_BIN_GROUP, "ITU-T IND Group no, binary"},
@@ -4180,8 +4180,8 @@ dissect_nsap(tvbuff_t *parameter_tvb, gint offset, gint len, proto_tree *paramet
}
break;
- case NSAP_IDI_E_164_BIN: /* E.164 ATM format */
- case 0xC3: /* E.164 ATM group format */
+ case NSAP_IDI_E_164_BIN_FSD_NZ: /* E.164 ATM format */
+ case NSAP_IDI_E_164_BIN_FSD_NZ_GROUP: /* E.164 ATM group format */
proto_tree_add_item(parameter_tree, hf_isup_idp, parameter_tvb, offset, 9, ENC_NA);
proto_tree_add_uint(parameter_tree, hf_afi, parameter_tvb, offset, 1, afi);
diff --git a/epan/osi-utils.h b/epan/osi-utils.h
index f28b1770cf..a563c447ff 100644
--- a/epan/osi-utils.h
+++ b/epan/osi-utils.h
@@ -44,21 +44,22 @@
/*
* NSAP AFI values.
+ * See ISO/IEC 8348 (2001-10)/X.213 (10/2001) Annex A.
*
* Individual values.
*/
#define NSAP_IDI_IANA_ICP_DEC 0x34 /* IANA ICP, decimal */
#define NSAP_IDI_IANA_ICP_BIN 0x35 /* IANA ICP, binary */
-#define NSAP_IDI_X_121_DEC 0x36 /* X.121, decimal */
-#define NSAP_IDI_X_121_BIN 0x37 /* X.121, binary */
+#define NSAP_IDI_X_121_DEC_FSD_NZ 0x36 /* X.121, decimal, IDI first significant digit non-zero */
+#define NSAP_IDI_X_121_BIN_FSD_NZ 0x37 /* X.121, binary, IDI first significant digit non-zero */
#define NSAP_IDI_ISO_DCC_DEC 0x38 /* ISO DCC, decimal */
#define NSAP_IDI_ISO_DCC_BIN 0x39 /* ISO DCC, binary */
-#define NSAP_IDI_F_69_DEC 0x40 /* F.69, decimal */
-#define NSAP_IDI_F_69_BIN 0x41 /* F.69, binary */
-#define NSAP_IDI_E_163_DEC 0x42 /* E.163, decimal */
-#define NSAP_IDI_E_163_BIN 0x43 /* E.163, binary */
-#define NSAP_IDI_E_164_DEC 0x44 /* E.163, decimal */
-#define NSAP_IDI_E_164_BIN 0x45 /* E.163, binary */
+#define NSAP_IDI_F_69_DEC_FSD_NZ 0x40 /* F.69, decimal, IDI first significant digit non-zero */
+#define NSAP_IDI_F_69_BIN_FSD_NZ 0x41 /* F.69, binary, IDI first significant digit non-zero */
+#define NSAP_IDI_E_163_DEC_FSD_NZ 0x42 /* E.163, decimal, IDI first significant digit non-zero */
+#define NSAP_IDI_E_163_BIN_FSD_NZ 0x43 /* E.163, binary, IDI first significant digit non-zero */
+#define NSAP_IDI_E_164_DEC_FSD_NZ 0x44 /* E.163, decimal, IDI first significant digit non-zero */
+#define NSAP_IDI_E_164_BIN_FSD_NZ 0x45 /* E.163, binary, IDI first significant digit non-zero */
#define NSAP_IDI_ISO_6523_ICD_DEC 0x46 /* ISO 6523-ICD, decimal */
#define NSAP_IDI_ISO_6523_ICD_BIN 0x47 /* ISO 6523-ICD, binary */
//#define NSAP_IDI_GOSIP2 0x47
@@ -66,14 +67,14 @@
#define NSAP_IDI_LOCAL_BIN 0x49 /* Local, decimal */
#define NSAP_IDI_LOCAL_ISO_646_CHAR 0x50 /* Local, ISO/IEC 646 character */
#define NSAP_IDI_LOCAL_NATIONAL_CHAR 0x51 /* Local, national character */
-#define NSAP_IDI_X_121_DEC_2 0x52 /* X.121, decimal */
-#define NSAP_IDI_X_121_BIN_2 0x53 /* X.121, binary */
-#define NSAP_IDI_F_69_DEC_2 0x54 /* F.69, decimal */
-#define NSAP_IDI_F_69_BIN_2 0x55 /* F.69, binary */
-#define NSAP_IDI_E_163_DEC_2 0x56 /* E.163, decimal */
-#define NSAP_IDI_E_163_BIN_2 0x57 /* E.163, binary */
-#define NSAP_IDI_E_164_DEC_2 0x58 /* E.163, decimal */
-#define NSAP_IDI_E_164_BIN_2 0x59 /* E.163, binary */
+#define NSAP_IDI_X_121_DEC_FSD_Z 0x52 /* X.121, decimal, IDI first significant digit zero */
+#define NSAP_IDI_X_121_BIN_FSD_Z 0x53 /* X.121, binary, IDI first significant digit zero */
+#define NSAP_IDI_F_69_DEC_FSD_Z 0x54 /* F.69, decimal, IDI first significant digit zero */
+#define NSAP_IDI_F_69_BIN_FSD_Z 0x55 /* F.69, binary, IDI first significant digit zero */
+#define NSAP_IDI_E_163_DEC_FSD_Z 0x56 /* E.163, decimal, IDI first significant digit zero */
+#define NSAP_IDI_E_163_BIN_FSD_Z 0x57 /* E.163, binary, IDI first significant digit zero */
+#define NSAP_IDI_E_164_DEC_FSD_Z 0x58 /* E.163, decimal, IDI first significant digit zero */
+#define NSAP_IDI_E_164_BIN_FSD_Z 0x59 /* E.163, binary, IDI first significant digit zero */
#define NSAP_IDI_ITU_T_IND_DEC 0x76 /* ITU-T IND, decimal */
#define NSAP_IDI_ITU_T_IND_BIN 0x77 /* ITU-T IND, binary */
@@ -82,30 +83,30 @@
*/
#define NSAP_IDI_IANA_ICP_DEC_GROUP 0xB8 /* IANA ICP, decimal */
#define NSAP_IDI_IANA_ICP_BIN_GROUP 0xB9 /* IANA ICP, binary */
-#define NSAP_IDI_X_121_DEC_GROUP 0xBA /* X.121, decimal */
-#define NSAP_IDI_X_121_BIN_GROUP 0xBB /* X.121, binary */
+#define NSAP_IDI_X_121_DEC_FSD_NZ_GROUP 0xBA /* X.121, decimal */
+#define NSAP_IDI_X_121_BIN_FSD_NZ_GROUP 0xBB /* X.121, binary */
#define NSAP_IDI_ISO_DCC_DEC_GROUP 0xBC /* ISO DCC, decimal */
#define NSAP_IDI_ISO_DCC_BIN_GROUP 0xBD /* ISO DCC, binary */
-#define NSAP_IDI_F_69_DEC_GROUP 0xBE /* F.69, decimal */
-#define NSAP_IDI_F_69_BIN_GROUP 0xBF /* F.69, binary */
-#define NSAP_IDI_E_163_DEC_GROUP 0xC0 /* E.163, decimal */
-#define NSAP_IDI_E_163_BIN_GROUP 0xC1 /* E.163, binary */
-#define NSAP_IDI_E_164_DEC_GROUP 0xC2 /* E.163, decimal */
-#define NSAP_IDI_E_164_BIN_GROUP 0xC3 /* E.163, binary */
+#define NSAP_IDI_F_69_DEC_FSD_NZ_GROUP 0xBE /* F.69, decimal */
+#define NSAP_IDI_F_69_BIN_FSD_NZ_GROUP 0xBF /* F.69, binary */
+#define NSAP_IDI_E_163_DEC_FSD_NZ_GROUP 0xC0 /* E.163, decimal */
+#define NSAP_IDI_E_163_BIN_FSD_NZ_GROUP 0xC1 /* E.163, binary */
+#define NSAP_IDI_E_164_DEC_FSD_NZ_GROUP 0xC2 /* E.163, decimal */
+#define NSAP_IDI_E_164_BIN_FSD_NZ_GROUP 0xC3 /* E.163, binary */
#define NSAP_IDI_ISO_6523_ICD_DEC_GROUP 0xC4 /* ISO 6523-ICD, decimal */
#define NSAP_IDI_ISO_6523_ICD_BIN_GROUP 0xC5 /* ISO 6523-ICD, binary */
#define NSAP_IDI_LOCAL_DEC_GROUP 0xC6 /* Local, decimal */
#define NSAP_IDI_LOCAL_BIN_GROUP 0xC7 /* Local, decimal */
#define NSAP_IDI_LOCAL_ISO_646_CHAR_GROUP 0xC8 /* Local, ISO/IEC 646 character */
#define NSAP_IDI_LOCAL_NATIONAL_CHAR_GROUP 0xC9 /* Local, national character */
-#define NSAP_IDI_X_121_DEC_2_GROUP 0xCA /* X.121, decimal */
-#define NSAP_IDI_X_121_BIN_2_GROUP 0xCB /* X.121, binary */
-#define NSAP_IDI_F_69_DEC_2_GROUP 0xCC /* F.69, decimal */
-#define NSAP_IDI_F_69_BIN_2_GROUP 0xCD /* F.69, binary */
-#define NSAP_IDI_E_163_DEC_2_GROUP 0xCE /* E.163, decimal */
-#define NSAP_IDI_E_163_BIN_2_GROUP 0xCF /* E.163, binary */
-#define NSAP_IDI_E_164_DEC_2_GROUP 0xD0 /* E.163, decimal */
-#define NSAP_IDI_E_164_BIN_2_GROUP 0xD1 /* E.163, binary */
+#define NSAP_IDI_X_121_DEC_FSD_Z_GROUP 0xCA /* X.121, decimal, IDI first significant digit zero */
+#define NSAP_IDI_X_121_BIN_FSD_Z_GROUP 0xCB /* X.121, binary, IDI first significant digit zero */
+#define NSAP_IDI_F_69_DEC_FSD_Z_GROUP 0xCC /* F.69, decimal, IDI first significant digit zero */
+#define NSAP_IDI_F_69_BIN_FSD_Z_GROUP 0xCD /* F.69, binary, IDI first significant digit zero */
+#define NSAP_IDI_E_163_DEC_FSD_Z_GROUP 0xCE /* E.163, decimal, IDI first significant digit zero */
+#define NSAP_IDI_E_163_BIN_FSD_Z_GROUP 0xCF /* E.163, binary, IDI first significant digit zero */
+#define NSAP_IDI_E_164_DEC_FSD_Z_GROUP 0xD0 /* E.163, decimal, IDI first significant digit zero */
+#define NSAP_IDI_E_164_BIN_FSD_Z_GROUP 0xD1 /* E.163, binary, IDI first significant digit zero */
#define NSAP_IDI_ITU_T_IND_DEC_GROUP 0xE2 /* ITU-T IND, decimal */
#define NSAP_IDI_ITU_T_IND_BIN_GROUP 0xE3 /* ITU-T IND, binary */