2 * Copyright 2012, 2014, Ericsson AB
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include <epan/packet.h>
14 #include <epan/address_types.h>
15 #include "packet-mtp3.h"
17 #define INVALID_SSN 0xff
19 void proto_register_ppcap(void);
23 static dissector_handle_t ppcap_handle
;
24 static dissector_handle_t mtp3_handle
; /* MTP3 handle */
25 static dissector_handle_t tcap_handle
; /* TCAP handle */
26 static dissector_handle_t bssap_handle
; /* BSSAP handle */
27 static dissector_handle_t ranap_handle
; /* RANAP handle */
28 static dissector_handle_t h248_handle
; /* H248 handle */
29 static dissector_handle_t sip_handle
; /* SIP handle */
30 static dissector_handle_t sccp_handle
; /* SCCP handle */
31 static dissector_handle_t sgsap_handle
; /* SGSAP handle */
32 static dissector_handle_t gtpv2_handle
; /* GTPv2 handle */
34 static dissector_table_t sccp_ssn_dissector_table
;
36 static mtp3_addr_pc_t
* mtp3_addr_opc
;
37 static mtp3_addr_pc_t
* mtp3_addr_dpc
;
39 static int ss7pc_address_type
= -1;
42 static int ett_ppcap1
;
43 static int ett_ppcap_new
;
45 static const value_string payload_tag_values
[] = {
48 { 3, "Source Address"},
49 { 4, "Destination Address"},
52 { 7, "Transfer Protocol used for message"},
53 { 8, "SCTP association ID" },
59 static const value_string address_type_values
[] = {
68 /* Initialise the header fields */
70 static int proto_ppcap
;
71 static int hf_ppcap_length
;
72 static int hf_ppcap_payload_type
;
73 static int hf_ppcap_ssn
;
74 static int hf_ppcap_spc
;
75 static int hf_ppcap_ssn1
;
76 static int hf_ppcap_spc1
;
77 static int hf_ppcap_opc
;
78 static int hf_ppcap_dpc
;
79 static int hf_ppcap_source_nodeid
;
80 static int hf_ppcap_destination_nodeid
;
81 /*static int hf_ppcap_source_address_type; */
82 /*static int hf_ppcap_destination_address_type; */
83 static int hf_ppcap_address_type
;
84 static int hf_ppcap_source_ip_address1
;
85 static int hf_ppcap_source_ip_address2
;
86 static int hf_ppcap_destination_ip_address1
;
87 static int hf_ppcap_destination_ip_address2
;
88 static int hf_ppcap_reserved
;
89 static int hf_ppcap_destreserved
;
90 static int hf_ppcap_info
;
91 static int hf_ppcap_payload_data
;
92 static int hf_ppcap_local_port
;
93 static int hf_ppcap_remote_port
;
94 static int hf_ppcap_transport_prot
;
95 static int hf_ppcap_sctp_assoc
;
97 /* Initialize the subtree pointers */
99 void proto_reg_handoff_ppcap(void);
102 /* PPCAP payload types */
116 static int dissect_ppcap_payload_type(tvbuff_t
*, packet_info
*, proto_tree
*, int, payload_type_type
*);
117 static int dissect_ppcap_source_address(tvbuff_t
*, packet_info
*, proto_tree
*, int);
118 static int dissect_ppcap_destination_address(tvbuff_t
*, packet_info
*, proto_tree
*, int);
119 static int dissect_ppcap_info_string(tvbuff_t
*, proto_tree
*, int);
120 static int dissect_ppcap_local_port(tvbuff_t
*, proto_tree
*, int);
121 static int dissect_ppcap_remote_port(tvbuff_t
*,proto_tree
*, int);
122 static int dissect_ppcap_transport_protocol(tvbuff_t
*,proto_tree
*, int);
123 static int dissect_ppcap_sctp_assoc(tvbuff_t
*, proto_tree
*, int);
124 static int dissect_ppcap_payload_data(tvbuff_t
*, packet_info
*, proto_tree
*, int, proto_tree
*, payload_type_type
);
126 /*Dissecting the function PPCAP */
129 dissect_ppcap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
132 proto_tree
*ppcap_tree
, *ppcap_tree1
;
135 payload_type_type payload_type
= PPCAP_UNKNOWN
;
137 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "PPCAP");
138 col_clear(pinfo
->cinfo
, COL_INFO
);
140 ti
= proto_tree_add_item(tree
, proto_ppcap
, tvb
, 0, -1, ENC_NA
);
141 ppcap_tree
= proto_item_add_subtree(ti
, ett_ppcap
);
143 while (tvb_reported_length_remaining(tvb
, offset
) > 0)
145 msg_type
= tvb_get_ntohs(tvb
, offset
);
146 ppcap_tree1
= proto_tree_add_subtree(ppcap_tree
, tvb
, offset
, 2, ett_ppcap1
, NULL
,
147 val_to_str(msg_type
, payload_tag_values
, "Unknown PPCAP message type (%u)"));
151 payload_type
= PPCAP_UNKNOWN
;
152 offset
= dissect_ppcap_payload_type(tvb
, pinfo
, ppcap_tree1
, offset
, &payload_type
);
155 offset
= dissect_ppcap_payload_data(tvb
, pinfo
, ppcap_tree1
, offset
, tree
, payload_type
);
158 offset
= dissect_ppcap_source_address(tvb
, pinfo
, ppcap_tree1
, offset
);
161 offset
= dissect_ppcap_destination_address(tvb
, pinfo
, ppcap_tree1
, offset
);
164 offset
= dissect_ppcap_local_port(tvb
,ppcap_tree1
, offset
);
167 offset
= dissect_ppcap_remote_port(tvb
,ppcap_tree1
, offset
);
170 offset
= dissect_ppcap_transport_protocol(tvb
,ppcap_tree1
, offset
);
173 offset
= dissect_ppcap_sctp_assoc(tvb
, ppcap_tree1
, offset
);
176 offset
= dissect_ppcap_info_string(tvb
, ppcap_tree1
, offset
);
180 return tvb_captured_length(tvb
);
184 /* Dissecting the function Payload type to compare the protocol type */
187 *******************************************************
190 *******************************************************
196 dissect_ppcap_payload_type(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
* ppcap_tree1
, int offset
, payload_type_type
*payload_type
)
200 msg_len
= tvb_get_ntohs(tvb
, offset
);
201 proto_tree_add_item( ppcap_tree1
, hf_ppcap_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
203 string
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, msg_len
, ENC_UTF_8
|ENC_NA
);
204 if (strcmp(string
,"mtp3") == 0) {
205 *payload_type
= PPCAP_MTP3
;
206 }else if (strcmp(string
,"tcap") == 0) {
207 *payload_type
= PPCAP_TCAP
;
208 }else if (strcmp(string
,"bssap") == 0) {
209 *payload_type
= PPCAP_BSSAP
;
210 }else if (strcmp(string
,"ranap") == 0) {
211 *payload_type
= PPCAP_RANAP
;
212 }else if (strcmp(string
,"h248") == 0) {
213 *payload_type
= PPCAP_H248
;
214 }else if (strcmp(string
,"sip") == 0) {
215 *payload_type
= PPCAP_SIP
;
216 }else if (strcmp(string
,"sccp") == 0) {
217 *payload_type
= PPCAP_SCCP
;
218 }else if (strcmp(string
, "sgsap") == 0) {
219 *payload_type
= PPCAP_SGSAP
;
220 }else if (strcmp(string
, "gtpv2") == 0) {
221 *payload_type
= PPCAP_GTPV2
;
224 proto_tree_add_item(ppcap_tree1
, hf_ppcap_payload_type
, tvb
, offset
, msg_len
, ENC_UTF_8
);
227 msg_len
= msg_len
+(4-(msg_len
%4));
232 /* Dissecting the function Source Address */
236 *******************************************************
237 * Reserved * Address Type *
239 *******************************************************
242 *******************************************************
246 dissect_ppcap_source_address(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
* ppcap_tree1
, int offset
)
250 msg_len
= tvb_get_ntohs(tvb
, offset
);
251 proto_tree_add_item( ppcap_tree1
, hf_ppcap_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
253 proto_tree_add_item(ppcap_tree1
, hf_ppcap_reserved
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
256 key1
= tvb_get_ntohs(tvb
, offset
);
257 proto_tree_add_item(ppcap_tree1
, hf_ppcap_address_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
262 proto_tree_add_item(ppcap_tree1
, hf_ppcap_ssn
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
264 proto_tree_add_item(ppcap_tree1
, hf_ppcap_spc
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
265 /*src_addr1 = (uint32_t )tvb_get_ntoh24(tvb, offset);*/
266 mtp3_addr_opc
= wmem_new0(pinfo
->pool
, mtp3_addr_pc_t
);
267 mtp3_addr_opc
->pc
= (uint32_t )tvb_get_ntoh24(tvb
, offset
);
268 mtp3_addr_opc
->type
= ITU_STANDARD
;
269 mtp3_addr_opc
->ni
= 0;
270 /*set_address(&pinfo->net_src, ss7pc_address_type, sizeof(mtp3_addr_pc_t), (uint8_t *) mtp3_addr_opc);*/
271 set_address(&pinfo
->src
, ss7pc_address_type
, sizeof(mtp3_addr_pc_t
), (uint8_t *) mtp3_addr_opc
);
273 msg_len
= msg_len
+ (4 - (msg_len
%4));
280 proto_tree_add_item(ppcap_tree1
, hf_ppcap_opc
, tvb
, offset
, msg_len
, ENC_BIG_ENDIAN
);
282 /*src_addr1 = (uint32_t )tvb_get_ntoh24(tvb, offset);*/
283 mtp3_addr_opc
= wmem_new0(pinfo
->pool
, mtp3_addr_pc_t
);
284 mtp3_addr_opc
->pc
= tvb_get_ntohl(tvb
, offset
);
285 mtp3_addr_opc
->type
= ITU_STANDARD
;
286 mtp3_addr_opc
->ni
= 0;
287 set_address(&pinfo
->src
, ss7pc_address_type
, sizeof(mtp3_addr_pc_t
), (uint8_t *) mtp3_addr_opc
);
294 proto_tree_add_item(ppcap_tree1
, hf_ppcap_source_ip_address1
, tvb
, offset
, msg_len
, ENC_NA
);
295 set_address_tvb(&pinfo
->net_src
, AT_IPv4
, 4, tvb
, offset
);
296 copy_address_shallow(&pinfo
->src
, &pinfo
->net_src
);
300 proto_tree_add_item(ppcap_tree1
, hf_ppcap_source_ip_address2
, tvb
, offset
, msg_len
, ENC_NA
);
301 set_address_tvb(&pinfo
->net_src
, AT_IPv6
, 6, tvb
, offset
);
302 copy_address_shallow(&pinfo
->src
, &pinfo
->net_src
);
309 proto_tree_add_item(ppcap_tree1
, hf_ppcap_source_nodeid
, tvb
, offset
, msg_len
, ENC_ASCII
);
310 set_address_tvb(&pinfo
->net_src
, AT_STRINGZ
, msg_len
, tvb
, offset
);
311 copy_address_shallow(&pinfo
->src
, &pinfo
->net_src
);
314 msg_len
= msg_len
+ (4 - (msg_len
%4));
319 /* Dissecting the function Destination Address */
322 *******************************************************
323 * Reserved * Address Type *
325 *******************************************************
328 *******************************************************
333 dissect_ppcap_destination_address(tvbuff_t
*tvb
, packet_info
* pinfo
, proto_tree
* ppcap_tree1
, int offset
)
337 msg_len
= tvb_get_ntohs(tvb
, offset
);
338 proto_tree_add_item( ppcap_tree1
, hf_ppcap_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
340 proto_tree_add_item(ppcap_tree1
, hf_ppcap_destreserved
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
343 key2
= tvb_get_ntohs(tvb
, offset
);
344 proto_tree_add_item(ppcap_tree1
, hf_ppcap_address_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
349 ssn
= tvb_get_uint8(tvb
, offset
);
350 proto_tree_add_item(ppcap_tree1
, hf_ppcap_ssn1
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
353 proto_tree_add_item(ppcap_tree1
, hf_ppcap_spc1
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
355 /*dst_addr1 = (uint32_t )tvb_get_ntoh24(tvb, offset);*/
356 mtp3_addr_dpc
= wmem_new0(pinfo
->pool
, mtp3_addr_pc_t
);
357 mtp3_addr_dpc
->pc
= (uint32_t)tvb_get_ntoh24(tvb
, offset
);
358 mtp3_addr_dpc
->type
= ITU_STANDARD
;
359 mtp3_addr_dpc
->ni
= 0;
360 set_address(&pinfo
->dst
, ss7pc_address_type
, sizeof(mtp3_addr_pc_t
), (uint8_t *) mtp3_addr_dpc
);
363 msg_len
= msg_len
+ (4 - (msg_len
%4));
371 proto_tree_add_item(ppcap_tree1
, hf_ppcap_dpc
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
373 /*dst_addr1 = (uint32_t )tvb_get_ntoh24(tvb, offset);*/
374 mtp3_addr_dpc
= wmem_new0(pinfo
->pool
, mtp3_addr_pc_t
);
375 mtp3_addr_dpc
->pc
= tvb_get_ntohl(tvb
, offset
);
376 mtp3_addr_dpc
->type
= ITU_STANDARD
;
377 mtp3_addr_dpc
->ni
= 0;
378 set_address(&pinfo
->dst
, ss7pc_address_type
, sizeof(mtp3_addr_pc_t
), (uint8_t *) mtp3_addr_dpc
);
384 proto_tree_add_item(ppcap_tree1
, hf_ppcap_destination_ip_address1
, tvb
, offset
, msg_len
, ENC_NA
);
385 set_address_tvb(&pinfo
->net_dst
, AT_IPv4
, 4, tvb
, offset
);
386 copy_address_shallow(&pinfo
->dst
, &pinfo
->net_dst
);
390 proto_tree_add_item(ppcap_tree1
, hf_ppcap_destination_ip_address2
, tvb
, offset
, msg_len
, ENC_NA
);
391 set_address_tvb(&pinfo
->net_dst
, AT_IPv6
, 6, tvb
, offset
);
392 copy_address_shallow(&pinfo
->dst
, &pinfo
->net_dst
);
398 const uint8_t *string
;
399 proto_tree_add_item_ret_string(ppcap_tree1
, hf_ppcap_destination_nodeid
, tvb
, offset
, msg_len
, ENC_UTF_8
|ENC_NA
, pinfo
->pool
, &string
);
400 set_address_tvb(&pinfo
->net_dst
, AT_STRINGZ
, msg_len
, tvb
, offset
);
401 copy_address_shallow(&pinfo
->dst
, &pinfo
->net_dst
);
405 msg_len
= msg_len
+(4-(msg_len
%4));
412 /* Dissecting the function Info String */
415 *******************************************************
418 *******************************************************
422 dissect_ppcap_info_string(tvbuff_t
*tvb
, proto_tree
* ppcap_tree1
, int offset
)
425 msg_len
= tvb_get_ntohs(tvb
, offset
);
426 proto_tree_add_item( ppcap_tree1
, hf_ppcap_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
428 proto_tree_add_item(ppcap_tree1
, hf_ppcap_info
, tvb
, offset
, msg_len
, ENC_ASCII
);
431 msg_len
= msg_len
+( 4- (msg_len
%4));
436 /* Dissecting the function Local Port */
439 *******************************************************
442 *******************************************************
445 dissect_ppcap_local_port(tvbuff_t
*tvb
,proto_tree
* ppcap_tree1
, int offset
)
447 proto_tree_add_item(ppcap_tree1
,hf_ppcap_local_port
,tvb
,offset
,2,ENC_BIG_ENDIAN
);
448 offset
= offset
+6; /*Adding offset of filler bytes without text*/
452 /* Dissecting the function Remote Port */
455 *******************************************************
458 *******************************************************
462 dissect_ppcap_remote_port(tvbuff_t
*tvb
,proto_tree
* ppcap_tree1
, int offset
)
464 proto_tree_add_item(ppcap_tree1
,hf_ppcap_remote_port
,tvb
,offset
,2,ENC_BIG_ENDIAN
);
465 offset
= offset
+6; /*Adding offset of filler bytes without text*/
469 /* Dissecting the function TCP SIP Message */
472 *******************************************************
473 * Transport protocol *
475 *******************************************************
479 dissect_ppcap_transport_protocol(tvbuff_t
*tvb
,proto_tree
* ppcap_tree1
, int offset
)
481 proto_tree_add_item(ppcap_tree1
, hf_ppcap_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
483 proto_tree_add_item(ppcap_tree1
, hf_ppcap_transport_prot
, tvb
, offset
, 4, ENC_ASCII
| ENC_NA
);
490 dissect_ppcap_sctp_assoc(tvbuff_t
*tvb _U_
, proto_tree
* tree _U_
, int offset
)
493 length
= tvb_get_ntohs(tvb
, offset
);
495 proto_tree_add_item(tree
, hf_ppcap_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
498 proto_tree_add_item(tree
, hf_ppcap_sctp_assoc
, tvb
, offset
, length
, ENC_ASCII
| ENC_NA
);
500 /* The string can be 1 -15 characters long but the IE is padded to 16 bytes*/
505 /* Dissecting the function Payload Data to call the protocol that based upon the type decided in the Payload Type */
508 *******************************************************
511 *******************************************************
516 dissect_ppcap_payload_data(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
* ppcap_tree1
, int offset
, proto_tree
*tree
, payload_type_type payload_type
)
520 msg_len
= tvb_get_ntohs(tvb
, offset
);
521 proto_tree_add_item( ppcap_tree1
, hf_ppcap_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
523 proto_tree_add_item(ppcap_tree1
, hf_ppcap_payload_data
, tvb
, offset
, msg_len
, ENC_NA
);
526 msg_len
= msg_len
+( 4- (msg_len
%4));
528 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
530 switch (payload_type
) {
532 call_dissector(mtp3_handle
, next_tvb
, pinfo
, tree
); /* calling the MTP3 handle */
536 * The protocol which runs on TCAP takes the SSN value from the SCCP layer which is missing in this case.
537 * So we have made code changes for TCAP handle as below for taking the SSN value from ppcap.
539 if (ssn
!= INVALID_SSN
&& dissector_try_uint(sccp_ssn_dissector_table
, ssn
, next_tvb
, pinfo
, tree
)) {
540 return offset
+msg_len
;
542 call_dissector(tcap_handle
, next_tvb
, pinfo
, tree
); /* calling the TCAP handle */
546 call_dissector(bssap_handle
, next_tvb
, pinfo
, tree
); /* calling the BSSAP handle */
549 call_dissector(ranap_handle
, next_tvb
, pinfo
, tree
); /* calling the RANAP handle */
552 call_dissector(h248_handle
, next_tvb
, pinfo
, tree
); /* calling the H248 handle */
555 call_dissector(sip_handle
, next_tvb
, pinfo
, tree
); /* calling the SIP handle */
558 call_dissector(sccp_handle
, next_tvb
, pinfo
, tree
); /* calling the SCCP handle */
561 call_dissector(sgsap_handle
, next_tvb
, pinfo
, tree
); /* calling the SGSAP handle */
564 call_dissector(gtpv2_handle
, next_tvb
, pinfo
, tree
); /* calling the GTPv2 handle */
567 call_data_dissector(next_tvb
, pinfo
, tree
); /* calling the DATA handle */
575 /* Registering the hf variables */
577 void proto_register_ppcap(void)
580 static hf_register_info hf
[] = {
582 { "Length", "ppcap.length",
583 FT_UINT16
, BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
584 { &hf_ppcap_payload_type
,
585 { "Payload Type", "ppcap.payload_type", FT_STRING
,
586 BASE_NONE
, NULL
, 0x0 , NULL
, HFILL
}},
587 { &hf_ppcap_reserved
,
588 { "Reserved", "ppcap.reserved", FT_UINT16
,
589 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
590 { &hf_ppcap_address_type
,
591 { "Address Type", "ppcap.address_type", FT_UINT16
,
592 BASE_DEC
, VALS(address_type_values
), 0x00 , NULL
, HFILL
}},
594 { &hf_ppcap_source_address_type
,
595 { "Source Address Type", "ppcap.source_address_type", FT_UINT16
,
596 BASE_DEC
, VALS(address_type_values
), 0x00 , NULL
, HFILL
}},
599 { "SSN", "ppcap.ssn", FT_UINT16
,
600 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
602 {"OPC", "ppcap.spc", FT_UINT24
,
603 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
605 { "OPC", "ppcap.opc", FT_UINT16
,
606 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
607 { &hf_ppcap_source_ip_address1
,
608 { "Source IP Address", "ppcap.source_ip_address1", FT_IPv4
,
609 BASE_NONE
, NULL
, 0x00, NULL
, HFILL
}},
610 { &hf_ppcap_source_ip_address2
,
611 { "Source IP Address", "ppcap.source_ip_address2", FT_IPv6
,
612 BASE_NONE
, NULL
, 0x00, NULL
, HFILL
}},
613 { &hf_ppcap_destreserved
,
614 { "Reserved", "ppcap.destreserved", FT_UINT16
,
615 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
617 { &hf_ppcap_destination_address_type
,
618 { "Destination Address Type", "ppcap.destination_address_type", FT_UINT16
,
619 BASE_DEC
, VALS(address_type_values
), 0x00, NULL
, HFILL
}},
622 { "SSN", "ppcap.ssn1", FT_UINT8
,
623 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
625 { "DPC", "ppcap.spc1", FT_UINT24
,
626 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
628 { "DPC", "ppcap.dpc", FT_UINT32
,
629 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
630 { &hf_ppcap_destination_ip_address1
,
631 { "Destination IP Address", "ppcap.destination_ip_address1", FT_IPv4
,
632 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
633 { &hf_ppcap_destination_ip_address2
,
634 { "Destination IP Address", "ppcap.destination_ip_address2", FT_IPv6
,
635 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
636 { &hf_ppcap_source_nodeid
,
637 { "Source Node ID", "ppcap.source_nodeid", FT_STRING
,
638 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
639 { &hf_ppcap_destination_nodeid
,
640 { "Destination Node ID", "ppcap.destination_address", FT_STRING
,
641 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
643 { "Info", "ppcap.info", FT_STRING
,
644 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
645 { &hf_ppcap_payload_data
,
646 { "Payload Data", "ppcap.payload_data", FT_BYTES
,
647 BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
648 { &hf_ppcap_local_port
,
649 { "Local Port", "ppcap.local_port", FT_UINT16
,
650 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
651 { &hf_ppcap_remote_port
,
652 { "Remote Port", "ppcap.remote_port", FT_UINT16
,
653 BASE_DEC
, NULL
, 0x00, NULL
, HFILL
}},
654 { &hf_ppcap_transport_prot
,
655 { "Transport Protocol", "ppcap.transport_prot", FT_STRING
,
656 BASE_NONE
, NULL
, 0x0 , NULL
, HFILL
}},
657 { &hf_ppcap_sctp_assoc
,
658 { "SCTP Association ID", "ppcap.sctp_assoc", FT_STRING
,
659 BASE_NONE
, NULL
, 0x0 , NULL
, HFILL
} },
667 proto_ppcap
= proto_register_protocol("Proprietary PCAP", "PPCAP", "ppcap");
668 proto_register_field_array(proto_ppcap
, hf
, array_length(hf
));
669 proto_register_subtree_array(ett
, array_length(ett
));
670 register_dissector("ppcap", dissect_ppcap
, proto_ppcap
);
674 void proto_reg_handoff_ppcap(void)
676 ppcap_handle
= find_dissector_add_dependency("ppcap", proto_ppcap
);
677 mtp3_handle
= find_dissector_add_dependency("mtp3", proto_ppcap
); /* calling the protocol MTP3 */
678 tcap_handle
= find_dissector_add_dependency("tcap", proto_ppcap
); /* calling the protocol TCAP */
679 bssap_handle
= find_dissector_add_dependency("bssap", proto_ppcap
); /* calling the protocol BSSAP */
680 ranap_handle
= find_dissector_add_dependency("ranap", proto_ppcap
); /* calling the protocol RANAP */
681 h248_handle
= find_dissector_add_dependency("h248", proto_ppcap
); /* calling the protocol H248 */
682 sip_handle
= find_dissector_add_dependency("sip", proto_ppcap
); /* calling the protocol SIP */
683 sccp_handle
= find_dissector_add_dependency("sccp", proto_ppcap
); /* calling the protocol SCCP */
684 sgsap_handle
= find_dissector_add_dependency("sgsap", proto_ppcap
); /* calling the protocol SGSAP */
685 gtpv2_handle
= find_dissector_add_dependency("gtpv2", proto_ppcap
); /* calling the protocol GTPv2 */
687 sccp_ssn_dissector_table
= find_dissector_table("sccp.ssn");
689 ss7pc_address_type
= address_type_get_by_name("AT_SS7PC");
693 * Editor modelines - https://www.wireshark.org/tools/modelines.html
698 * indent-tabs-mode: t
701 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
702 * :indentSize=8:tabSize=8:noTabs=false: