2 * Routines for OMA UserPlane Location Protocol packet dissection
3 * Copyright 2006, Anders Broman <anders.broman@ericsson.com>
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 * ref OMA-TS-ULP-V1_0-20060127-C
26 * http://www.openmobilealliance.org
34 #include <epan/packet.h>
35 #include <epan/conversation.h>
36 #include <epan/prefs.h>
41 #include "packet-ulp.h"
43 #include "packet-ber.h"
44 #include "packet-per.h"
46 #define PNAME "OMA UserPlane Location Protocol"
50 static dissector_handle_t ulp_handle=NULL;
52 /* IANA Registered Ports
53 * oma-ulp 7275/tcp OMA UserPlane Location
54 * oma-ulp 7275/udp OMA UserPlane Location
56 guint gbl_ulp_port = 7275;
58 /* Initialize the protocol and registered fields */
59 static int proto_ulp = -1;
62 #include "packet-ulp-hf.c"
64 /* Initialize the subtree pointers */
65 static gint ett_ulp = -1;
66 #include "packet-ulp-ett.c"
68 /* Include constants */
69 #include "packet-ulp-val.h"
71 #include "packet-ulp-fn.c"
73 /*--- proto_reg_handoff_ulp ---------------------------------------*/
75 proto_reg_handoff_ulp(void)
78 ulp_handle = create_dissector_handle(dissect_ULP_PDU_PDU, proto_ulp);
80 dissector_add("tcp.port", gbl_ulp_port, ulp_handle);
82 /* application/oma-supl-ulp */
83 dissector_add_string("media_type","application/oma-supl-ulp", ulp_handle);
88 /*--- proto_register_ulp -------------------------------------------*/
89 void proto_register_ulp(void) {
92 static hf_register_info hf[] = {
94 #include "packet-ulp-hfarr.c"
97 /* List of subtrees */
98 static gint *ett[] = {
100 #include "packet-ulp-ettarr.c"
103 module_t *ulp_module;
106 /* Register protocol */
107 proto_ulp = proto_register_protocol(PNAME, PSNAME, PFNAME);
108 /* Register fields and subtrees */
109 proto_register_field_array(proto_ulp, hf, array_length(hf));
110 proto_register_subtree_array(ett, array_length(ett));
113 /* Register a configuration option for port */
114 ulp_module = prefs_register_protocol(proto_ulp,proto_reg_handoff_ulp);
115 prefs_register_uint_preference(ulp_module, "tcp.port",
117 "Set the TCP port for Ulp messages(IANA registerd port is 7275)",