aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x2ap.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-03-31 08:53:00 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-03-31 08:53:00 +0000
commit2867bd0f49ccd545ce82856af9f9e3f1b20f7135 (patch)
tree731e7f5e984f2a880b2af793d971e4dd9df965df /epan/dissectors/packet-x2ap.c
parent1257bf19bbbd4e5629ce3a76ca2ac9f430e4f60a (diff)
Use IANA asigned PPID and port.
svn path=/trunk/; revision=32338
Diffstat (limited to 'epan/dissectors/packet-x2ap.c')
-rw-r--r--epan/dissectors/packet-x2ap.c38
1 files changed, 27 insertions, 11 deletions
diff --git a/epan/dissectors/packet-x2ap.c b/epan/dissectors/packet-x2ap.c
index bb856a5299..2b8f88aa0f 100644
--- a/epan/dissectors/packet-x2ap.c
+++ b/epan/dissectors/packet-x2ap.c
@@ -63,7 +63,8 @@
#define PSNAME "X2AP"
#define PFNAME "x2ap"
-#define SCCP_SSN_X2AP 143
+/* Dissector will use SCTP PPID 27 or SCTP port. IANA assigned port = 36422 */
+#define SCTP_PORT_X2AP 36422
/*--- Included file: packet-x2ap-val.h ---*/
@@ -164,7 +165,7 @@ typedef enum _ProtocolIE_ID_enum {
} ProtocolIE_ID_enum;
/*--- End of included file: packet-x2ap-val.h ---*/
-#line 61 "packet-x2ap-template.c"
+#line 62 "packet-x2ap-template.c"
/* Initialize the protocol and registered fields */
static int proto_x2ap = -1;
@@ -424,7 +425,7 @@ static int hf_x2ap_successfulOutcome_value = -1; /* SuccessfulOutcome_value */
static int hf_x2ap_value = -1; /* UnsuccessfulOutcome_value */
/*--- End of included file: packet-x2ap-hf.c ---*/
-#line 67 "packet-x2ap-template.c"
+#line 68 "packet-x2ap-template.c"
/* Initialize the subtree pointers */
static int ett_x2ap = -1;
@@ -544,11 +545,12 @@ static gint ett_x2ap_SuccessfulOutcome = -1;
static gint ett_x2ap_UnsuccessfulOutcome = -1;
/*--- End of included file: packet-x2ap-ett.c ---*/
-#line 72 "packet-x2ap-template.c"
+#line 73 "packet-x2ap-template.c"
/* Global variables */
static guint32 ProcedureCode;
static guint32 ProtocolIE_ID;
+static guint gbl_x2apSctpPort=SCTP_PORT_X2AP;
/* Dissector tables */
static dissector_table_t x2ap_ies_dissector_table;
@@ -4242,7 +4244,7 @@ static void dissect_X2AP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot
/*--- End of included file: packet-x2ap-fn.c ---*/
-#line 91 "packet-x2ap-template.c"
+#line 93 "packet-x2ap-template.c"
static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@@ -5301,7 +5303,7 @@ void proto_register_x2ap(void) {
"x2ap.UnsuccessfulOutcome_value", HFILL }},
/*--- End of included file: packet-x2ap-hfarr.c ---*/
-#line 149 "packet-x2ap-template.c"
+#line 151 "packet-x2ap-template.c"
};
/* List of subtrees */
@@ -5423,7 +5425,7 @@ void proto_register_x2ap(void) {
&ett_x2ap_UnsuccessfulOutcome,
/*--- End of included file: packet-x2ap-ettarr.c ---*/
-#line 156 "packet-x2ap-template.c"
+#line 158 "packet-x2ap-template.c"
};
@@ -5451,11 +5453,14 @@ void
proto_reg_handoff_x2ap(void)
{
dissector_handle_t x2ap_handle;
+ static gboolean Initialized=FALSE;
+ static guint SctpPort;
x2ap_handle = find_dissector("x2ap");
- dissector_add("sctp.ppi", X2AP_PAYLOAD_PROTOCOL_ID, x2ap_handle);
- dissector_add_handle("sctp.port", x2ap_handle); /* for "decode-as" */
-
+ if (!Initialized) {
+ dissector_add_handle("sctp.port", x2ap_handle); /* for "decode-as" */
+ dissector_add("sctp.ppi", X2AP_PAYLOAD_PROTOCOL_ID, x2ap_handle);
+ Initialized=TRUE;
/*--- Included file: packet-x2ap-dis-tab.c ---*/
#line 1 "packet-x2ap-dis-tab.c"
@@ -5542,7 +5547,18 @@ proto_reg_handoff_x2ap(void)
/*--- End of included file: packet-x2ap-dis-tab.c ---*/
-#line 189 "packet-x2ap-template.c"
+#line 194 "packet-x2ap-template.c"
+ } else {
+ if (SctpPort != 0) {
+ dissector_delete("sctp.port", SctpPort, x2ap_handle);
+ }
+ }
+
+ SctpPort=gbl_x2apSctpPort;
+ if (SctpPort != 0) {
+ dissector_add("sctp.port", SctpPort, x2ap_handle);
+ }
+
}