aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-02-03 22:29:46 +0000
committerJoão Valverde <j@v6e.pt>2016-02-03 23:21:05 +0000
commit7935816b283bdd003ce8338ca594d4cbd151bd94 (patch)
tree8a5d7d91f1eb21c72d778cedc7a8cee8b938ad0c
parentee864219ff46c65c12df607364dcfc5b4a8710bd (diff)
LCSAP: Sync ASN.1 template and add missing braces
Change-Id: Iaddfa41e71ea28dd935bf777214764381928baa5 Reviewed-on: https://code.wireshark.org/review/13700 Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--asn1/lcsap/lcsap.cnf19
-rw-r--r--epan/dissectors/packet-lcsap.c39
2 files changed, 27 insertions, 31 deletions
diff --git a/asn1/lcsap/lcsap.cnf b/asn1/lcsap/lcsap.cnf
index 93c080c56a..69514c3c5d 100644
--- a/asn1/lcsap/lcsap.cnf
+++ b/asn1/lcsap/lcsap.cnf
@@ -96,20 +96,19 @@ ProtocolIE-Field/value ie_field_value
#.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode
#.FN_FTR ProcedureCode
- guint8 tmp = tvb_get_guint8(tvb, 0);
+ {
+ guint8 tmp = tvb_get_guint8(tvb, 0);
- if(tmp == 0)
-
- col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sReq",
- val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
-
- else if(tmp == 32)
- col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sResp",
- val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
+ if (tmp == 0)
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sReq",
+ val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
+ else if (tmp == 32)
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sResp",
+ val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
else
col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s",
val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
-
+ }
#.END
diff --git a/epan/dissectors/packet-lcsap.c b/epan/dissectors/packet-lcsap.c
index 6431dcffa5..955ea5a7ad 100644
--- a/epan/dissectors/packet-lcsap.c
+++ b/epan/dissectors/packet-lcsap.c
@@ -442,18 +442,15 @@ dissect_lcsap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
{
guint8 tmp = tvb_get_guint8(tvb, 0);
- if(tmp == 0)
-
- col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sReq",
- val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
-
- else if(tmp == 32)
+ if (tmp == 0)
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sReq",
+ val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
+ else if (tmp == 32)
col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%sResp",
val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
- else
- col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s",
- val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
-
+ else
+ col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s",
+ val_to_str(ProcedureCode, lcsap_ProcedureCode_vals, "unknown message"));
}
@@ -728,7 +725,7 @@ dissect_lcsap_Correlation_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_lcsap_DegreesLatitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 201 "../../asn1/lcsap/lcsap.cnf"
+#line 198 "../../asn1/lcsap/lcsap.cnf"
gint32 degrees;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -745,7 +742,7 @@ dissect_lcsap_DegreesLatitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_lcsap_DegreesLongitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 209 "../../asn1/lcsap/lcsap.cnf"
+#line 206 "../../asn1/lcsap/lcsap.cnf"
gint32 degrees;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -763,7 +760,7 @@ dissect_lcsap_DegreesLongitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac
static int
dissect_lcsap_PLMN_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 153 "../../asn1/lcsap/lcsap.cnf"
+#line 150 "../../asn1/lcsap/lcsap.cnf"
tvbuff_t *parameter_tvb=NULL;
proto_tree *subtree;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@@ -833,7 +830,7 @@ dissect_lcsap_Geographical_Coordinates(tvbuff_t *tvb _U_, int offset _U_, asn1_c
static int
dissect_lcsap_Uncertainty_Code(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 193 "../../asn1/lcsap/lcsap.cnf"
+#line 190 "../../asn1/lcsap/lcsap.cnf"
guint32 uncertainty_code;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
@@ -1127,7 +1124,7 @@ dissect_lcsap_Global_eNB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
static int
dissect_lcsap_GNSS_Positioning_Method_And_Usage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 179 "../../asn1/lcsap/lcsap.cnf"
+#line 176 "../../asn1/lcsap/lcsap.cnf"
tvbuff_t *parameter_tvb=NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@@ -1164,7 +1161,7 @@ dissect_lcsap_GNSS_Positioning_Data_Set(tvbuff_t *tvb _U_, int offset _U_, asn1_
static int
dissect_lcsap_Horizontal_Accuracy(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 227 "../../asn1/lcsap/lcsap.cnf"
+#line 224 "../../asn1/lcsap/lcsap.cnf"
guint32 uncertainty_code;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 127U, &uncertainty_code, FALSE);
@@ -1172,7 +1169,7 @@ dissect_lcsap_Horizontal_Accuracy(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
-#line 231 "../../asn1/lcsap/lcsap.cnf"
+#line 228 "../../asn1/lcsap/lcsap.cnf"
proto_item_append_text(actx->created_item, " (%.1f m)", 10 * (pow(1.1, (double)uncertainty_code) - 1));
@@ -1324,7 +1321,7 @@ dissect_lcsap_Horizontal_With_Vertical_Velocity_And_Uncertainty(tvbuff_t *tvb _U
static int
dissect_lcsap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 217 "../../asn1/lcsap/lcsap.cnf"
+#line 214 "../../asn1/lcsap/lcsap.cnf"
tvbuff_t *imsi_tvb;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 8, FALSE, &imsi_tvb);
@@ -1531,7 +1528,7 @@ dissect_lcsap_Vertical_Requested(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *
static int
dissect_lcsap_Vertical_Accuracy(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 234 "../../asn1/lcsap/lcsap.cnf"
+#line 231 "../../asn1/lcsap/lcsap.cnf"
guint32 vertical_uncertainty;
offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
0U, 127U, &vertical_uncertainty, FALSE);
@@ -1539,7 +1536,7 @@ dissect_lcsap_Vertical_Accuracy(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a
-#line 238 "../../asn1/lcsap/lcsap.cnf"
+#line 235 "../../asn1/lcsap/lcsap.cnf"
proto_item_append_text(actx->created_item, " (%.1f m)", 45 * (pow(1.025, (double)vertical_uncertainty) - 1));
@@ -1645,7 +1642,7 @@ dissect_lcsap_Payload_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
static int
dissect_lcsap_Positioning_Method_And_Usage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 167 "../../asn1/lcsap/lcsap.cnf"
+#line 164 "../../asn1/lcsap/lcsap.cnf"
tvbuff_t *parameter_tvb=NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,