2005-11-22 21:48:10 +00:00
/* packet-tipc.c
* Routines for Transparent Inter Process Communication packet dissection
*
* $ Id $
*
2006-09-17 20:23:23 +00:00
* Copyright 2005 - 2006 , Anders Broman < anders . broman @ ericsson . com >
2008-03-17 21:35:14 +00:00
*
2006-09-29 05:50:41 +00:00
* TIPCv2 protocol updates
2008-03-17 21:35:14 +00:00
* Copyright 2006 - 2008 , Martin Peylo < wireshark @ izac . de >
*
2006-05-21 04:49:01 +00:00
* Wireshark - Network traffic analyzer
* By Gerald Combs < gerald @ wireshark . org >
2005-11-22 21:48:10 +00:00
* Copyright 1998 Gerald Combs
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
* Protocol ref :
* http : //tipc.sourceforge.net/
*/
# ifdef HAVE_CONFIG_H
# include "config.h"
# endif
# include <stdlib.h>
# include <string.h>
# include <ctype.h>
# include <epan/prefs.h>
# include <glib.h>
# include <epan/packet.h>
# include <epan/etypes.h>
# include <epan/emem.h>
2005-12-07 20:07:14 +00:00
# include <epan/reassemble.h>
2005-11-22 21:48:10 +00:00
2008-03-17 21:35:14 +00:00
# include "packet-tcp.h"
2005-11-22 21:48:10 +00:00
static int proto_tipc = - 1 ;
2005-12-07 20:07:14 +00:00
2008-03-17 21:35:14 +00:00
/* dissector handles */
static dissector_handle_t data_handle ;
static dissector_handle_t ip_handle ;
2005-12-07 20:07:14 +00:00
static int hf_tipc_msg_fragments = - 1 ;
static int hf_tipc_msg_fragment = - 1 ;
static int hf_tipc_msg_fragment_overlap = - 1 ;
static int hf_tipc_msg_fragment_overlap_conflicts = - 1 ;
static int hf_tipc_msg_fragment_multiple_tails = - 1 ;
static int hf_tipc_msg_fragment_too_long_fragment = - 1 ;
static int hf_tipc_msg_fragment_error = - 1 ;
static int hf_tipc_msg_reassembled_in = - 1 ;
2010-02-02 16:01:52 +00:00
static int hf_tipc_msg_reassembled_length = - 1 ;
2005-12-07 20:07:14 +00:00
2005-11-22 21:48:10 +00:00
static int hf_tipc_ver = - 1 ;
static int hf_tipc_usr = - 1 ;
2006-03-07 18:19:42 +00:00
static int hf_tipcv2_usr = - 1 ;
2005-11-22 21:48:10 +00:00
static int hf_tipc_hdr_size = - 1 ;
2006-03-07 18:19:42 +00:00
static int hf_tipc_nonsequenced = - 1 ;
static int hf_tipc_destdrop ;
2005-11-22 21:48:10 +00:00
static int hf_tipc_unused = - 1 ;
static int hf_tipc_msg_size = - 1 ;
static int hf_tipc_ack_link_lev_seq = - 1 ;
static int hf_tipc_link_lev_seq = - 1 ;
static int hf_tipc_prev_proc = - 1 ;
static int hf_tipc_org_port = - 1 ;
static int hf_tipc_dst_port = - 1 ;
static int hf_tipc_data_msg_type = - 1 ;
static int hf_tipc_err_code = - 1 ;
static int hf_tipc_reroute_cnt = - 1 ;
static int hf_tipc_act_id = - 1 ;
static int hf_tipc_org_proc = - 1 ;
static int hf_tipc_dst_proc = - 1 ;
static int hf_tipc_unused2 = - 1 ;
static int hf_tipc_importance = - 1 ;
static int hf_tipc_link_selector = - 1 ;
static int hf_tipc_msg_cnt = - 1 ;
static int hf_tipc_probe = - 1 ;
static int hf_tipc_bearer_id = - 1 ;
static int hf_tipc_link_selector2 = - 1 ;
static int hf_tipc_remote_addr = - 1 ;
static int hf_tipc_rm_msg_type = - 1 ;
static int hf_tipc_nd_msg_type = - 1 ;
static int hf_tipc_cm_msg_type = - 1 ;
static int hf_tipc_lp_msg_type = - 1 ;
2005-12-06 17:54:40 +00:00
static int hf_tipc_cng_prot_msg_type = - 1 ;
2005-11-22 21:48:10 +00:00
static int hf_tipc_sm_msg_type = - 1 ;
static int hf_tipc_unknown_msg_type = - 1 ;
static int hf_tipc_seq_gap = - 1 ;
static int hf_tipc_nxt_snt_pkg = - 1 ;
2005-12-04 21:50:31 +00:00
static int hf_tipc_unused3 = - 1 ;
static int hf_tipc_bearer_name = - 1 ;
static int hf_tipc_name_dist_type = - 1 ;
static int hf_tipc_name_dist_lower = - 1 ;
static int hf_tipc_name_dist_upper = - 1 ;
static int hf_tipc_name_dist_port = - 1 ;
static int hf_tipc_name_dist_key = - 1 ;
2005-11-22 21:48:10 +00:00
2006-06-29 06:27:57 +00:00
static int hf_tipcv2_srcdrop ;
2006-03-07 18:19:42 +00:00
static int hf_tipcv2_data_msg_type = - 1 ;
static int hf_tipcv2_bcast_mtype = - 1 ;
2007-10-27 15:48:47 +00:00
static int hf_tipcv2_bundler_mtype = - 1 ;
2006-03-07 18:19:42 +00:00
static int hf_tipcv2_link_mtype = - 1 ;
static int hf_tipcv2_connmgr_mtype = - 1 ;
2007-10-27 15:48:47 +00:00
static int hf_tipcv2_route_mtype_1_6 = - 1 ;
static int hf_tipcv2_route_mtype_1_7 = - 1 ;
2006-03-07 18:19:42 +00:00
static int hf_tipcv2_changeover_mtype = - 1 ;
static int hf_tipcv2_naming_mtype = - 1 ;
static int hf_tipcv2_fragmenter_mtype = - 1 ;
static int hf_tipcv2_neighbour_mtype = - 1 ;
static int hf_tipcv2_errorcode = - 1 ;
static int hf_tipcv2_rer_cnt = - 1 ;
static int hf_tipcv2_lookup_scope = - 1 ;
static int hf_tipcv2_opt_p = - 1 ;
static int hf_tipcv2_broadcast_ack_no = - 1 ;
static int hf_tipcv2_link_level_ack_no = - 1 ;
static int hf_tipcv2_link_level_seq_no = - 1 ;
static int hf_tipcv2_bcast_seq_no = - 1 ;
static int hf_tipcv2_prev_node = - 1 ;
static int hf_tipcv2_orig_node = - 1 ;
static int hf_tipcv2_dest_node = - 1 ;
static int hf_tipcv2_port_name_type = - 1 ;
static int hf_tipcv2_port_name_instance = - 1 ;
2007-09-17 14:10:34 +00:00
static int hf_tipcv2_multicast_lower = - 1 ;
static int hf_tipcv2_multicast_upper = - 1 ;
2006-03-07 18:19:42 +00:00
static int hf_tipcv2_bcast_seq_gap = - 1 ;
static int hf_tipcv2_sequence_gap = - 1 ;
static int hf_tipcv2_next_sent_broadcast = - 1 ;
static int hf_tipcv2_fragment_number = - 1 ;
2006-09-29 05:50:41 +00:00
static int hf_tipcv2_fragment_msg_number = - 1 ;
2006-03-07 18:19:42 +00:00
static int hf_tipcv2_next_sent_packet = - 1 ;
static int hf_tipcv2_session_no = - 1 ;
static int hf_tipcv2_link_prio = - 1 ;
static int hf_tipcv2_network_plane = - 1 ;
static int hf_tipcv2_probe = - 1 ;
static int hf_tipcv2_link_tolerance = - 1 ;
static int hf_tipcv2_bearer_instance = - 1 ;
static int hf_tipcv2_bearer_level_orig_addr = - 1 ;
static int hf_tipcv2_cluster_address = - 1 ;
static int hf_tipcv2_bitmap = - 1 ;
static int hf_tipcv2_node_address = - 1 ;
static int hf_tipcv2_destination_domain = - 1 ;
static int hf_tipcv2_network_id = - 1 ;
2006-09-29 05:50:41 +00:00
static int hf_tipcv2_bcast_tag = - 1 ;
static int hf_tipcv2_msg_count = - 1 ;
static int hf_tipcv2_max_packet = - 1 ;
static int hf_tipcv2_transport_seq_no = - 1 ;
static int hf_tipcv2_redundant_link = - 1 ;
static int hf_tipcv2_bearer_id = - 1 ;
static int hf_tipcv2_conn_mgr_msg_ack = - 1 ;
static int hf_tipcv2_req_links = - 1 ;
2007-10-27 15:48:47 +00:00
/* added for TIPC v1.7 */
static int hf_tipcv2_timestamp = - 1 ;
static int hf_tipcv2_item_size = - 1 ;
static int hf_tipcv2_network_region = - 1 ;
static int hf_tipcv2_local_router = - 1 ;
static int hf_tipcv2_remote_router = - 1 ;
static int hf_tipcv2_dist_dist = - 1 ;
static int hf_tipcv2_dist_scope = - 1 ;
static int hf_tipcv2_name_dist_port_id_node = - 1 ;
static int hf_tipcv2_media_id = - 1 ;
2005-12-07 20:07:14 +00:00
static gint ett_tipc_msg_fragment = - 1 ;
static gint ett_tipc_msg_fragments = - 1 ;
2005-11-22 21:48:10 +00:00
/* Initialize the subtree pointer */
static gint ett_tipc = - 1 ;
2005-12-04 21:50:31 +00:00
static gint ett_tipc_data = - 1 ;
2005-11-22 21:48:10 +00:00
2007-10-27 15:48:47 +00:00
/* protocol preferences */
2005-12-14 21:40:04 +00:00
static gboolean tipc_defragment = TRUE ;
2007-06-25 06:10:36 +00:00
static gboolean dissect_tipc_data = TRUE ;
2007-09-17 14:10:34 +00:00
static gboolean try_heuristic_first = FALSE ;
2007-10-27 15:48:47 +00:00
# define V2_AS_ALL 0x1
# define V2_AS_1_6 0x2
# define V2_AS_1_7 0x4
static gint handle_v2_as = V2_AS_ALL ;
2008-03-17 21:35:14 +00:00
static guint tipc_alternate_tcp_port = 0 ;
static gboolean tipc_tcp_desegment = TRUE ;
2005-12-14 21:40:04 +00:00
2007-06-25 06:10:36 +00:00
/* this is used to find encapsulated protocols */
static dissector_table_t tipc_user_dissector ;
static dissector_table_t tipc_type_dissector ;
2007-09-17 14:10:34 +00:00
static heur_dissector_list_t tipc_heur_subdissector_list ;
2006-05-09 10:20:28 +00:00
static proto_tree * top_tree ;
2005-12-14 21:40:04 +00:00
2005-12-07 20:07:14 +00:00
static const fragment_items tipc_msg_frag_items = {
/* Fragment subtrees */
& ett_tipc_msg_fragment ,
& ett_tipc_msg_fragments ,
/* Fragment fields */
& hf_tipc_msg_fragments ,
& hf_tipc_msg_fragment ,
& hf_tipc_msg_fragment_overlap ,
& hf_tipc_msg_fragment_overlap_conflicts ,
& hf_tipc_msg_fragment_multiple_tails ,
& hf_tipc_msg_fragment_too_long_fragment ,
& hf_tipc_msg_fragment_error ,
/* Reassembled in field */
& hf_tipc_msg_reassembled_in ,
2010-02-02 16:01:52 +00:00
/* Reassembled length field */
& hf_tipc_msg_reassembled_length ,
2005-12-07 20:07:14 +00:00
/* Tag */
" TIPC Message fragments "
} ;
2006-09-29 05:50:41 +00:00
# define MAX_TIPC_ADDRESS_STR_LEN 15
2006-03-07 18:19:42 +00:00
# define TIPCv1 1
# define TIPCv2 2
2005-12-04 21:50:31 +00:00
/* Users */
2006-09-29 05:50:41 +00:00
# define TIPC_DATA_PRIO_0 0
# define TIPC_DATA_PRIO_1 1
# define TIPC_DATA_PRIO_2 2
# define TIPC_DATA_NON_REJECTABLE 3
# define TIPC_ROUTING_MANAGER 8
# define TIPC_NAME_DISTRIBUTOR 9
# define TIPC_CONNECTION_MANAGER 10
# define TIPC_LINK_PROTOCOL 11
# define TIPC_CHANGEOVER_PROTOCOL 13
# define TIPC_SEGMENTATION_MANAGER 14
# define TIPC_MSG_BUNDLER 15
2005-11-22 21:48:10 +00:00
# define TIPC_LINK_PROTOCO_STATE_MSG 0
const value_string tipc_user_values [ ] = {
2006-09-29 05:50:41 +00:00
{ TIPC_DATA_PRIO_0 , " DATA_PRIO_0 " } ,
{ TIPC_DATA_PRIO_1 , " DATA_PRIO_1 " } ,
{ TIPC_DATA_PRIO_2 , " DATA_PRIO_2 " } ,
{ TIPC_DATA_NON_REJECTABLE , " DATA_NON_REJECTABLE " } ,
{ TIPC_ROUTING_MANAGER , " ROUTING_MANAGER " } ,
{ TIPC_NAME_DISTRIBUTOR , " NAME_DISTRIBUTOR " } ,
{ TIPC_CONNECTION_MANAGER , " CONNECTION_MANAGER " } ,
{ TIPC_LINK_PROTOCOL , " LINK_PROTOCOL " } ,
{ TIPC_CHANGEOVER_PROTOCOL , " CHANGEOVER_PROTOCOL " } ,
{ TIPC_SEGMENTATION_MANAGER , " SEGMENTATION_MANAGER " } ,
{ TIPC_MSG_BUNDLER , " MSG_BUNDLER " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2006-03-07 18:19:42 +00:00
2006-09-29 05:50:41 +00:00
# define TIPCv2_DATA_LOW 0
# define TIPCv2_DATA_NORMAL 1
# define TIPCv2_DATA_HIGH 2
# define TIPCv2_DATA_NON_REJECTABLE 3
# define TIPCv2_BCAST_PROTOCOL 5
# define TIPCv2_MSG_BUNDLER 6
# define TIPCv2_LINK_PROTOCOL 7
# define TIPCv2_CONN_MANAGER 8
# define TIPCv2_ROUTE_DISTRIBUTOR 9
# define TIPCv2_CHANGEOVER_PROTOCOL 10
# define TIPCv2_NAME_DISTRIBUTOR 11
# define TIPCv2_MSG_FRAGMENTER 12
2006-11-14 05:49:59 +00:00
# define TIPCv2_NEIGHBOUR_DISCOVERY 13
2006-03-07 18:19:42 +00:00
2007-09-17 14:10:34 +00:00
# define TIPCv2_USER_FIRST_FRAGMENT 0
# define TIPCv2_USER_FRAGMENT 1
# define TIPCv2_USER_LAST_FRAGMENT 2
2006-03-07 18:19:42 +00:00
const value_string tipcv2_user_values [ ] = {
2006-09-29 05:50:41 +00:00
{ TIPCv2_DATA_LOW , " Low Priority Payload Data " } ,
{ TIPCv2_DATA_NORMAL , " Normal Priority Payload Data " } ,
{ TIPCv2_DATA_HIGH , " High Priority Payload Data " } ,
{ TIPCv2_DATA_NON_REJECTABLE , " Non-Rejectable Payload Data " } ,
{ TIPCv2_BCAST_PROTOCOL , " Broadcast Maintenance Protocol " } ,
{ TIPCv2_MSG_BUNDLER , " Message Bundler Protocol " } ,
{ TIPCv2_LINK_PROTOCOL , " Link State Maintenance Protocol " } ,
{ TIPCv2_CONN_MANAGER , " Connection Manager " } ,
{ TIPCv2_ROUTE_DISTRIBUTOR , " Routing Table Update Protocol " } ,
{ TIPCv2_CHANGEOVER_PROTOCOL , " Link Changeover Protocol " } ,
{ TIPCv2_NAME_DISTRIBUTOR , " Name Table Update Protocol " } ,
{ TIPCv2_MSG_FRAGMENTER , " Message Fragmentation Protocol " } ,
2006-11-14 05:49:59 +00:00
{ TIPCv2_NEIGHBOUR_DISCOVERY , " Neighbour Discovery Protocol " } ,
2006-09-29 05:50:41 +00:00
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2006-09-17 20:23:23 +00:00
const value_string tipcv2_user_short_str_vals [ ] = {
2006-09-29 05:50:41 +00:00
{ TIPCv2_DATA_LOW , " Payld:Low " } ,
{ TIPCv2_DATA_NORMAL , " Payld:Normal " } ,
{ TIPCv2_DATA_HIGH , " Payld:High " } ,
{ TIPCv2_DATA_NON_REJECTABLE , " Payld:NoRej " } ,
{ TIPCv2_BCAST_PROTOCOL , " Broadcast " } ,
{ TIPCv2_MSG_BUNDLER , " Bundler " } ,
{ TIPCv2_LINK_PROTOCOL , " Link State " } ,
{ TIPCv2_CONN_MANAGER , " Conn Mgr " } ,
{ TIPCv2_ROUTE_DISTRIBUTOR , " Route Dist " } ,
{ TIPCv2_CHANGEOVER_PROTOCOL , " Changeover " } ,
{ TIPCv2_NAME_DISTRIBUTOR , " Name Dist " } ,
{ TIPCv2_MSG_FRAGMENTER , " Fragmenter " } ,
2006-11-14 05:49:59 +00:00
{ TIPCv2_NEIGHBOUR_DISCOVERY , " Ngbr Disc " } ,
2006-09-29 05:50:41 +00:00
{ 0 , NULL }
2006-09-17 20:23:23 +00:00
} ;
2008-03-17 21:35:14 +00:00
# define TIPC_CONNECTED_MSG 0
# define TIPC_NAMED_MSG 2
# define TIPC_DIRECT_MSG 3
# define TIPC_OVERLOAD_W_MSG 4
2005-12-14 21:40:04 +00:00
2006-03-07 18:19:42 +00:00
static const value_string tipc_data_msg_type_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " CONN_MSG " } ,
{ 2 , " NAMED_MSG " } ,
{ 3 , " DIRECT_MSG " } ,
{ 4 , " OVERLOAD_W_MSG " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2006-03-07 18:19:42 +00:00
2006-09-29 05:50:41 +00:00
static const value_string tipcv2_data_msg_type_defines [ ] = {
{ 0 , " ConnMsg " } ,
{ 1 , " McastMsg " } ,
{ 2 , " NamedMsg " } ,
{ 3 , " DirectMsg " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
2007-04-14 14:01:53 +00:00
static const value_string tipcv2_data_msg_type_values [ ] _U_ = {
2006-09-29 05:50:41 +00:00
{ 0 , " Sent on connection (CONN_MSG) " } ,
{ 1 , " Logical multicast (MCAST_MSG) " } ,
{ 2 , " Port name destination address (NAMED_MSG) " } ,
{ 3 , " Port identity destination address (DIRECT_MSG) " } ,
{ 0 , NULL }
2006-09-17 20:23:23 +00:00
} ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
static const value_string tipc_error_code_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " MSG_OK " } ,
{ 1 , " NO_PORT_NAME " } ,
{ 2 , " NO_REMOTE_PORT " } ,
{ 3 , " NO_REMOTE_PROCESSOR " } ,
{ 4 , " DEST_OVERLOADED " } ,
{ 6 , " NO_CONNECTION " } ,
{ 7 , " COMMUNICATION_ERROR " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2006-09-29 05:50:41 +00:00
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_error_code_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " No error (TIPC_OK) " } ,
2008-03-17 21:35:14 +00:00
{ 1 , " Destination port name unknown (TIPC_ERR_NO_NAME) " } ,
2006-09-29 05:50:41 +00:00
{ 2 , " Destination port does not exist (TIPC_ERR_NO_PORT) " } ,
{ 3 , " Destination node unavailable (TIPC_ERR_NO_NODE) " } ,
{ 4 , " Destination node overloaded (TIPC_ERR_OVERLOAD) " } ,
{ 5 , " Connection Shutdown (No error) (TIPC_CONN_SHUTDOWN) " } ,
{ 6 , " Communication Error (TIPC_CONN_ERROR) " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_error_code_short_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " OK " } ,
2008-03-17 21:35:14 +00:00
{ 1 , " ErrNoName " } ,
2006-09-29 05:50:41 +00:00
{ 2 , " ErrNoPort " } ,
{ 3 , " ErrNoNode " } ,
{ 4 , " ErrOverload " } ,
{ 5 , " ConnShutdown " } ,
{ 6 , " ConnError " } ,
{ 0 , NULL }
2006-09-17 20:23:23 +00:00
} ;
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_lookup_scope_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " Zone Scope " } ,
{ 1 , " Cluster Scope " } ,
{ 2 , " Node Scope " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
static const value_string tipc_routing_mgr_msg_type_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " EXT_ROUTING_TABLE " } ,
{ 1 , " LOCAL_ROUTING_TABLE " } ,
{ 2 , " DP_ROUTING_TABLE " } ,
{ 3 , " ROUTE_ADDITION " } ,
{ 4 , " ROUTE_REMOVAL " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
static const value_string tipc_name_dist_msg_type_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " PUBLICATION " } ,
{ 1 , " WITHDRAWAL " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2008-03-17 21:35:14 +00:00
2005-12-06 17:54:40 +00:00
/* CONNECTION_MANAGER */
2006-03-07 18:19:42 +00:00
static const value_string tipc_cm_msg_type_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " CONNECTION_PROBE " } ,
{ 1 , " CONNECTION_PROBE_REPLY " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
static const value_string tipc_link_prot_msg_type_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 10 , " RESET_MSG " } ,
{ 11 , " ACTIVATE_MSG " } ,
{ 12 , " STATE_MSG " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2008-03-17 21:35:14 +00:00
2005-12-06 17:54:40 +00:00
/* CHANGEOVER_PROTOCOL */
2006-03-07 18:19:42 +00:00
static const value_string tipc_cng_prot_msg_type_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " DUPLICATE_MSG " } ,
{ 1 , " ORIGINAL_MSG " } ,
{ 2 , " INFO_MSG " } ,
{ 0 , NULL }
2005-12-06 17:54:40 +00:00
} ;
2008-03-17 21:35:14 +00:00
2005-12-06 17:54:40 +00:00
/* SEGMENTATION_MANAGER */
2005-12-07 20:07:14 +00:00
# define TIPC_FIRST_SEGMENT 1
# define TIPC_SEGMENT 2
2005-11-22 21:48:10 +00:00
const value_string tipc_sm_msg_type_values [ ] = {
2006-09-29 05:50:41 +00:00
{ 1 , " FIRST_SEGMENT " } ,
{ 2 , " SEGMENT " } ,
{ 0 , NULL }
2005-11-22 21:48:10 +00:00
} ;
2006-03-07 18:19:42 +00:00
/* TIPCv2_BCAST_PROTOCOL - Broadcast Maintenance Protocol */
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_bcast_mtype_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " Bcast " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
/* TIPCv2_MSG_BUNDLER - Message Bundler Protocol */
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_bundler_mtype_strings [ ] = {
2007-10-27 15:48:47 +00:00
{ 1 , " Bundler " } ,
{ 0 , NULL }
} ;
2006-03-07 18:19:42 +00:00
/* TIPCv2_LINK_PROTOCOL - Link State Maintenance Protocol */
2008-03-17 21:35:14 +00:00
# define TIPCv2_STATE_MSG 0
# define TIPCv2_RESET_MSG 1
# define TIPCv2_ACTIV_MSG 2
2006-03-07 18:19:42 +00:00
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_link_mtype_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ TIPCv2_STATE_MSG , " State " } ,
{ TIPCv2_RESET_MSG , " Reset " } ,
{ TIPCv2_ACTIV_MSG , " Activate " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
/* TIPCv2_CONN_MANAGER - Connection Manager */
2006-09-29 05:50:41 +00:00
# define TIPCv2_CONMGR_CONN_PROBE 0
# define TIPCv2_CONMGR_CONN_PROBE_REPLY 1
# define TIPCv2_CONMGR_MSG_ACK 2
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_connmgr_mtype_strings [ ] = {
{ TIPCv2_CONMGR_CONN_PROBE , " Probe " } ,
{ TIPCv2_CONMGR_CONN_PROBE_REPLY , " ProbeReply " } ,
{ TIPCv2_CONMGR_MSG_ACK , " Ack " } ,
2006-09-29 05:50:41 +00:00
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
/* TIPCv2_ROUTE_DISTRIBUTOR - Routing Table Update Protocol */
2007-10-27 15:48:47 +00:00
/* for TIPC 1.6 */
2008-03-17 21:35:14 +00:00
# define TIPCv2_EXT_ROUTING_TABLE 0
# define TIPCv2_LOCAL_ROUTING_TABLE 1
# define TIPCv2_SEC_ROUTING_TABLE 2
# define TIPCv2_ROUTE_ADDITION 3
# define TIPCv2_ROUTE_REMOVAL 4
2007-10-27 15:48:47 +00:00
/* for TIPC 1.7 */
# define TIPCv2_DIST_PUBLISH 0
# define TIPCv2_DIST_WITHDRAW 1
# define TIPCv2_DIST_PURGE 2
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_route_mtype_strings_1_6 [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " ExtRoutingTab " } ,
{ 1 , " LocalRoutingTab " } ,
{ 2 , " SecRoutingTab " } ,
{ 3 , " RouteAddition " } ,
{ 4 , " RouteRemoval " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_route_mtype_strings_1_7 [ ] = {
2007-10-27 15:48:47 +00:00
{ 0 , " Dist Publish " } ,
{ 1 , " Dist Withdraw " } ,
{ 2 , " Dist Purge " } ,
{ 0 , NULL }
} ;
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_dist_dist_strings [ ] = {
2007-10-27 15:48:47 +00:00
{ 0 , " Nowhere " } ,
{ 1 , " To Cluster " } ,
{ 2 , " To Zone " } ,
{ 3 , " To Cluster and Zone " } ,
{ 4 , " To Network " } ,
{ 5 , " To Cluster and Network " } ,
{ 6 , " To Zone and Network " } ,
{ 7 , " To Cluster, Zone and Network " } ,
{ 0 , NULL }
} ;
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_dist_scope_strings [ ] = {
2007-10-27 15:48:47 +00:00
{ 0 , " Zone Scope " } ,
{ 1 , " Cluster Scope " } ,
{ 2 , " Node Scope " } ,
{ 0 , NULL }
} ;
2006-03-07 18:19:42 +00:00
/* TIPCv2_CHANGEOVER_PROTOCOL - Link Changeover Protocol */
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_changeover_mtype_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " Duplicate " } ,
{ 1 , " Original " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
/* TIPCv2_NAME_DISTRIBUTOR - Name Table Update Protocol */
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_naming_mtype_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " Publication " } ,
{ 1 , " Withdrawal " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
/* TIPCv2_MSG_FRAGMENTER - Message Fragmentation Protocol" */
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_fragmenter_mtype_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " First " } ,
{ 1 , " Fragment " } ,
{ 2 , " Last " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
/* TIPCv2_NEIGHBOUR_DISCOVERY
2006-03-07 18:19:42 +00:00
* 4.3 .9 Neighbour Detection Protocol
*/
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_neighbour_mtype_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " Request " } ,
{ 1 , " Response " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
static const value_string tipcv2_networkplane_strings [ ] = {
2006-09-29 05:50:41 +00:00
{ 0 , " A " } ,
{ 1 , " B " } ,
{ 2 , " C " } ,
{ 3 , " D " } ,
{ 4 , " E " } ,
{ 5 , " F " } ,
{ 0 , NULL }
2006-03-07 18:19:42 +00:00
} ;
2008-03-17 21:35:14 +00:00
/* functions forward declarations */
2005-12-06 17:54:40 +00:00
static void dissect_tipc ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * tree ) ;
2008-03-17 21:35:14 +00:00
void proto_reg_handoff_tipc ( void ) ;
2005-12-07 20:07:14 +00:00
2006-09-29 05:50:41 +00:00
static GHashTable * tipc_msg_fragment_table = NULL ;
2005-12-07 20:07:14 +00:00
static GHashTable * tipc_msg_reassembled_table = NULL ;
static void
tipc_defragment_init ( void )
{
fragment_table_init ( & tipc_msg_fragment_table ) ;
reassembled_table_init ( & tipc_msg_reassembled_table ) ;
}
2005-11-22 21:48:10 +00:00
static gchar *
tipc_addr_to_str ( guint tipc_address )
{
guint8 zone ;
guint16 subnetwork ;
guint16 processor ;
gchar * buff ;
2008-03-17 21:35:14 +00:00
buff = ep_alloc ( MAX_TIPC_ADDRESS_STR_LEN ) ;
2005-11-22 21:48:10 +00:00
processor = tipc_address & 0x0fff ;
tipc_address = tipc_address > > 12 ;
subnetwork = tipc_address & 0x0fff ;
tipc_address = tipc_address > > 12 ;
zone = tipc_address & 0xff ;
2008-03-17 21:35:14 +00:00
g_snprintf ( buff , MAX_TIPC_ADDRESS_STR_LEN , " %u.%u.%u " , zone , subnetwork , processor ) ;
2005-11-22 21:48:10 +00:00
return buff ;
}
2005-12-04 21:50:31 +00:00
/*
2008-03-17 21:35:14 +00:00
All name distributor messages have a data part containing one or more table elements with
the following five - word structure :
struct DistributionItem {
unsigned int type ; / Published port name type /
unsigned int lower ; / Lower bound of published sequence /
unsigned int upper ; / Upper bound of published sequence /
unsigned int port ; / Random number part of port identity /
unsigned int key ; / Use for verification at withdrawal /
} ;
*/
2005-12-04 21:50:31 +00:00
static void
2008-03-17 21:35:14 +00:00
dissect_tipc_name_dist_data ( tvbuff_t * tvb , proto_tree * tree , guint8 item_size )
{
2005-12-04 21:50:31 +00:00
int offset = 0 ;
2007-10-27 15:48:47 +00:00
guint32 dword ;
gchar * addr_str_ptr ;
2008-03-17 21:35:14 +00:00
if ( ( handle_v2_as & V2_AS_1_6 ) | | ( ( handle_v2_as & ( V2_AS_ALL ) & & item_size = = 0 ) ) ) {
2007-10-27 15:48:47 +00:00
/* TIPC 1.6 */
2008-03-17 21:35:14 +00:00
while ( tvb_reported_length_remaining ( tvb , offset ) > 0 ) {
proto_tree_add_item ( tree , hf_tipc_name_dist_type , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_lower , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_upper , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_port , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_key , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
}
} else {
/* TIPC 1.7 */
2008-03-17 21:35:14 +00:00
while ( tvb_reported_length_remaining ( tvb , offset ) > 0 ) {
2007-10-27 15:48:47 +00:00
proto_tree_add_item ( tree , hf_tipc_name_dist_type , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_lower , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_upper , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_port , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipc_name_dist_key , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tree , hf_tipcv2_name_dist_port_id_node , tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
proto_tree_add_item ( tree , hf_tipcv2_dist_dist , tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tree , hf_tipcv2_dist_scope , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
if ( item_size = = 7 ) continue ;
2007-10-27 15:48:47 +00:00
/* if item_size is >7, the following fields are ignored
* so far */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tree , tvb , offset , ( ( item_size - 7 ) * 4 ) , " This field is not specified in TIPC v7 " ) ;
2007-10-27 15:48:47 +00:00
offset + = ( item_size - 7 ) * 4 ;
}
2005-12-04 21:50:31 +00:00
}
}
2006-03-07 18:19:42 +00:00
2008-03-17 21:35:14 +00:00
/* Set message type in COL INFO and return type of message (data or Internal message type */
2006-09-29 05:50:41 +00:00
static void
2008-03-17 21:35:14 +00:00
tipc_v2_set_info_col ( tvbuff_t * tvb , packet_info * pinfo , guint8 user , guint8 msg_type , guint8 hdr_size )
{
2006-09-29 05:50:41 +00:00
guint32 portNameInst , dword ;
guint32 portNameType , portNameInstLow , portNameInstHigh ;
guint8 error ;
2008-03-17 21:35:14 +00:00
guint8 item_size = 0 ;
2006-03-07 18:19:42 +00:00
2008-03-17 21:35:14 +00:00
switch ( user ) {
2006-09-29 05:50:41 +00:00
case TIPCv2_DATA_LOW :
case TIPCv2_DATA_NORMAL :
case TIPCv2_DATA_HIGH :
case TIPCv2_DATA_NON_REJECTABLE :
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_data_msg_type_defines , " unknown " ) ) ;
2008-03-17 21:35:14 +00:00
/* Display Error != 0 in Info Column */
2006-09-29 05:50:41 +00:00
dword = tvb_get_ntohl ( tvb , 4 ) ;
error = ( dword > > 25 ) & 0xf ;
if ( error > 0 )
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( error , tipcv2_error_code_short_strings , " unknown " ) ) ;
2008-03-17 21:35:14 +00:00
if ( hdr_size > 8 ) {
2006-09-29 05:50:41 +00:00
/* Port Name Type: 32 bits */
portNameType = tvb_get_ntohl ( tvb , 32 ) ;
col_append_fstr ( pinfo - > cinfo , COL_INFO , " type:%d " , portNameType ) ;
2008-03-17 21:35:14 +00:00
if ( hdr_size > 9 ) {
2006-09-29 05:50:41 +00:00
/* W9 name instance/multicast lower bound */
portNameInst = tvb_get_ntohl ( tvb , 36 ) ;
col_append_fstr ( pinfo - > cinfo , COL_INFO , " inst:%d " , portNameInst ) ;
/* Port Name Sequence Lower: 32 bits */
2008-03-17 21:35:14 +00:00
if ( hdr_size > 10 ) {
2006-09-29 05:50:41 +00:00
portNameInst = tvb_get_ntohl ( tvb , 40 ) ;
col_append_fstr ( pinfo - > cinfo , COL_INFO , " -%d " , portNameInst ) ;
2008-03-17 21:35:14 +00:00
}
2006-09-29 05:50:41 +00:00
}
}
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_BCAST_PROTOCOL :
2006-09-29 05:50:41 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_bcast_mtype_strings , " unknown " ) ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_MSG_BUNDLER :
/* No message types */
break ;
case TIPCv2_LINK_PROTOCOL :
2006-09-29 05:50:41 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_link_mtype_strings , " unknown " ) ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_CONN_MANAGER :
2006-09-29 05:50:41 +00:00
dword = tvb_get_ntohl ( tvb , 4 ) ;
2008-03-17 21:35:14 +00:00
/* Display Error != 0 in Info Column */
2006-09-29 05:50:41 +00:00
error = ( dword > > 25 ) & 0xf ;
if ( error > 0 )
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( error , tipcv2_error_code_short_strings , " unknown " ) ) ;
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_connmgr_mtype_strings , " unknown " ) ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_ROUTE_DISTRIBUTOR :
2007-10-27 15:48:47 +00:00
/* determine if it is TIPC v1.6 or v1.7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tvb , 36 ) ;
2007-10-27 15:48:47 +00:00
item_size = ( dword > > 24 ) & 0xff ;
if ( ( handle_v2_as & V2_AS_1_6 ) | | ( ( handle_v2_as & V2_AS_ALL ) = = 0 ) ) {
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_route_mtype_strings_1_6 , " unknown " ) ) ;
} else {
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_route_mtype_strings_1_7 , " unknown " ) ) ;
2008-03-17 21:35:14 +00:00
}
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_CHANGEOVER_PROTOCOL :
2006-09-29 05:50:41 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_changeover_mtype_strings , " unknown " ) ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_NAME_DISTRIBUTOR :
2006-09-29 05:50:41 +00:00
portNameType = tvb_get_ntohl ( tvb , 40 ) ;
portNameInstLow = tvb_get_ntohl ( tvb , 44 ) ;
portNameInstHigh = tvb_get_ntohl ( tvb , 48 ) ;
2008-03-17 21:35:14 +00:00
if ( portNameInstLow = = portNameInstHigh ) {
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s type:%d inst:%d " ,
val_to_str ( msg_type , tipcv2_naming_mtype_strings , " unknown " ) , portNameType , portNameInstLow ) ;
2006-09-29 05:50:41 +00:00
} else {
/* sequence */
2008-03-17 21:35:14 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s type:%d seq:%d-%d " ,
val_to_str ( msg_type , tipcv2_naming_mtype_strings , " unknown " ) , portNameType , portNameInstLow , portNameInstHigh ) ;
2006-09-29 05:50:41 +00:00
}
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_MSG_FRAGMENTER :
2006-09-29 05:50:41 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_fragmenter_mtype_strings , " unknown " ) ) ;
2006-03-07 18:19:42 +00:00
break ;
2006-11-14 05:49:59 +00:00
case TIPCv2_NEIGHBOUR_DISCOVERY :
2006-09-29 05:50:41 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , val_to_str ( msg_type , tipcv2_neighbour_mtype_strings , " unknown " ) ) ;
2006-03-07 18:19:42 +00:00
break ;
default :
2008-03-17 21:35:14 +00:00
break ;
2006-03-07 18:19:42 +00:00
}
}
2008-03-17 21:35:14 +00:00
/* Set message type in COL INFO and return type of message (data or Internal message type */
2006-03-07 18:19:42 +00:00
static gboolean
2008-03-17 21:35:14 +00:00
tipc_v1_set_col_msgtype ( packet_info * pinfo , guint8 user , guint8 msg_type )
{
2006-03-07 18:19:42 +00:00
gboolean datatype_hdr = FALSE ;
2008-03-17 21:35:14 +00:00
switch ( user ) {
case TIPC_DATA_PRIO_0 :
2006-03-07 18:19:42 +00:00
case TIPC_DATA_PRIO_1 :
case TIPC_DATA_PRIO_2 :
case TIPC_DATA_NON_REJECTABLE :
2008-03-17 21:35:14 +00:00
/*
2006-03-07 18:19:42 +00:00
* src and dest address will be found at different location depending on User ad hdr_size
*/
datatype_hdr = TRUE ;
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( msg_type , tipc_data_msg_type_values , " unknown " ) , msg_type ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPC_NAME_DISTRIBUTOR :
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( msg_type , tipc_name_dist_msg_type_values , " unknown " ) , msg_type ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPC_CONNECTION_MANAGER :
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( msg_type , tipc_cm_msg_type_values , " unknown " ) , msg_type ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPC_ROUTING_MANAGER :
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( msg_type , tipc_routing_mgr_msg_type_values , " unknown " ) , msg_type ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPC_LINK_PROTOCOL :
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( msg_type , tipc_link_prot_msg_type_values , " unknown " ) , msg_type ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPC_CHANGEOVER_PROTOCOL :
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( msg_type , tipc_cng_prot_msg_type_values , " unknown " ) , msg_type ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPC_SEGMENTATION_MANAGER :
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( msg_type , tipc_sm_msg_type_values , " unknown " ) , msg_type ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPC_MSG_BUNDLER :
break ;
default :
2008-03-17 21:35:14 +00:00
break ;
2006-03-07 18:19:42 +00:00
}
return datatype_hdr ;
}
/*
2008-03-17 21:35:14 +00:00
Version 2 ( draft - maloy - tipc - 01. txt ) :
4.2 .1 Internal Message Header Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w0 : | vers | msg usr | hdr sz | n | resrv | packet size |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w1 : | m typ | bcstsqgap | sequence gap | broadcast ack no |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w2 : | link level ack no | broadcast / link level seq no |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w3 : | previous node |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w4 : | next sent broadcast / fragm no | next sent pkt / fragm msg no |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w5 : | session no | res | r | berid | link prio | netpl | p |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w6 : | originating node |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w7 : | destination node |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w8 : | transport sequence number |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w9 : | msg count | link tolerance |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
\ \
/ User Specific Data /
\ \
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
*/
2006-03-07 18:19:42 +00:00
static void
2007-06-25 06:10:36 +00:00
dissect_tipc_v2_internal_msg ( tvbuff_t * tipc_tvb , proto_tree * tipc_tree , packet_info * pinfo , int offset , guint8 user , guint32 msg_size , guint8 orig_hdr_size )
2006-03-07 18:19:42 +00:00
{
guint32 dword ;
gchar * addr_str_ptr ;
tvbuff_t * data_tvb ;
2006-09-29 05:50:41 +00:00
guint8 message_type ;
2008-03-17 21:35:14 +00:00
guint8 item_size = 0 ;
2007-06-25 06:10:36 +00:00
guint16 message_count ;
guint msg_no = 0 ;
guint32 msg_in_bundle_size ;
2007-10-27 15:48:47 +00:00
guint8 msg_in_bundle_user ;
2008-04-08 14:49:56 +00:00
gint b_inst_strlen , padlen ;
2006-03-07 18:19:42 +00:00
2007-09-17 14:10:34 +00:00
/* for fragmented messages */
gint len , reported_len ;
2008-03-17 21:35:14 +00:00
gboolean save_fragmented ;
2007-09-17 14:10:34 +00:00
guint32 frag_no , frag_msg_no ;
tvbuff_t * new_tvb = NULL ;
fragment_data * frag_msg = NULL ;
2008-03-17 21:35:14 +00:00
message_type = ( tvb_get_guint8 ( tipc_tvb , offset ) > > 5 ) & 0x7 ;
2006-03-07 18:19:42 +00:00
2008-03-17 21:35:14 +00:00
switch ( user ) {
2006-03-07 18:19:42 +00:00
case TIPCv2_BCAST_PROTOCOL :
/* W1 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bcast_mtype , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-29 05:50:41 +00:00
/* NO bcstsqgap */
/* NO sequence gap */
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W2 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
/* W4-8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 20 , " words 4-8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 20 ;
} else {
/* W4 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 4 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
/* W5 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_network_id , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
/* W6 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
}
2006-09-29 05:50:41 +00:00
/* W9 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bcast_tag , tipc_tvb , offset , 4 , FALSE ) ;
/* NO link tolerance */
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
break ;
case TIPCv2_MSG_BUNDLER :
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
/* W1+W2 */
/* No message types */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 8 , " words 1+2 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 8 ;
} else {
/* W1 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bundler_mtype , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
/* W2 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
}
2006-03-07 18:19:42 +00:00
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
/* W4-8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 20 , " words 4-8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 20 ;
} else {
/* W4+5 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 8 , " words 4+5 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 8 ;
/* W6 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
}
2006-03-07 18:19:42 +00:00
/* W9 */
/* Message Count: 16 bits. */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_msg_count , tipc_tvb , offset , 4 , FALSE ) ;
2008-03-17 21:35:14 +00:00
message_count = tvb_get_ntohs ( tipc_tvb , offset ) ;
2007-06-25 06:10:36 +00:00
/* According to the spec this should not be set here,
* while there is data ! = 0 in this field when capturing
*
2008-03-17 21:35:14 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_tolerance , tipc_tvb , offset , 4 , FALSE ) ;
2007-06-25 06:10:36 +00:00
*/
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2007-06-25 06:10:36 +00:00
/* This should give equal results like
2008-03-17 21:35:14 +00:00
* while ( message_count - - > 0 ) */
while ( ( guint32 ) offset < msg_size ) {
2007-06-25 06:10:36 +00:00
msg_no + + ;
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
msg_in_bundle_size = dword & 0x1ffff ;
msg_in_bundle_user = ( dword > > 25 ) & 0xf ;
2007-06-25 06:10:36 +00:00
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( top_tree , tipc_tvb , offset , msg_in_bundle_size , " Message %u of %u in Bundle (%s) " ,
msg_no , message_count , val_to_str ( msg_in_bundle_user , tipcv2_user_short_str_vals , " unknown " ) ) ;
2007-06-25 06:10:36 +00:00
data_tvb = tvb_new_subset ( tipc_tvb , offset , msg_in_bundle_size , msg_in_bundle_size ) ;
/* the info column shall not be deleted by the
* encapsulated messages */
2010-03-02 16:43:22 +00:00
col_append_str ( pinfo - > cinfo , COL_INFO , " | " ) ;
col_set_fence ( pinfo - > cinfo , COL_INFO ) ;
2007-06-25 06:10:36 +00:00
2007-10-27 15:48:47 +00:00
dissect_tipc ( data_tvb , pinfo , top_tree ) ;
2007-06-25 06:10:36 +00:00
/* the modulo is used to align the messages to 4 Bytes */
2007-10-27 15:48:47 +00:00
offset + = msg_in_bundle_size + ( ( msg_in_bundle_size % 4 ) ? ( 4 - ( msg_in_bundle_size % 4 ) ) : 0 ) ;
2007-06-25 06:10:36 +00:00
}
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_LINK_PROTOCOL :
/* W1 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_mtype , tipc_tvb , offset , 4 , FALSE ) ;
/* Broadcast Sequence Gap: 5 bits. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bcast_seq_gap , tipc_tvb , offset , 4 , FALSE ) ;
/* Sequence Gap: 8 bits. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_sequence_gap , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W2 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W4 */
/* Next Sent Broadcast: 16 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_next_sent_broadcast , tipc_tvb , offset , 4 , FALSE ) ;
/* Next Sent Packet: 16 bits. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_next_sent_packet , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
/* W5 */
/* Session Number: 16 bits. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_session_no , tipc_tvb , offset , 4 , FALSE ) ;
/* Reserved: 3 bits Must be set to zero. */
2006-09-29 05:50:41 +00:00
/* the following two fields appear in this user according to */
2007-06-25 06:10:36 +00:00
/* Jon Maloy on the tipc-discussion mailing list */
2006-03-07 18:19:42 +00:00
/* Redundant Link: 1 bit */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_redundant_link , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
/* Bearer Identity: 3 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_bearer_id , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
/* Link Priority: 5 bits. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_prio , tipc_tvb , offset , 4 , FALSE ) ;
/* Network Plane: 3 bits. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_network_plane , tipc_tvb , offset , 4 , FALSE ) ;
/* Probe: 1 bit. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_probe , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
/* W6-8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 12 , " words 6-8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 12 ;
} else {
/* W6 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W8 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_timestamp , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
}
2006-03-07 18:19:42 +00:00
/* W9 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_max_packet , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
/* Link Tolerance: 16 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_tolerance , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
if ( ( message_type = = TIPCv2_RESET_MSG )
2008-04-08 14:49:56 +00:00
| | ( ( message_type = = TIPCv2_STATE_MSG ) & & ( ( msg_size - ( orig_hdr_size * 4 ) ) ! = 0 ) ) ) /* is allowed */
2006-03-07 18:19:42 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_bearer_instance , tipc_tvb , offset , - 1 , FALSE ) ;
2008-04-08 14:49:56 +00:00
/* the bearer instance string is padded with \0 to the next word boundry */
b_inst_strlen = tvb_strsize ( tipc_tvb , offset ) ;
offset + = b_inst_strlen ;
if ( ( padlen = ( 4 - b_inst_strlen % 4 ) ) > 0 ) {
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , padlen , " Padding: %d byte%c " , padlen , ( padlen ! = 1 ? ' s ' : 0 ) ) ;
offset + = padlen ;
} ;
if ( ( offset - msg_size ) > 0 ) {
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , - 1 , " Filler for MTU discovery: %d byte%c " , tvb_length_remaining ( tipc_tvb , offset ) , ( padlen ! = 1 ? ' s ' : 0 ) ) ;
} ;
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_CONN_MANAGER :
2006-09-29 05:50:41 +00:00
/* CONN_MANAGER uses the 36-byte header format of CONN_MSG payload messages */
2008-03-17 21:35:14 +00:00
/* W1 */
2006-03-07 18:19:42 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_connmgr_mtype , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_errorcode , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_rer_cnt , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_lookup_scope , tipc_tvb , offset , 4 , FALSE ) ;
/* Options Position: 3 bits */
2008-03-17 21:35:14 +00:00
/* this is not used by this user according to Jon Maloy in tipc-discussion mailing list
opt_p = tvb_get_guint8 ( tipc_tvb , offset + 1 ) & 0x7 ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_opt_p , tipc_tvb , offset , 4 , FALSE ) ;
if ( opt_p ! = 0 ) {
hdr_size = hdr_size - ( opt_p < < 2 ) ;
}
*/
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
2008-03-17 21:35:14 +00:00
/* W2 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
2006-03-07 18:19:42 +00:00
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-09-29 05:50:41 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
2006-03-07 18:19:42 +00:00
/* W4 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_org_port , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
2006-03-07 18:19:42 +00:00
/* W5 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_dst_port , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
2006-03-07 18:19:42 +00:00
/* W6 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-09-29 05:50:41 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
2006-03-07 18:19:42 +00:00
/* W7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-09-29 05:50:41 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
/* W8 */
2008-03-17 21:35:14 +00:00
/* according to Allan Stephens this was never verfied by the receiver
proto_tree_add_item ( tipc_tree , hf_tipcv2_transport_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
*/
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 8 unused for this user (might be set prior to 1.7.3 but was never verified) " ) ;
2006-09-29 05:50:41 +00:00
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
2008-03-17 21:35:14 +00:00
/* this is not used here according to Jon Maloy in tipc-discussion mailing list
2006-09-29 05:50:41 +00:00
* Options
2008-03-17 21:35:14 +00:00
if ( opt_p ! = 0 ) {
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , ( opt_p > > 2 ) , " Options " ) ;
offset = offset + ( opt_p < < 2 ) ;
}
*/
2006-09-29 05:50:41 +00:00
2008-03-17 21:35:14 +00:00
if ( message_type = = TIPCv2_CONMGR_MSG_ACK | | ( handle_v2_as & ( V2_AS_ALL + V2_AS_1_7 ) ) )
2006-09-29 05:50:41 +00:00
{
2007-10-27 15:48:47 +00:00
/* W9 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_conn_mgr_msg_ack , tipc_tvb , offset , 4 , FALSE ) ;
2007-10-27 15:48:47 +00:00
offset + = 4 ;
2006-09-29 05:50:41 +00:00
}
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_ROUTE_DISTRIBUTOR :
/* W1 */
2007-10-27 15:48:47 +00:00
/* determine if it is TIPC v1.6 or v1.7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset + 28 ) ;
2007-10-27 15:48:47 +00:00
item_size = ( dword > > 24 ) & 0xff ;
if ( ( handle_v2_as & V2_AS_1_6 ) | | ( ( handle_v2_as & V2_AS_ALL ) = = 0 ) ) {
proto_tree_add_item ( tipc_tree , hf_tipcv2_route_mtype_1_6 , tipc_tvb , offset , 4 , FALSE ) ;
} else {
proto_tree_add_item ( tipc_tree , hf_tipcv2_route_mtype_1_7 , tipc_tvb , offset , 4 , FALSE ) ;
2008-03-17 21:35:14 +00:00
}
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W2 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W4 */
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & V2_AS_1_6 ) {
/* W4-9 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 24 , " words 4-9 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 24 ;
} else {
/* W4 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 4 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
/* W5 */
proto_tree_add_item ( tipc_tree , hf_tipc_dst_port , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
/* W6 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
/* W9 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
item_size = ( dword > > 24 ) & 0xff ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_item_size , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
}
2008-03-17 21:35:14 +00:00
/* item_size == 0 indicates that it's TIPC v1.6 style */
if ( ( handle_v2_as & V2_AS_1_6 ) | | ( ( handle_v2_as & V2_AS_ALL ) & & ( item_size = = 0 ) ) ) {
2007-10-27 15:48:47 +00:00
/* W10 */
2008-03-17 21:35:14 +00:00
switch ( message_type ) {
2007-10-27 15:48:47 +00:00
case TIPCv2_EXT_ROUTING_TABLE : /* 0 */
case TIPCv2_LOCAL_ROUTING_TABLE : /* 1 */
case TIPCv2_SEC_ROUTING_TABLE : /* 2 */
/* Cluster Address */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_cluster_address , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* bitmap */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bitmap , tipc_tvb , offset , - 1 , FALSE ) ;
break ;
case TIPCv2_ROUTE_ADDITION : /* 3 */
case TIPCv2_ROUTE_REMOVAL : /* 4 */
/* Node Address */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_node_address , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
default :
break ;
}
} else {
/* what if item_size is set to a value fitting to TIPC v1.6 ? */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_network_region , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset + = 4 ;
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_local_router , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset + = 4 ;
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_remote_router , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset + = 4 ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_dist_dist , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_dist_scope , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2006-03-07 18:19:42 +00:00
}
break ;
2007-10-27 15:48:47 +00:00
2006-03-07 18:19:42 +00:00
case TIPCv2_CHANGEOVER_PROTOCOL :
/* W1 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_changeover_mtype , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W2 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W4 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 4 unused for this user " ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W5 */
2006-09-29 05:50:41 +00:00
/* the following two fields appear in this user according to */
2007-06-25 06:10:36 +00:00
/* Jon Maloy on the tipc-discussion mailing list */
2006-09-29 05:50:41 +00:00
/* Redundant Link: 1 bit */
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
proto_tree_add_item ( tipc_tree , hf_tipcv2_redundant_link , tipc_tvb , offset , 4 , FALSE ) ;
}
2006-09-29 05:50:41 +00:00
/* Bearer Identity: 3 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bearer_id , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
/* W6-W8 */
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
/* W6-8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 12 , " words 6-8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 12 ;
} else {
/* W6 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W8 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
}
2006-03-07 18:19:42 +00:00
/* W9 */
2006-09-29 05:50:41 +00:00
switch ( message_type )
{
case 0 :
/* DUPLICATE_MSG */
2008-04-08 14:49:56 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 9 unused for this message type " ) ;
2006-09-29 05:50:41 +00:00
break ;
case 1 :
/* ORIGINAL_MSG */
/* Message Count: 16 bits. */
proto_tree_add_item ( tipc_tree , hf_tipcv2_msg_count , tipc_tvb , offset , 4 , FALSE ) ;
break ;
default :
break ;
}
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
break ;
case TIPCv2_NAME_DISTRIBUTOR :
/* W1 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_naming_mtype , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W2 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2006-09-29 05:50:41 +00:00
/* W4+W5 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 8 , " words 4+5 unused for this user " ) ;
2006-09-29 05:50:41 +00:00
offset = offset + 8 ;
2006-03-07 18:19:42 +00:00
/* W6 */
/* Originating Node: 32 bits. */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2007-10-27 15:48:47 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W7 */
/* Destination Node: 32 bits. */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2007-10-27 15:48:47 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 + V2_AS_ALL ) ) {
/* W8 */
/* Transport Level Sequence Number: 32 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_transport_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
} else {
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 8 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
}
2006-03-07 18:19:42 +00:00
/* W9 */
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & V2_AS_1_6 ) {
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 9 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
} else {
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
item_size = ( dword > > 24 ) & 0xff ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_item_size , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
}
2006-03-07 18:19:42 +00:00
/* W10 */
2006-09-29 05:50:41 +00:00
/* dissect the (one or more) Publications */
2009-08-16 12:36:22 +00:00
data_tvb = tvb_new_subset_remaining ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
dissect_tipc_name_dist_data ( data_tvb , tipc_tree , item_size ) ;
2006-03-07 18:19:42 +00:00
break ;
case TIPCv2_MSG_FRAGMENTER :
/* W1 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_fragmenter_mtype , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W2 */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W4 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
/* Fragment Number: 16 Bits. */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_fragment_number , tipc_tvb , offset , 4 , FALSE ) ;
2007-09-17 14:10:34 +00:00
frag_no = ( dword > > 16 ) & 0x0000ffff ;
2006-09-29 05:50:41 +00:00
/* Fragment msg Number: 16 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_fragment_msg_number , tipc_tvb , offset , 4 , FALSE ) ;
2007-09-17 14:10:34 +00:00
frag_msg_no = dword & 0x0000ffff ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
/* W5-W9 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 20 , " words 5-9 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 20 ;
} else {
/* W5 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " word 5 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 4 ;
/* W6 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W7 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2007-10-27 15:48:47 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* W8+9 */
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 8 , " words 8+9 unused for this user " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + 8 ;
}
2007-09-17 14:10:34 +00:00
len = ( msg_size - ( orig_hdr_size < < 2 ) ) ;
reported_len = tvb_reported_length_remaining ( tipc_tvb , offset ) ;
2008-03-17 21:35:14 +00:00
if ( tipc_defragment ) {
2007-09-17 14:10:34 +00:00
/* reassemble fragmented packages */
save_fragmented = pinfo - > fragmented ;
pinfo - > fragmented = TRUE ;
frag_msg = fragment_add_seq_check ( tipc_tvb , offset , pinfo ,
2008-03-17 21:35:14 +00:00
frag_msg_no , /* ID for fragments belonging together */
/* TODO: make sure that fragments are on the same LINK */
tipc_msg_fragment_table , /* list of message fragments */
tipc_msg_reassembled_table , /* list of reassembled messages */
2007-09-17 14:10:34 +00:00
/* TIPC starts with "1" but we * need "0" */
2008-03-17 21:35:14 +00:00
( frag_no - 1 ) , /* number of the fragment */
len , /* fragment length - to the end of the data */
( message_type ! = TIPCv2_USER_LAST_FRAGMENT ) ) ; /* More fragments? */
2007-09-17 14:10:34 +00:00
new_tvb = process_reassembled_data ( tipc_tvb , offset , pinfo ,
2010-02-06 18:20:21 +00:00
" Reassembled TIPC " , frag_msg , & tipc_msg_frag_items ,
2007-09-17 14:10:34 +00:00
NULL , tipc_tree ) ;
if ( frag_msg ) { /* Reassembled */
2009-09-24 20:21:23 +00:00
col_append_str ( pinfo - > cinfo , COL_INFO ,
2007-09-17 14:10:34 +00:00
" (Message Reassembled) " ) ;
} else { /* Not last packet of reassembled Short Message */
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO ,
" (Message fragment %u) " , frag_no ) ;
2007-09-17 14:10:34 +00:00
}
if ( new_tvb ) { /* take it all */
data_tvb = new_tvb ;
/* the info column shall not be deleted by the
* encapsulated messages */
2010-03-02 16:43:22 +00:00
col_append_str ( pinfo - > cinfo , COL_INFO , " | " ) ;
col_set_fence ( pinfo - > cinfo , COL_INFO ) ;
2008-03-17 21:35:14 +00:00
dissect_tipc ( new_tvb , pinfo , top_tree ) ;
2007-09-17 14:10:34 +00:00
} else { /* make a new subset */
data_tvb = tvb_new_subset ( tipc_tvb , offset , len , reported_len ) ;
call_dissector ( data_handle , data_tvb , pinfo , top_tree ) ;
}
pinfo - > fragmented = save_fragmented ;
} else {
/* don't reassemble is set in the "preferences" */
data_tvb = tvb_new_subset ( tipc_tvb , offset , len , reported_len ) ;
call_dissector ( data_handle , data_tvb , pinfo , top_tree ) ;
}
2006-03-07 18:19:42 +00:00
break ;
2006-11-14 05:49:59 +00:00
case TIPCv2_NEIGHBOUR_DISCOVERY :
2006-03-07 18:19:42 +00:00
/*
The protocol for neighbour detection
2008-03-17 21:35:14 +00:00
uses a special message format , with the following generic structure :
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w0 : | vers | msg usr | hdr sz | n | resrv | packet size |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w1 : | m typ | 0 | requested links | broadcast ack no |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w2 : | destination domain |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w3 : | previous node |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w4 : | network identity |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w5 : | |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w6 : | |
+ - + - + - + - + - + - + - bearer level originating address + - + - + - + - + - + - + - +
w7 : | |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w8 : | |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w9 : | |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
\ \
/ vendor specific data ( optional ) /
\ \
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
*/
2006-03-07 18:19:42 +00:00
/* W1 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_neighbour_mtype , tipc_tvb , offset , 4 , FALSE ) ;
/* Requested Links (12 bits) */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_req_links , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W2 */
/* Destination Domain */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_destination_domain , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W4 */
/* Network Identity: */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_network_id , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_1_6 ) ) {
/* W5 - W9 Bearer Level Originating Address: */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bearer_level_orig_addr , tipc_tvb , offset , 20 , FALSE ) ;
offset = offset + 20 ;
} else {
/* W5 */
proto_tree_add_item ( tipc_tree , hf_tipcv2_media_id , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
/* W6 - W9 Bearer Level Originating Address: */
proto_tree_add_item ( tipc_tree , hf_tipcv2_bearer_level_orig_addr , tipc_tvb , offset , 16 , FALSE ) ;
offset = offset + 16 ;
}
2008-03-17 21:35:14 +00:00
if ( msg_size - ( orig_hdr_size * 4 ) ! = 0 ) {
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , - 1 , " Vendor specific data " ) ;
2006-09-29 05:50:41 +00:00
}
2006-03-07 18:19:42 +00:00
break ;
default :
2008-03-17 21:35:14 +00:00
break ;
2006-03-07 18:19:42 +00:00
}
}
2008-03-17 21:35:14 +00:00
/* Version 2 Header
2006-06-29 06:32:21 +00:00
http : //tipc.sourceforge.net/doc/draft-spec-tipc-02.html#sec:TIPC_Pkt_Format
3.1 .1 . Payload Message Header Format
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w0 : | vers | user | hdr sz | n | d | s | r | message size |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w1 : | mstyp | error | rer cnt | lsc | opt p | broadcast ack no |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w2 : | link level ack no | broadcast / link level seq no |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w3 : | previous node |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w4 : | originating port |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w5 : | destination port |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w6 : | originating node |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w7 : | destination node |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w8 : | name type / transport sequence number |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
w9 : | name instance / multicast lower bound |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
wA : | multicast upper bound |
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
/ /
\ options \
/ /
+ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
2008-03-17 21:35:14 +00:00
*/
2006-03-07 18:19:42 +00:00
2007-09-17 14:10:34 +00:00
/* this function tries to call subdissectors for encapsulated data
* @ name_type pointer to the used port name type , NULL if not available
* @ user guint8 holding the used TIPC user , is allways available
*/
static void
call_tipc_v2_data_subdissectors ( tvbuff_t * data_tvb , packet_info * pinfo , guint32 * name_type_p , guint8 user )
{
2008-03-17 21:35:14 +00:00
if ( dissect_tipc_data ) {
2007-09-17 14:10:34 +00:00
/* dissection of TIPC data is set in preferences */
/* check for heuristic dissectors if specified in the
* preferences to try them first */
if ( try_heuristic_first ) {
if ( dissector_try_heuristic ( tipc_heur_subdissector_list , data_tvb , pinfo , top_tree ) )
return ;
}
/* This triggers if a dissectors if
* tipc . user is just set to a TIPC user holding data */
2010-12-20 05:35:29 +00:00
if ( dissector_try_uint ( tipc_user_dissector , user , data_tvb , pinfo , top_tree ) )
2007-09-17 14:10:34 +00:00
return ;
/* The Name Type is not always explicitly set in a TIPC Data
2008-03-17 21:35:14 +00:00
* Message .
2007-09-17 14:10:34 +00:00
*
2009-07-12 13:41:36 +00:00
* On the tipc - discussion mailing list , Allan Stephens described
2007-09-17 14:10:34 +00:00
* where the Port Name is not set with the following words :
*
* < cite >
* The " named " and " mcast " message types have info in the TIPC header to
* specify the message ' s destination ( a port name and port name sequence ,
* respectively ) ; these message types typically occur when an application
* sends connectionless traffic . The " conn " type is used to carry
* connection - oriented traffic over an already established connection ;
* since the sending socket / port already knows the port ID of the other end
* of the connection , there is no need for any port name information to be
* present in the TIPC header .
2008-03-17 21:35:14 +00:00
*
2007-09-17 14:10:34 +00:00
* The " direct " type is used to carry connectionless traffic to a
* destination that was specified using a port ID , rather than a port name ;
* again , no port name info is present in the TIPC header because it is not
* required . Situations where this sort of message might be generated
* include : a ) an application obtains a port ID as part of a subscription
* event generated by TIPC ' s topology server and then sends a message to
* that port ID ( using sendto ( ) or sendmsg ( ) ) , and b ) a server obtains a
* client ' s port ID when it receives a message from the client ( using
* recvfrom ( ) or recvmsg ( ) ) and then sends a reply back to that client port
* ID ( using sendto ( ) or sendmsg ( ) ) .
* < / cite >
*
* TODO : it should be determined by
* some kind of static function which port name type a message
* is going to , if it is not specified explicitly in a message */
2008-03-17 21:35:14 +00:00
if ( name_type_p )
2010-12-20 05:35:29 +00:00
if ( dissector_try_uint ( tipc_type_dissector , * name_type_p , data_tvb , pinfo , top_tree ) )
2007-09-17 14:10:34 +00:00
return ;
/* check for heuristic dissectors if specified in the
* preferences not to try them first */
if ( ! try_heuristic_first ) {
if ( dissector_try_heuristic ( tipc_heur_subdissector_list , data_tvb , pinfo , top_tree ) )
return ;
}
}
2008-03-17 21:35:14 +00:00
/* dissection of TIPC data is not set in preferences or no subdissector found */
2007-09-17 14:10:34 +00:00
call_dissector ( data_handle , data_tvb , pinfo , top_tree ) ;
}
2006-03-07 18:19:42 +00:00
static void
2007-06-25 06:10:36 +00:00
dissect_tipc_v2 ( tvbuff_t * tipc_tvb , proto_tree * tipc_tree , packet_info * pinfo , int offset , guint8 user , guint32 msg_size , guint8 hdr_size , gboolean datatype_hdr )
2006-03-07 18:19:42 +00:00
{
guint32 dword ;
gchar * addr_str_ptr ;
2008-03-17 21:35:14 +00:00
guint8 opt_p = 0 ;
2007-06-25 06:10:36 +00:00
proto_item * item ;
2006-03-07 18:19:42 +00:00
/* The unit used is 32 bit words */
guint8 orig_hdr_size ;
2008-03-17 21:35:14 +00:00
guint32 name_type = 0 ;
guint32 * name_type_p = NULL ;
2007-06-25 06:10:36 +00:00
tvbuff_t * data_tvb ;
gint len , reported_len ;
2006-03-07 18:19:42 +00:00
orig_hdr_size = hdr_size ;
2008-03-17 21:35:14 +00:00
/* Word 0 */
2006-03-07 18:19:42 +00:00
/* Version: 3 bits */
proto_tree_add_item ( tipc_tree , hf_tipc_ver , tipc_tvb , offset , 4 , FALSE ) ;
/* User: 4 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_usr , tipc_tvb , offset , 4 , FALSE ) ;
/* Header Size: 4 bits */
2006-11-23 20:17:58 +00:00
item = proto_tree_add_item ( tipc_tree , hf_tipc_hdr_size , tipc_tvb , offset , 4 , FALSE ) ;
2008-04-08 14:49:56 +00:00
proto_item_append_text ( item , " = %u bytes " , ( hdr_size * 4 ) ) ;
2006-03-07 18:19:42 +00:00
/* Non-sequenced: 1 bit */
2008-03-17 21:35:14 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_nonsequenced , tipc_tvb , offset , 4 , FALSE ) ;
if ( datatype_hdr ) {
2006-06-29 06:27:57 +00:00
/* Destination Droppable: 1 bit */
2008-03-17 21:35:14 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_destdrop , tipc_tvb , offset , 4 , FALSE ) ;
2006-06-29 06:27:57 +00:00
/* Source Droppable: 1 bit */
2008-03-17 21:35:14 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_srcdrop , tipc_tvb , offset , 4 , FALSE ) ;
2006-06-29 06:27:57 +00:00
}
/* Reserved: 1 bits */
2006-03-07 18:19:42 +00:00
/* Message Size: 17 bits */
proto_tree_add_item ( tipc_tree , hf_tipc_msg_size , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
if ( ! datatype_hdr ) {
2007-06-25 06:10:36 +00:00
dissect_tipc_v2_internal_msg ( tipc_tvb , tipc_tree , pinfo , offset , user , msg_size , orig_hdr_size ) ;
2006-03-07 18:19:42 +00:00
return ;
}
2008-03-17 21:35:14 +00:00
/* Word 1 */
2006-03-07 18:19:42 +00:00
/* Message Type: 3 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_data_msg_type , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
/* Error Code: 4 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_errorcode , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-17 20:23:23 +00:00
2006-03-07 18:19:42 +00:00
/* Reroute Counter: 4 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_rer_cnt , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
/* Lookup Scope: 2 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_lookup_scope , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
/* Options Position: 3 bits */
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_ALL + V2_AS_1_6 ) ) {
opt_p = tvb_get_guint8 ( tipc_tvb , offset + 1 ) & 0x7 ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_opt_p , tipc_tvb , offset , 4 , FALSE ) ;
2008-03-17 21:35:14 +00:00
if ( opt_p ! = 0 ) {
hdr_size = hdr_size - ( opt_p < < 2 ) ;
2007-10-27 15:48:47 +00:00
}
2006-03-07 18:19:42 +00:00
}
/* Broadcast Acknowledge Number: 16 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_broadcast_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
/* W2 */
2006-03-07 18:19:42 +00:00
/* Link Level Acknowledge Number: 16 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_ack_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
/* broadcast/link level seq no */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_link_level_seq_no , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W3 previous node */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_prev_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W4 Originating Port: 32 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_org_port , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W5 Destination Port: 32 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_dst_port , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
if ( hdr_size > 6 ) {
2006-03-07 18:19:42 +00:00
/* W6 Originating Node: 32 bits */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_orig_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
/* W7 Destination Node: 32 bits */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipcv2_dest_node , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
if ( hdr_size > 8 ) {
2006-03-07 18:19:42 +00:00
/* W8 name type / transport sequence number */
/* Transport Level Sequence Number: 32 bits */
/* Port Name Type: 32 bits */
2006-09-29 05:50:41 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_port_name_type , tipc_tvb , offset , 4 , FALSE ) ;
2007-09-17 14:10:34 +00:00
name_type = tvb_get_ntohl ( tipc_tvb , offset ) ;
name_type_p = & name_type ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
if ( hdr_size > 9 ) {
2006-03-07 18:19:42 +00:00
/* W9 name instance/multicast lower bound */
2007-09-17 14:10:34 +00:00
if ( hdr_size < 11 )
/* no multicast */
/* Port Name Instance: 32 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_port_name_instance , tipc_tvb , offset , 4 , FALSE ) ;
else
/* multicast */
/* Port Name Sequence Lower: 32 bits */
proto_tree_add_item ( tipc_tree , hf_tipcv2_multicast_lower , tipc_tvb , offset , 4 , FALSE ) ;
2008-03-17 21:35:14 +00:00
offset = offset + 4 ;
if ( hdr_size > 10 ) {
2006-03-07 18:19:42 +00:00
/* W10 multicast upper bound */
/* Port Name Sequence Upper: 32 bits */
2007-09-17 14:10:34 +00:00
proto_tree_add_item ( tipc_tree , hf_tipcv2_multicast_upper , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
}
2006-03-07 18:19:42 +00:00
}
}
}
/* Options */
2007-10-27 15:48:47 +00:00
if ( handle_v2_as & ( V2_AS_ALL + V2_AS_1_6 ) ) {
2008-03-17 21:35:14 +00:00
if ( opt_p ! = 0 ) {
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , ( opt_p > > 2 ) , " Options " ) ;
2007-10-27 15:48:47 +00:00
offset = offset + ( opt_p < < 2 ) ;
}
2006-03-07 18:19:42 +00:00
}
/* TIPCv2 data */
2007-06-25 06:10:36 +00:00
len = ( msg_size - ( orig_hdr_size < < 2 ) ) ;
reported_len = tvb_reported_length_remaining ( tipc_tvb , offset ) ;
data_tvb = tvb_new_subset ( tipc_tvb , offset , len , reported_len ) ;
2007-09-17 14:10:34 +00:00
2008-03-17 21:35:14 +00:00
call_tipc_v2_data_subdissectors ( data_tvb , pinfo , name_type_p , user ) ;
2006-03-07 18:19:42 +00:00
}
2005-12-04 21:50:31 +00:00
/* From message.h (http://cvs.sourceforge.net/viewcvs.py/tipc/source/stable_ericsson/TIPC_SCC/src/Message.h?rev=1.2&view=markup)
2008-03-17 21:35:14 +00:00
////////////////////////////////////////////////////////////////////
TIPC internal header format , version 1 :
2005-12-04 21:50:31 +00:00
: :
| Word 0 - 2 : common to all users |
| |
+ - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - +
| netw - | imp | link | | | p | bea - | link |
2008-03-17 21:35:14 +00:00
w3 : | ork | ort | sel - | message count | | r | rer | sel - |
| id | anc | ector | | | b | id | ector |
2005-12-04 21:50:31 +00:00
+ - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - +
| |
w4 : | remote address |
| |
+ - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - +
| msg | | |
w5 : | type | gap | next sent |
| | | |
+ - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - +
| | link | |
w6 : | reserve | prio - | link tolerance |
| | ity | |
+ - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - +
| |
w7 : | |
| |
+ - - - - - - - + - - - - - - - + + - - - - - - - + - - - - - - - +
| |
w8 : | |
| |
+ - - - - - - - + - - - - - - - + bearer name + - - - - - - - + - - - - - - - +
| |
w9 : | |
| |
+ - - - - - - - + - - - - - - - + + - - - - - - - + - - - - - - - +
| |
wa : | |
| |
+ - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - + - - - - - - - +
2008-03-17 21:35:14 +00:00
NB : Connection Manager and Name Distributor use data message format .
2005-12-04 21:50:31 +00:00
*/
2005-11-22 21:48:10 +00:00
static void
2008-03-17 21:35:14 +00:00
dissect_tipc_int_prot_msg ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * tipc_tree , int offset , guint8 user , guint32 msg_size )
{
2005-11-22 21:48:10 +00:00
guint8 msg_type ;
2005-12-06 17:54:40 +00:00
tvbuff_t * data_tvb ;
guint16 message_count ;
guint32 msg_in_bundle_size ;
2005-12-07 20:07:14 +00:00
guint32 dword ;
2005-12-06 17:54:40 +00:00
guint msg_no = 0 ;
2005-12-07 20:07:14 +00:00
guint8 link_sel ;
guint16 link_lev_seq_no ;
guint32 reassembled_msg_length = 0 ;
2006-02-07 19:29:51 +00:00
guint32 no_of_segments = 0 ;
2005-12-07 20:07:14 +00:00
2008-03-17 21:35:14 +00:00
gboolean save_fragmented ;
2005-12-07 20:07:14 +00:00
tvbuff_t * new_tvb = NULL ;
tvbuff_t * next_tvb = NULL ;
fragment_data * frag_msg = NULL ;
2006-02-07 19:29:51 +00:00
proto_item * item ;
2008-03-17 21:35:14 +00:00
link_lev_seq_no = tvb_get_ntohl ( tvb , 4 ) & 0xffff ;
2005-11-22 21:48:10 +00:00
/* Internal Protocol Header */
/* Unused */
2005-12-07 20:07:14 +00:00
2008-03-17 21:35:14 +00:00
msg_type = tvb_get_guint8 ( tvb , 20 ) > > 4 ;
2005-12-04 21:50:31 +00:00
/* W3 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tvb , offset ) ;
2005-12-07 20:07:14 +00:00
link_sel = dword & 0x7 ;
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_unused2 , tvb , offset , 4 , FALSE ) ;
/* Importance */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_SEGMENTATION_MANAGER )
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_importance , tvb , offset , 4 , FALSE ) ;
/* Link selector */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_SEGMENTATION_MANAGER | | user = = TIPC_NAME_DISTRIBUTOR | | user = = TIPC_CHANGEOVER_PROTOCOL )
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_link_selector , tvb , offset , 4 , FALSE ) ;
/* Message count */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_MSG_BUNDLER | | user = = TIPC_CHANGEOVER_PROTOCOL ) {
message_count = tvb_get_ntohs ( tvb , offset + 2 ) ;
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_msg_cnt , tvb , offset , 4 , FALSE ) ;
2005-12-06 17:54:40 +00:00
}
2005-11-22 21:48:10 +00:00
/* Unused */
/* Probe */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_LINK_PROTOCOL )
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_probe , tvb , offset , 4 , FALSE ) ;
/* Bearer identity */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_LINK_PROTOCOL | | user = = TIPC_CHANGEOVER_PROTOCOL )
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_bearer_id , tvb , offset , 4 , FALSE ) ;
/* Link selector */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_SEGMENTATION_MANAGER | | user = = TIPC_NAME_DISTRIBUTOR | | user = = TIPC_CHANGEOVER_PROTOCOL )
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_link_selector2 , tvb , offset , 4 , FALSE ) ;
2008-03-17 21:35:14 +00:00
2005-11-22 21:48:10 +00:00
offset = offset + 4 ;
2005-12-04 21:50:31 +00:00
/* W4 */
2005-11-22 21:48:10 +00:00
/* Remote address */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_ROUTING_MANAGER )
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_remote_addr , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
2005-12-04 21:50:31 +00:00
/* W5 */
2005-11-22 21:48:10 +00:00
/* Message type */
2008-03-17 21:35:14 +00:00
switch ( user ) {
case TIPC_ROUTING_MANAGER :
proto_tree_add_item ( tipc_tree , hf_tipc_rm_msg_type , tvb , offset , 4 , FALSE ) ;
break ;
case TIPC_NAME_DISTRIBUTOR :
proto_tree_add_item ( tipc_tree , hf_tipc_nd_msg_type , tvb , offset , 4 , FALSE ) ;
break ;
case TIPC_CONNECTION_MANAGER :
break ;
case TIPC_LINK_PROTOCOL :
proto_tree_add_item ( tipc_tree , hf_tipc_lp_msg_type , tvb , offset , 4 , FALSE ) ;
break ;
case TIPC_CHANGEOVER_PROTOCOL :
proto_tree_add_item ( tipc_tree , hf_tipc_cng_prot_msg_type , tvb , offset , 4 , FALSE ) ;
break ;
case TIPC_SEGMENTATION_MANAGER :
proto_tree_add_item ( tipc_tree , hf_tipc_sm_msg_type , tvb , offset , 4 , FALSE ) ;
break ;
default :
proto_tree_add_item ( tipc_tree , hf_tipc_unknown_msg_type , tvb , offset , 4 , FALSE ) ;
break ;
2005-11-22 21:48:10 +00:00
}
/* Sequence gap */
2008-03-17 21:35:14 +00:00
if ( user = = TIPC_LINK_PROTOCOL & & msg_type = = TIPC_LINK_PROTOCO_STATE_MSG )
2005-11-22 21:48:10 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_seq_gap , tvb , offset , 4 , FALSE ) ;
/* Next sent packet */
2005-12-04 21:50:31 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_nxt_snt_pkg , tvb , offset , 4 , FALSE ) ;
2005-11-22 21:48:10 +00:00
offset = offset + 4 ;
2005-12-04 21:50:31 +00:00
/* W6 */
2005-11-22 21:48:10 +00:00
/* Unused */
proto_tree_add_item ( tipc_tree , hf_tipc_unused3 , tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
/* W7 */
2005-12-06 17:54:40 +00:00
if ( msg_size = = 28 ) /* No data */
return ;
2008-03-17 21:35:14 +00:00
switch ( user ) {
2005-12-04 21:50:31 +00:00
case TIPC_LINK_PROTOCOL :
proto_tree_add_item ( tipc_tree , hf_tipc_bearer_name , tvb , offset , - 1 , FALSE ) ;
break ;
2005-12-06 17:54:40 +00:00
case TIPC_CHANGEOVER_PROTOCOL :
2008-03-17 21:35:14 +00:00
switch ( msg_type ) {
case 0 : /* DUPLICATE_MSG */
case 1 : /* ORIGINAL_MSG */
proto_tree_add_text ( tipc_tree , tvb , offset , - 1 , " TIPC_CHANGEOVER_PROTOCOL %s (%u) " ,
val_to_str ( msg_type , tipc_cng_prot_msg_type_values , " unknown " ) , msg_type ) ;
2009-08-16 12:36:22 +00:00
data_tvb = tvb_new_subset_remaining ( tvb , offset ) ;
2010-03-02 16:43:22 +00:00
col_set_fence ( pinfo - > cinfo , COL_INFO ) ;
2008-03-17 21:35:14 +00:00
dissect_tipc ( data_tvb , pinfo , tipc_tree ) ;
break ;
default :
/* INFO_MSG: Even when there are no packets in the send queue of a removed link, the other
* endpoint must be informed about this fact , so it can be unblocked when it has terminated its
* part of the changeover procedure . This message type may be regarded as an empty
* ORIGINAL_MSG , where message count is zero , and no packet is wrapped inside .
*/
proto_tree_add_text ( tipc_tree , tvb , offset , - 1 , " TIPC_CHANGEOVER_PROTOCOL Protol/dissection Error " ) ;
break ;
2005-12-06 17:54:40 +00:00
}
break ;
case TIPC_SEGMENTATION_MANAGER :
2005-12-15 02:44:26 +00:00
save_fragmented = pinfo - > fragmented ;
2008-03-17 21:35:14 +00:00
if ( tipc_defragment ) {
2005-12-14 21:40:04 +00:00
pinfo - > fragmented = TRUE ;
2008-03-17 21:35:14 +00:00
2005-12-14 21:40:04 +00:00
frag_msg = fragment_add_seq_next ( tvb , offset , pinfo ,
2008-03-17 21:35:14 +00:00
link_sel , /* ID for fragments belonging together - NEEDS IMPROVING? */
tipc_msg_fragment_table , /* list of message fragments */
tipc_msg_reassembled_table , /* list of reassembled messages */
2005-12-14 21:40:04 +00:00
tvb_length_remaining ( tvb , offset ) , /* fragment length - to the end */
2008-03-17 21:35:14 +00:00
TRUE ) ; /* More fragments? */
if ( msg_type = = TIPC_FIRST_SEGMENT ) {
reassembled_msg_length = tvb_get_ntohl ( tvb , offset ) & 0x1ffff ;
2007-09-17 14:10:34 +00:00
/* The number of segments needed for he complete message (Including header) will be
2006-02-07 19:29:51 +00:00
* The size of the data section of the first message , divided by the complete message size
* + one segment for the remainder ( if any ) .
*/
no_of_segments = reassembled_msg_length / ( msg_size - 28 ) ;
if ( reassembled_msg_length > ( no_of_segments * ( msg_size - 28 ) ) )
no_of_segments + + ;
fragment_set_tot_len ( pinfo , link_sel , tipc_msg_fragment_table , no_of_segments - 1 ) ;
2008-03-17 21:35:14 +00:00
item = proto_tree_add_text ( tipc_tree , tvb , offset , - 1 , " Segmented message size %u bytes -> No segments = %i " ,
reassembled_msg_length , no_of_segments ) ;
2006-02-07 19:29:51 +00:00
PROTO_ITEM_SET_GENERATED ( item ) ;
2005-12-14 21:40:04 +00:00
}
2005-12-07 20:07:14 +00:00
2005-12-14 21:40:04 +00:00
new_tvb = process_reassembled_data ( tvb , offset , pinfo ,
2010-02-06 18:20:21 +00:00
" Reassembled TIPC " , frag_msg , & tipc_msg_frag_items ,
2008-03-17 21:35:14 +00:00
NULL , tipc_tree ) ;
2005-12-14 21:40:04 +00:00
if ( frag_msg ) { /* Reassembled */
2009-09-24 20:21:23 +00:00
col_append_str ( pinfo - > cinfo , COL_INFO ,
2008-03-17 21:35:14 +00:00
" (Message Reassembled) " ) ;
2005-12-14 21:40:04 +00:00
} else { /* Not last packet of reassembled Short Message */
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO ,
" (Message fragment %u) " , link_lev_seq_no ) ;
2005-12-14 21:40:04 +00:00
}
2005-12-07 20:07:14 +00:00
}
if ( new_tvb ) { /* take it all */
next_tvb = new_tvb ;
} else { /* make a new subset */
2009-08-16 12:36:22 +00:00
next_tvb = tvb_new_subset_remaining ( tvb , offset ) ;
2005-12-07 20:07:14 +00:00
}
pinfo - > fragmented = save_fragmented ;
2008-03-17 21:35:14 +00:00
if ( new_tvb ) {
2010-03-02 16:43:22 +00:00
col_set_fence ( pinfo - > cinfo , COL_INFO ) ;
2005-12-07 20:07:14 +00:00
dissect_tipc ( next_tvb , pinfo , tipc_tree ) ;
return ;
}
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , next_tvb , 0 , - 1 , " %u bytes Data Fragment " , ( msg_size - 28 ) ) ;
2005-12-06 17:54:40 +00:00
break ;
case TIPC_MSG_BUNDLER :
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tvb , offset , - 1 , " Message Bundle " ) ;
while ( ( guint32 ) offset < msg_size ) {
2005-12-06 17:54:40 +00:00
msg_no + + ;
2008-03-17 21:35:14 +00:00
msg_in_bundle_size = tvb_get_ntohl ( tvb , offset ) ;
proto_tree_add_text ( tipc_tree , tvb , offset , msg_in_bundle_size , " %u Message in Bundle " , msg_no ) ;
2005-12-06 17:54:40 +00:00
data_tvb = tvb_new_subset ( tvb , offset , msg_in_bundle_size , msg_in_bundle_size ) ;
2010-03-02 16:43:22 +00:00
col_set_fence ( pinfo - > cinfo , COL_INFO ) ;
2005-12-06 17:54:40 +00:00
dissect_tipc ( data_tvb , pinfo , tipc_tree ) ;
offset = offset + msg_in_bundle_size ;
}
break ;
2005-12-04 21:50:31 +00:00
default :
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tvb , offset , - 1 , " %u bytes Data " , ( msg_size - 28 ) ) ;
2005-12-04 21:50:31 +00:00
break ;
}
2005-11-22 21:48:10 +00:00
}
2005-12-04 21:50:31 +00:00
2008-12-18 19:08:49 +00:00
/* determines the length of a TIPC package */
2008-03-17 21:35:14 +00:00
static guint
get_tipc_pdu_len ( packet_info * pinfo _U_ , tvbuff_t * tvb , int offset )
{
return tvb_get_ntohl ( tvb , offset ) & 0x0001FFFF ;
}
/* triggers the dissection of TIPC-over-TCP */
static int
dissect_tipc_tcp ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * parent_tree )
{
tcp_dissect_pdus ( tvb , pinfo , parent_tree , tipc_tcp_desegment , 4 , get_tipc_pdu_len ,
dissect_tipc ) ;
return tvb_length ( tvb ) ;
}
2005-11-22 21:48:10 +00:00
static void
dissect_tipc ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * tree )
{
2006-11-23 20:17:58 +00:00
proto_item * ti , * tipc_data_item , * item ;
2005-12-04 21:50:31 +00:00
proto_tree * tipc_tree , * tipc_data_tree ;
2005-11-22 21:48:10 +00:00
int offset = 0 ;
guint32 dword ;
2006-09-29 05:50:41 +00:00
guint8 version ;
2005-12-01 20:02:45 +00:00
guint32 msg_size ;
2006-09-29 05:50:41 +00:00
guint8 hdr_size ;
guint8 user ;
gchar * addr_str_ptr ;
2005-12-01 20:02:45 +00:00
const guchar * src_addr , * dst_addr ;
2005-12-14 21:40:04 +00:00
tvbuff_t * data_tvb , * tipc_tvb ;
2005-12-06 17:54:40 +00:00
gboolean datatype_hdr = FALSE ;
2006-09-29 05:50:41 +00:00
guint8 msg_type = 0 ;
2005-11-22 21:48:10 +00:00
2008-03-17 21:35:14 +00:00
/* Make entry in Protocol column on summary display */
2009-08-09 06:26:46 +00:00
col_set_str ( pinfo - > cinfo , COL_PROTOCOL , " TIPC " ) ;
2005-11-22 21:48:10 +00:00
2009-08-09 07:36:13 +00:00
col_clear ( pinfo - > cinfo , COL_INFO ) ;
2006-03-07 18:19:42 +00:00
2005-12-14 21:40:04 +00:00
top_tree = tree ;
2006-09-29 05:50:41 +00:00
dword = tvb_get_ntohl ( tvb , offset ) ;
2006-03-07 18:19:42 +00:00
version = ( dword > > 29 ) & 0xf ;
2005-11-22 21:48:10 +00:00
hdr_size = ( dword > > 21 ) & 0xf ;
user = ( dword > > 25 ) & 0xf ;
2005-12-01 20:02:45 +00:00
msg_size = dword & 0x1ffff ;
2008-03-17 21:35:14 +00:00
if ( ( guint32 ) tvb_length_remaining ( tvb , offset ) < msg_size ) {
2005-12-14 21:40:04 +00:00
tipc_tvb = tvb ;
2008-03-17 21:35:14 +00:00
} else {
2005-12-14 21:40:04 +00:00
tipc_tvb = tvb_new_subset ( tvb , offset , msg_size , msg_size ) ;
}
2009-04-02 17:12:44 +00:00
/* user == 7 only works for v2, this will decode the legacy TIPC configuration protocol */
if ( user = = TIPCv2_LINK_PROTOCOL ) version = TIPCv2 ;
2006-03-07 18:19:42 +00:00
/* Set User values in COL INFO different in V1 and V2 */
2008-03-17 21:35:14 +00:00
switch ( version ) {
case 0 :
case TIPCv1 :
msg_type = tvb_get_guint8 ( tipc_tvb , offset + 20 ) > > 4 ;
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s(%u) " , val_to_str ( user , tipc_user_values , " unknown " ) , user ) ;
2008-03-17 21:35:14 +00:00
/* Set msg type in info col and find out if its a data hdr or not */
datatype_hdr = tipc_v1_set_col_msgtype ( pinfo , user , msg_type ) ;
if ( datatype_hdr ) {
/* Data type header */
if ( hdr_size > 5 & & user < 4 ) {
/* W6 Originating Processor */
src_addr = tvb_get_ptr ( tipc_tvb , offset + 24 , 4 ) ;
SET_ADDRESS ( & pinfo - > src , AT_TIPC , 4 , src_addr ) ;
/* W7 Destination Processor */
dst_addr = tvb_get_ptr ( tipc_tvb , offset + 28 , 4 ) ;
SET_ADDRESS ( & pinfo - > dst , AT_TIPC , 4 , dst_addr ) ;
} else {
/* Short data hdr */
/* W2 Previous Processor */
src_addr = tvb_get_ptr ( tipc_tvb , offset + 8 , 4 ) ;
SET_ADDRESS ( & pinfo - > src , AT_TIPC , 4 , src_addr ) ;
}
} else {
2006-03-07 18:19:42 +00:00
/* W2 Previous Processor */
src_addr = tvb_get_ptr ( tipc_tvb , offset + 8 , 4 ) ;
SET_ADDRESS ( & pinfo - > src , AT_TIPC , 4 , src_addr ) ;
}
2008-03-17 21:35:14 +00:00
break ;
case TIPCv2 :
msg_type = tvb_get_guint8 ( tipc_tvb , offset + 4 ) > > 5 ;
2010-03-02 16:43:22 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %-12s " , val_to_str ( user , tipcv2_user_short_str_vals , " unknown " ) ) ;
2008-03-17 21:35:14 +00:00
/* Set msg type in info col */
2010-03-02 16:43:22 +00:00
tipc_v2_set_info_col ( tvb , pinfo , user , msg_type , hdr_size ) ;
2008-03-17 21:35:14 +00:00
/* find out if its a data hdr or not */
switch ( user ) {
case TIPCv2_DATA_LOW :
case TIPCv2_DATA_NORMAL :
case TIPCv2_DATA_HIGH :
case TIPCv2_DATA_NON_REJECTABLE :
datatype_hdr = TRUE ;
break ;
default :
datatype_hdr = FALSE ;
break ;
2006-03-07 18:19:42 +00:00
}
2008-03-17 21:35:14 +00:00
if ( datatype_hdr ) {
if ( hdr_size > 6 ) {
/* W6 Originating Processor */
src_addr = tvb_get_ptr ( tipc_tvb , offset + 24 , 4 ) ;
SET_ADDRESS ( & pinfo - > src , AT_TIPC , 4 , src_addr ) ;
/* W7 Destination Processor */
dst_addr = tvb_get_ptr ( tipc_tvb , offset + 28 , 4 ) ;
SET_ADDRESS ( & pinfo - > dst , AT_TIPC , 4 , dst_addr ) ;
} else {
/* W3 Previous Processor */
src_addr = tvb_get_ptr ( tipc_tvb , offset + 12 , 4 ) ;
SET_ADDRESS ( & pinfo - > src , AT_TIPC , 4 , src_addr ) ;
}
} else {
if ( user ! = TIPCv2_NEIGHBOUR_DISCOVERY ) {
/* W6 Originating Processor */
src_addr = tvb_get_ptr ( tipc_tvb , offset + 24 , 4 ) ;
SET_ADDRESS ( & pinfo - > src , AT_TIPC , 4 , src_addr ) ;
/* W7 Destination Processor */
dst_addr = tvb_get_ptr ( tipc_tvb , offset + 28 , 4 ) ;
SET_ADDRESS ( & pinfo - > dst , AT_TIPC , 4 , dst_addr ) ;
} else {
/* W2 Destination Domain */
dst_addr = tvb_get_ptr ( tipc_tvb , offset + 8 , 4 ) ;
SET_ADDRESS ( & pinfo - > dst , AT_TIPC , 4 , dst_addr ) ;
/* W3 Previous Node */
src_addr = tvb_get_ptr ( tipc_tvb , offset + 12 , 4 ) ;
SET_ADDRESS ( & pinfo - > src , AT_TIPC , 4 , src_addr ) ;
}
2006-03-07 18:19:42 +00:00
}
2008-03-17 21:35:14 +00:00
break ;
default :
break ;
2005-12-06 17:54:40 +00:00
}
2006-03-07 18:19:42 +00:00
ti = proto_tree_add_item ( tree , proto_tipc , tipc_tvb , offset , - 1 , FALSE ) ;
tipc_tree = proto_item_add_subtree ( ti , ett_tipc ) ;
2008-03-17 21:35:14 +00:00
if ( version = = TIPCv2 ) {
2007-06-25 06:10:36 +00:00
dissect_tipc_v2 ( tipc_tvb , tipc_tree , pinfo , offset , user , msg_size , hdr_size , datatype_hdr ) ;
2006-03-07 18:19:42 +00:00
return ;
}
2005-11-22 21:48:10 +00:00
2008-03-17 21:35:14 +00:00
/* Word 0-2 common for all messages */
/* Word 0 */
2006-03-07 18:19:42 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_ver , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipc_usr , tipc_tvb , offset , 4 , FALSE ) ;
2006-11-23 20:17:58 +00:00
item = proto_tree_add_item ( tipc_tree , hf_tipc_hdr_size , tipc_tvb , offset , 4 , FALSE ) ;
2008-04-08 14:49:56 +00:00
proto_item_append_text ( item , " = %u bytes " , ( hdr_size * 4 ) ) ;
2008-03-17 21:35:14 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_nonsequenced , tipc_tvb , offset , 4 , FALSE ) ;
2006-09-17 20:23:23 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_unused , tipc_tvb , offset , 4 , FALSE ) ;
2008-03-17 21:35:14 +00:00
if ( datatype_hdr ) {
proto_tree_add_item ( tipc_tree , hf_tipc_destdrop , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipcv2_srcdrop , tipc_tvb , offset , 4 , FALSE ) ;
2006-06-29 06:27:57 +00:00
}
2005-11-22 21:48:10 +00:00
2006-03-07 18:19:42 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_msg_size , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
/* Word 1 */
proto_tree_add_item ( tipc_tree , hf_tipc_ack_link_lev_seq , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipc_link_lev_seq , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
2006-03-07 18:19:42 +00:00
/* Word 2 */
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_string ( tipc_tree , hf_tipc_prev_proc , tipc_tvb , offset , 4 , addr_str_ptr ) ;
2005-11-22 21:48:10 +00:00
2006-03-07 18:19:42 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
switch ( user ) {
2006-03-07 18:19:42 +00:00
case TIPC_ROUTING_MANAGER :
case TIPC_LINK_PROTOCOL :
case TIPC_CHANGEOVER_PROTOCOL :
case TIPC_SEGMENTATION_MANAGER :
case TIPC_MSG_BUNDLER :
dissect_tipc_int_prot_msg ( tipc_tvb , pinfo , tipc_tree , offset , user , msg_size ) ;
return ;
default :
2008-03-17 21:35:14 +00:00
break ;
2006-03-07 18:19:42 +00:00
}
2005-12-01 20:02:45 +00:00
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-07 18:19:42 +00:00
pinfo - > ptype = PT_TIPC ;
pinfo - > srcport = dword ;
proto_tree_add_item ( tipc_tree , hf_tipc_org_port , tipc_tvb , offset , 4 , FALSE ) ;
2006-03-29 21:57:58 +00:00
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
if ( user ! = TIPC_NAME_DISTRIBUTOR ) {
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
2006-03-29 21:57:58 +00:00
pinfo - > destport = dword ;
proto_tree_add_item ( tipc_tree , hf_tipc_dst_port , tipc_tvb , offset , 4 , FALSE ) ;
}
offset = offset + 4 ;
2008-03-17 21:35:14 +00:00
/* 20 - 24 Bytes
20 bytes : Used in subnetwork local , connection oriented messages , where error code , reroute
counter and activity identity are zero . A recipient finding that the header size field is 20 does
by default know both user ( DATA ) , message type ( CONNECTED_MSG ) , error code
( MSG_OK ) , reroute counter ( 0 ) , and activity identity ( undefined ) . Since no more testing for
this is needed these fields can be left out in the header . Furthermore , since such messages
only will do zero or one inter - processor hop , we know that previous processor is the real
origin of the message . Hence the field originating processor can be omitted . For the same
reason , the recipient processor will know that it is identical to destination processor , so even
this field can be skipped . Finally , because the link layer guarantees delivery and sequence
order for this single hop , even the connection sequence number is redundant . So the message
can just be passed directly on to the destination port . Since this type of message statistically
should be by far the most frequent one this small optimization pays off .
*/
if ( hdr_size < = 6 ) {
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , - 1 , " %u bytes Data " , ( msg_size - hdr_size * 4 ) ) ;
} else {
switch ( user ) {
2005-12-04 21:50:31 +00:00
case TIPC_NAME_DISTRIBUTOR :
2005-12-14 21:40:04 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_nd_msg_type , tipc_tvb , offset , 4 , FALSE ) ;
2005-12-04 21:50:31 +00:00
break ;
case TIPC_CONNECTION_MANAGER :
2005-12-14 21:40:04 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_cm_msg_type , tipc_tvb , offset , 4 , FALSE ) ;
2005-12-04 21:50:31 +00:00
break ;
default :
2005-12-14 21:40:04 +00:00
proto_tree_add_item ( tipc_tree , hf_tipc_data_msg_type , tipc_tvb , offset , 4 , FALSE ) ;
2005-12-04 21:50:31 +00:00
break ;
2008-03-17 21:35:14 +00:00
}
proto_tree_add_item ( tipc_tree , hf_tipc_err_code , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipc_reroute_cnt , tipc_tvb , offset , 4 , FALSE ) ;
proto_tree_add_item ( tipc_tree , hf_tipc_act_id , tipc_tvb , offset , 4 , FALSE ) ;
offset = offset + 4 ;
2005-11-22 21:48:10 +00:00
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2005-12-01 20:02:45 +00:00
2008-03-17 21:35:14 +00:00
proto_tree_add_string ( tipc_tree , hf_tipc_org_proc , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
2005-11-22 21:48:10 +00:00
2008-03-17 21:35:14 +00:00
dword = tvb_get_ntohl ( tipc_tvb , offset ) ;
addr_str_ptr = tipc_addr_to_str ( dword ) ;
2005-12-01 20:02:45 +00:00
2008-03-17 21:35:14 +00:00
proto_tree_add_string ( tipc_tree , hf_tipc_dst_proc , tipc_tvb , offset , 4 , addr_str_ptr ) ;
offset = offset + 4 ;
/* 32 bytes
32 bytes : The size of all data messages containing an explicit port identity as destination
address .
*/
if ( hdr_size > 8 ) {
if ( user = = TIPC_NAME_DISTRIBUTOR ) {
/*
Although an internal service , the name distributor uses the full 40 - byte " external " data header
format when updating the naming table instances . This is because its messages may need
routing , - all system processor must contain the publications from all device processors and
vice versa , whether they are directly linked or not . The fields name type , name instance , and
destination port of that header have no meaning for such messages
*/
offset = offset + 8 ;
tipc_data_item = proto_tree_add_text ( tipc_tree , tvb , offset , - 1 , " TIPC_NAME_DISTRIBUTOR %u bytes User Data " , ( msg_size - hdr_size * 4 ) ) ;
tipc_data_tree = proto_item_add_subtree ( tipc_data_item , ett_tipc_data ) ;
2009-08-16 12:36:22 +00:00
data_tvb = tvb_new_subset_remaining ( tipc_tvb , offset ) ;
2008-03-17 21:35:14 +00:00
dissect_tipc_name_dist_data ( data_tvb , tipc_data_tree , 0 ) ;
return ;
} else {
/* Port name type / Connection level sequence number */
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " Port name type / Connection level sequence number " ) ;
offset = offset + 4 ;
/* Port name instance */
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 4 , " Port name instance " ) ;
offset = offset + 4 ;
2005-11-22 21:48:10 +00:00
}
2008-03-17 21:35:14 +00:00
}
2005-12-14 21:40:04 +00:00
2008-03-17 21:35:14 +00:00
if ( user < 4 & & dissect_tipc_data ) { /* DATA type user */
2009-04-02 17:12:44 +00:00
tvbuff_t * next_tvb ;
2009-07-12 13:41:36 +00:00
guint32 msg_type32 = msg_type ;
guint32 * name_type_p = & msg_type32 ;
2008-03-17 21:35:14 +00:00
switch ( msg_type ) {
2005-12-14 21:40:04 +00:00
case TIPC_CONNECTED_MSG :
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , - 1 , " %u bytes Data " , ( msg_size - hdr_size * 4 ) ) ;
2005-12-14 21:40:04 +00:00
break ;
case TIPC_NAMED_MSG :
2009-08-16 12:36:22 +00:00
data_tvb = tvb_new_subset_remaining ( tipc_tvb , offset + 14 ) ;
2006-09-29 05:50:41 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , 14 , " TIPC_NAMED_MSG Hdr " ) ;
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , data_tvb , 0 , - 1 , " %u bytes Data " , ( msg_size - hdr_size * 4 ) ) ;
2009-04-02 17:12:44 +00:00
break ;
2005-12-14 21:40:04 +00:00
case TIPC_DIRECT_MSG :
2009-04-02 17:12:44 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , - 1 , " %u bytes Data " , ( msg_size - hdr_size * 4 ) ) ;
break ;
2005-12-14 21:40:04 +00:00
default :
2008-03-17 21:35:14 +00:00
proto_tree_add_text ( tipc_tree , tipc_tvb , offset , - 1 , " %u bytes Data " , ( msg_size - hdr_size * 4 ) ) ;
2005-12-14 21:40:04 +00:00
break ;
2008-03-17 21:35:14 +00:00
}
2009-04-02 17:12:44 +00:00
/* tipc data type user doesn't change format, reuse v2 function */
2009-08-16 12:36:22 +00:00
next_tvb = tvb_new_subset_remaining ( tvb , offset ) ;
2010-09-23 21:46:31 +00:00
call_tipc_v2_data_subdissectors ( next_tvb , pinfo , name_type_p , user ) ;
2008-03-17 21:35:14 +00:00
}
} /*if (hdr_size <= 5) */
2005-12-14 21:40:04 +00:00
}
2005-11-22 21:48:10 +00:00
2006-05-21 04:49:01 +00:00
/* Register TIPC with Wireshark */
2005-11-22 21:48:10 +00:00
void
proto_register_tipc ( void )
2008-03-17 21:35:14 +00:00
{
2005-11-22 21:48:10 +00:00
static hf_register_info hf [ ] = {
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_fragments ,
{ " Message fragments " , " tipc.msg.fragments " ,
FT_NONE , BASE_NONE , NULL , 0x00 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_fragment ,
{ " Message fragment " , " tipc.msg.fragment " ,
FT_FRAMENUM , BASE_NONE , NULL , 0x00 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_fragment_overlap ,
{ " Message fragment overlap " , " tipc.msg.fragment.overlap " ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
FT_BOOLEAN , BASE_NONE , NULL , 0x0 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_fragment_overlap_conflicts ,
{ " Message fragment overlapping with conflicting data " , " tipc.msg.fragment.overlap.conflicts " ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
FT_BOOLEAN , BASE_NONE , NULL , 0x0 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_fragment_multiple_tails ,
{ " Message has multiple tail fragments " , " tipc.msg.fragment.multiple_tails " ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
FT_BOOLEAN , BASE_NONE , NULL , 0x0 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_fragment_too_long_fragment ,
{ " Message fragment too long " , " tipc.msg.fragment.too_long_fragment " ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
FT_BOOLEAN , BASE_NONE , NULL , 0x0 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_fragment_error ,
{ " Message defragmentation error " , " tipc.msg.fragment.error " ,
FT_FRAMENUM , BASE_NONE , NULL , 0x00 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2008-03-17 21:35:14 +00:00
{ & hf_tipc_msg_reassembled_in ,
{ " Reassembled in " , " tipc.msg.reassembled.in " ,
FT_FRAMENUM , BASE_NONE , NULL , 0x00 , NULL , HFILL }
2005-12-07 20:07:14 +00:00
} ,
2010-02-02 16:01:52 +00:00
{ & hf_tipc_msg_reassembled_length ,
2010-02-06 18:20:21 +00:00
{ " Reassembled TIPC length " , " tipc.msg.reassembled.length " ,
2010-02-02 16:01:52 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00 , NULL , HFILL }
} ,
2005-11-22 21:48:10 +00:00
{ & hf_tipc_ver ,
2006-09-29 05:50:41 +00:00
{ " Version " , " tipc.ver " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xe0000000 ,
" TIPC protocol version " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_usr ,
2006-09-29 05:50:41 +00:00
{ " User " , " tipc.usr " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_user_values ) , 0x1e000000 ,
" TIPC User " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
2006-03-07 18:19:42 +00:00
{ & hf_tipcv2_usr ,
2006-09-29 05:50:41 +00:00
{ " User " , " tipc.usr " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_user_values ) , 0x1e000000 ,
" TIPC User " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2005-11-22 21:48:10 +00:00
{ & hf_tipc_hdr_size ,
2006-09-29 05:50:41 +00:00
{ " Header size " , " tipc.hdr_size " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x01e00000 ,
" TIPC Header size " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
2006-03-07 18:19:42 +00:00
{ & hf_tipc_nonsequenced ,
2006-09-29 05:50:41 +00:00
{ " Non-sequenced " , " tipc.non_sequenced " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00100000 ,
" Non-sequenced Bit " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipc_destdrop ,
2006-09-29 05:50:41 +00:00
{ " Destination Droppable " , " tipc.destdrop " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00080000 ,
" Destination Droppable Bit " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2005-11-22 21:48:10 +00:00
{ & hf_tipc_unused ,
2006-09-29 05:50:41 +00:00
{ " Unused " , " tipc.hdr_unused " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x000e0000 ,
" TIPC Unused " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_msg_size ,
2006-09-29 05:50:41 +00:00
{ " Message size " , " tipc.msg_size " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0001ffff ,
" TIPC Message size " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_ack_link_lev_seq ,
2006-09-29 05:50:41 +00:00
{ " Acknowledged link level sequence number " , " tipc.ack_link_lev_seq " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffff0000 ,
" TIPC Acknowledged link level sequence number " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_link_lev_seq ,
2006-09-29 05:50:41 +00:00
{ " Link level sequence number " , " tipc.link_lev_seq " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000ffff ,
" TIPC Link level sequence number " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_prev_proc ,
2006-09-29 05:50:41 +00:00
{ " Previous processor " , " tipc.prev_proc " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
2008-03-17 21:35:14 +00:00
" TIPC Previous processor " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_org_port ,
2006-09-29 05:50:41 +00:00
{ " Originating port " , " tipc.org_port " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
2008-12-20 00:09:02 +00:00
" TIPC Originating port " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_dst_port ,
2006-09-29 05:50:41 +00:00
{ " Destination port " , " tipc.dst_port " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" TIPC Destination port " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_data_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_data_msg_type_values ) , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_err_code ,
2006-09-29 05:50:41 +00:00
{ " Error code " , " tipc.err_code " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_error_code_values ) , 0x0f000000 ,
" TIPC Error code " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_reroute_cnt ,
2006-09-29 05:50:41 +00:00
{ " Reroute counter " , " tipc.route_cnt " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00f00000 ,
" TIPC Reroute counter " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_act_id ,
2006-09-29 05:50:41 +00:00
{ " Activity identity " , " tipc.act_id " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x000fffff ,
" TIPC Activity identity " , HFILL }
} ,
2005-11-22 21:48:10 +00:00
{ & hf_tipc_org_proc ,
2006-09-29 05:50:41 +00:00
{ " Originating processor " , " tipc.org_proc " ,
2008-03-17 21:35:14 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
" TIPC Originating processor " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_dst_proc ,
2006-09-29 05:50:41 +00:00
{ " Destination processor " , " tipc.dst_proc " ,
2008-03-17 21:35:14 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
" TIPC Destination processor " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_unused2 ,
2006-09-29 05:50:41 +00:00
{ " Unused " , " tipc.unused2 " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xe0000000 ,
" TIPC Unused " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_importance ,
2006-09-29 05:50:41 +00:00
{ " Importance " , " tipc.importance " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x18000000 ,
" TIPC Importance " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_link_selector ,
2006-09-29 05:50:41 +00:00
{ " Link selector " , " tipc.link_selector " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x07000000 ,
" TIPC Link selector " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_msg_cnt ,
2006-09-29 05:50:41 +00:00
{ " Message count " , " tipc.imsg_cnt " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00ffff00 ,
" TIPC Message count " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_probe ,
2006-09-29 05:50:41 +00:00
{ " Probe " , " tipc.probe " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00000040 ,
" TIPC Probe " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_bearer_id ,
2006-09-29 05:50:41 +00:00
{ " Bearer identity " , " tipc.bearer_id " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00000038 ,
" TIPC Bearer identity " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_link_selector2 ,
2006-09-29 05:50:41 +00:00
{ " Link selector " , " tipc.link_selector " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00000007 ,
" TIPC Link selector " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_remote_addr ,
2006-09-29 05:50:41 +00:00
{ " Remote address " , " tipc.remote_addr " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" TIPC Remote address " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_rm_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.rm_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_routing_mgr_msg_type_values ) , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_nd_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.nd_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_name_dist_msg_type_values ) , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_cm_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.nd_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_cm_msg_type_values ) , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_lp_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.lp_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_link_prot_msg_type_values ) , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
2005-12-06 17:54:40 +00:00
{ & hf_tipc_cng_prot_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.cng_prot_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_cng_prot_msg_type_values ) , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-12-06 17:54:40 +00:00
} ,
2005-11-22 21:48:10 +00:00
{ & hf_tipc_sm_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.sm_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_sm_msg_type_values ) , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_unknown_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.unknown_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xf0000000 ,
" TIPC Message type " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_seq_gap ,
2006-09-29 05:50:41 +00:00
{ " Sequence gap " , " tipc.seq_gap " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0fff0000 ,
" TIPC Sequence gap " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_nxt_snt_pkg ,
2006-09-29 05:50:41 +00:00
{ " Next sent packet " , " tipc.nxt_snt_pkg " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000ffff ,
" TIPC Next sent packet " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
{ & hf_tipc_unused3 ,
2006-09-29 05:50:41 +00:00
{ " Unused " , " tipc.unused3 " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0 ,
" TIPC Unused " , HFILL }
2005-11-22 21:48:10 +00:00
} ,
2005-12-04 21:50:31 +00:00
{ & hf_tipc_bearer_name ,
2006-09-29 05:50:41 +00:00
{ " Bearer name " , " tipc.bearer_name " ,
2008-03-17 21:35:14 +00:00
FT_STRINGZ , BASE_NONE , NULL , 0x0 ,
" TIPC Bearer name " , HFILL }
2005-12-04 21:50:31 +00:00
} ,
{ & hf_tipc_name_dist_type ,
{ " Published port name type " , " tipc.name_dist_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" TIPC Published port name type " , HFILL }
2005-12-04 21:50:31 +00:00
} ,
{ & hf_tipc_name_dist_lower ,
2006-09-29 05:50:41 +00:00
{ " Lower bound of published sequence " , " tipc.name_dist_lower " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" TIPC Lower bound of published sequence " , HFILL }
2005-12-04 21:50:31 +00:00
} ,
{ & hf_tipc_name_dist_upper ,
2006-09-29 05:50:41 +00:00
{ " Upper bound of published sequence " , " tipc.name_dist_upper " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" TIPC Upper bound of published sequence " , HFILL }
2005-12-04 21:50:31 +00:00
} ,
{ & hf_tipc_name_dist_port ,
{ " Random number part of port identity " , " tipc.dist_port " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" TIPC Random number part of port identity " , HFILL }
2005-12-04 21:50:31 +00:00
} ,
{ & hf_tipc_name_dist_key ,
2006-09-29 05:50:41 +00:00
{ " Key (Use for verification at withdrawal) " , " tipc.dist_key " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" TIPC key " , HFILL }
2005-12-04 21:50:31 +00:00
} ,
2006-06-29 06:27:57 +00:00
{ & hf_tipcv2_srcdrop ,
{ " Source Droppable " , " tipc.srcdrop " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00040000 ,
" Destination Droppable Bit " , HFILL }
2006-06-29 06:27:57 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_data_msg_type ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipc.data_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipc_data_msg_type_values ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_bcast_mtype ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.bcast_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_bcast_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_bundler_mtype ,
{ " Message type " , " tipcv2.bundler_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_bundler_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_link_mtype ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.link_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_link_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_connmgr_mtype ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.connmgr_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_connmgr_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_route_mtype_1_6 ,
{ " Message type " , " tipcv2.route_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_route_mtype_strings_1_6 ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_route_mtype_1_7 ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.route_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_route_mtype_strings_1_7 ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_changeover_mtype ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.changeover_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_changeover_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_naming_mtype ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.naming_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_naming_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_fragmenter_mtype ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.fragmenter_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_fragmenter_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_neighbour_mtype ,
2006-09-29 05:50:41 +00:00
{ " Message type " , " tipcv2.data_msg_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_neighbour_mtype_strings ) , 0xe0000000 ,
" TIPC Message type " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-10-27 15:48:47 +00:00
{ & hf_tipcv2_errorcode ,
2006-09-29 05:50:41 +00:00
{ " Error code " , " tipcv2.errorcode " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_error_code_strings ) , 0x1e000000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_rer_cnt ,
2006-09-29 05:50:41 +00:00
{ " Reroute Counter " , " tipcv2.rer_cnt " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x01e00000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_lookup_scope ,
2006-09-29 05:50:41 +00:00
{ " Lookup Scope " , " tipcv2.lookup_scope " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_lookup_scope_strings ) , 0x00180000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_opt_p ,
2006-09-29 05:50:41 +00:00
{ " Options Position " , " tipcv2.opt_p " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00070000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_broadcast_ack_no ,
2006-09-29 05:50:41 +00:00
{ " Broadcast Acknowledge Number " , " tipcv2.broadcast_ack_no " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000FFFF ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_link_level_ack_no ,
2006-09-29 05:50:41 +00:00
{ " Link Level Acknowledge Number " , " tipcv2.link_level_ack_no " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_link_level_seq_no ,
2006-09-29 05:50:41 +00:00
{ " Link Level Sequence Number " , " tipcv2.link_level_seq_no " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000FFFF ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_bcast_seq_no ,
2006-09-29 05:50:41 +00:00
{ " Broadcast Sequence Number " , " tipcv2.bcast_seq_no " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000FFFF ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_prev_node ,
2006-09-29 05:50:41 +00:00
{ " Previous Node " , " tipcv2.prev_node " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
2008-03-17 21:35:14 +00:00
" TIPC Previous Node " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_orig_node ,
2006-09-29 05:50:41 +00:00
{ " Originating Node " , " tipcv2.orig_node " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
2008-03-17 21:35:14 +00:00
" TIPC Originating Node " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_dest_node ,
2006-09-29 05:50:41 +00:00
{ " Destination Node " , " tipcv2.dest_node " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
2008-03-17 21:35:14 +00:00
" TIPC Destination Node " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_port_name_type ,
2006-09-29 05:50:41 +00:00
{ " Port name type " , " tipcv2.port_name_type " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_port_name_instance ,
2006-09-29 05:50:41 +00:00
{ " Port name instance " , " tipcv2.port_name_instance " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2007-09-17 14:10:34 +00:00
{ & hf_tipcv2_multicast_lower ,
{ " Multicast lower bound " , " tipcv2.multicast_lower " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" Multicast port name instance lower bound " , HFILL }
2007-09-17 14:10:34 +00:00
} ,
{ & hf_tipcv2_multicast_upper ,
{ " Multicast upper bound " , " tipcv2.multicast_upper " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffffffff ,
" Multicast port name instance upper bound " , HFILL }
2007-09-17 14:10:34 +00:00
} ,
2006-03-07 18:19:42 +00:00
{ & hf_tipcv2_bcast_seq_gap ,
2006-09-29 05:50:41 +00:00
{ " Broadcast Sequence Gap " , " tipcv2.bcast_seq_gap " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x1F000000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_sequence_gap ,
2006-09-29 05:50:41 +00:00
{ " Sequence Gap " , " tipcv2.seq_gap " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00FF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_next_sent_broadcast ,
2006-09-29 05:50:41 +00:00
{ " Next Sent Broadcast " , " tipcv2.next_sent_broadcast " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_fragment_number ,
2006-09-29 05:50:41 +00:00
{ " Fragment Number " , " tipcv2.fragment_number " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2006-09-29 05:50:41 +00:00
{ & hf_tipcv2_fragment_msg_number ,
{ " Fragment Message Number " , " tipcv2.fragment_msg_number " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000FFFF ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
} ,
2006-03-07 18:19:42 +00:00
{ & hf_tipcv2_next_sent_packet ,
2006-09-29 05:50:41 +00:00
{ " Next Sent Packet " , " tipcv2.next_sent_packet " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000FFFF ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_session_no ,
2006-09-29 05:50:41 +00:00
{ " Session Number " , " tipcv2.session_no " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_link_prio ,
2006-09-29 05:50:41 +00:00
{ " Link Priority " , " tipcv2.link_prio " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x000001F0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_network_plane ,
2006-09-29 05:50:41 +00:00
{ " Network Plane " , " tipcv2.network_plane " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_networkplane_strings ) , 0x0000000E ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_probe ,
2006-09-29 05:50:41 +00:00
{ " Probe " , " tipcv2.probe " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00000001 ,
2010-09-23 21:46:31 +00:00
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_link_tolerance ,
2006-09-29 05:50:41 +00:00
{ " Link Tolerance (ms) " , " tipcv2.link_tolerance " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0000FFFF ,
" Link Tolerance in ms " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_bearer_instance ,
2006-09-29 05:50:41 +00:00
{ " Bearer Instance " , " tipcv2.bearer_instance " ,
2008-03-17 21:35:14 +00:00
FT_STRINGZ , BASE_NONE , NULL , 0 ,
" Bearer instance used by the sender node for this link " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_bearer_level_orig_addr ,
2006-09-29 05:50:41 +00:00
{ " Bearer Level Originating Address " , " tipcv2.bearer_level_orig_addr " ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
FT_BYTES , BASE_NONE , NULL , 0 ,
NULL , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_cluster_address ,
2006-09-29 05:50:41 +00:00
{ " Cluster Address " , " tipcv2.cluster_address " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
2008-03-17 21:35:14 +00:00
" The remote cluster concerned by the table " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_bitmap ,
2006-09-29 05:50:41 +00:00
{ " Bitmap " , " tipcv2.bitmap " ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
FT_BYTES , BASE_NONE , NULL , 0 ,
2008-03-17 21:35:14 +00:00
" Bitmap, indicating to which nodes within that cluster the sending node has direct links " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_node_address ,
2006-09-29 05:50:41 +00:00
{ " Node Address " , " tipcv2.node_address " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
2008-03-17 21:35:14 +00:00
" Which node the route addition/loss concern " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_destination_domain ,
2006-09-29 05:50:41 +00:00
{ " Destination Domain " , " tipcv2.destination_domain " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
2008-03-17 21:35:14 +00:00
" The domain to which the link request is directed " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
{ & hf_tipcv2_network_id ,
2006-09-29 05:50:41 +00:00
{ " Network Identity " , " tipcv2.network_id " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFFFFFF ,
" The sender node's network identity " , HFILL }
2006-03-07 18:19:42 +00:00
} ,
2006-09-29 05:50:41 +00:00
{ & hf_tipcv2_bcast_tag ,
{ " Broadcast Tag " , " tipcv2.bcast_tag " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
} ,
{ & hf_tipcv2_msg_count ,
{ " Message Count " , " tipcv2.msg_count " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
} ,
{ & hf_tipcv2_max_packet ,
{ " Max Packet " , " tipcv2.max_packet " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFF0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
} ,
{ & hf_tipcv2_transport_seq_no ,
{ " Transport Sequence No " , " tipcv2.tseq_no " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFFFFFF ,
" Transport Level Sequence Number " , HFILL }
2006-09-29 05:50:41 +00:00
} ,
{ & hf_tipcv2_redundant_link ,
{ " Redundant Link " , " tipcv2.redundant_link " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00001000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
} ,
{ & hf_tipcv2_bearer_id ,
{ " Bearer identity " , " tipcv2.bearer_id " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x00000e00 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
} ,
{ & hf_tipcv2_conn_mgr_msg_ack , /* special CONN_MANAGER payload */
{ " Number of Messages Acknowledged " , " tipcv2.conn_mgr_msg_ack " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xffff0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
} ,
{ & hf_tipcv2_req_links ,
{ " Requested Links " , " tipcv2.req_links " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x0fff0000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_timestamp ,
{ " Timestamp " , " tipcv2.timestamp " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFFFFFFFF ,
" OS-dependent Timestamp " , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_item_size ,
{ " Item Size " , " tipcv2.item_size " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0xFF000000 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_network_region ,
{ " Network Region " , " tipcv2.network_region " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_local_router ,
{ " Local Router " , " tipcv2.local_router " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_remote_router ,
{ " Remote Router " , " tipcv2.remote_router " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_dist_dist ,
{ " Route Distributor Dist " , " tipcv2.dist_dist " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_dist_dist_strings ) , 0x000000f0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_dist_scope ,
{ " Route Distributor Scope " , " tipcv2.dist_scope " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , VALS ( tipcv2_dist_scope_strings ) , 0x0000000f ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_name_dist_port_id_node ,
{ " Port Id Node " , " tipcv2.port_id_node " ,
2008-11-26 07:20:11 +00:00
FT_STRING , BASE_NONE , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2007-10-27 15:48:47 +00:00
} ,
{ & hf_tipcv2_media_id ,
{ " Media Id " , " tipcv2.media_id " ,
2008-03-17 21:35:14 +00:00
FT_UINT32 , BASE_DEC , NULL , 0x000000ff ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2006-09-29 05:50:41 +00:00
}
2005-11-22 21:48:10 +00:00
} ;
2008-03-17 21:35:14 +00:00
/* Setup protocol subtree array */
2005-11-22 21:48:10 +00:00
static gint * ett [ ] = {
& ett_tipc ,
2005-12-04 21:50:31 +00:00
& ett_tipc_data ,
2005-12-07 20:07:14 +00:00
& ett_tipc_msg_fragment ,
2006-09-29 05:50:41 +00:00
& ett_tipc_msg_fragments
2005-11-22 21:48:10 +00:00
} ;
2005-12-14 21:40:04 +00:00
module_t * tipc_module ;
2008-03-17 21:35:14 +00:00
/* options for the enum in the protocol preferences */
2007-10-27 15:48:47 +00:00
static enum_val_t handle_v2_as_options [ ] = {
{ " all " , " ALL " , V2_AS_ALL } ,
{ " tipc l.5/1.6 " , " TIPC 1.5/1.6 " , V2_AS_1_6 } ,
{ " tipc 1.7 " , " TIPC 1.7 " , V2_AS_1_7 } ,
{ NULL , NULL , 0 }
} ;
2008-03-17 21:35:14 +00:00
/* Register the protocol name and description */
2005-11-22 21:48:10 +00:00
proto_tipc = proto_register_protocol ( " Transparent Inter Process Communication(TIPC) " ,
2008-03-17 21:35:14 +00:00
" TIPC " , " tipc " ) ;
2005-11-22 21:48:10 +00:00
2008-03-17 21:35:14 +00:00
/* Required function calls to register the header fields and subtrees used */
2005-11-22 21:48:10 +00:00
proto_register_field_array ( proto_tipc , hf , array_length ( hf ) ) ;
proto_register_subtree_array ( ett , array_length ( ett ) ) ;
2008-03-17 21:35:14 +00:00
/* allow other protocols to be called according to specific values in order to
* dissect the protocols sent by TIPC */
2007-06-25 06:10:36 +00:00
2008-03-17 21:35:14 +00:00
/* this allows e.g. to dissect everything which is TIPC Data */
2007-06-25 06:10:36 +00:00
tipc_user_dissector = register_dissector_table ( " tipc.usr " ,
2008-03-17 21:35:14 +00:00
" TIPC user " , FT_UINT8 , BASE_DEC ) ;
/* this allows to dissect everything which is TIPC Data and uses a specific
2007-06-25 06:10:36 +00:00
* port name type it actually does not really work because the type is not
* necessarily set in every data message */
tipc_type_dissector = register_dissector_table ( " tipcv2.port_name_type " ,
2008-03-17 21:35:14 +00:00
" TIPC port name type " , FT_UINT32 , BASE_DEC ) ;
2007-06-25 06:10:36 +00:00
2007-09-17 14:10:34 +00:00
/* make heuristic dissectors possible */
register_heur_dissector_list ( " tipc " , & tipc_heur_subdissector_list ) ;
2009-11-04 16:39:52 +00:00
/* Register by name */
register_dissector ( " tipc " , dissect_tipc , proto_tipc ) ;
2005-12-07 20:07:14 +00:00
register_init_routine ( tipc_defragment_init ) ;
2005-12-14 21:40:04 +00:00
/* Register configuration options */
2008-03-17 21:35:14 +00:00
tipc_module = prefs_register_protocol ( proto_tipc , proto_reg_handoff_tipc ) ;
2005-12-14 21:40:04 +00:00
prefs_register_bool_preference ( tipc_module , " defragment " ,
2008-03-17 21:35:14 +00:00
" Reassemble TIPCv1 SEGMENTATION_MANAGER datagrams " ,
" Whether TIPCv1 SEGMENTATION_MANAGER datagrams should be reassembled " ,
& tipc_defragment ) ;
2005-12-14 21:40:04 +00:00
2008-03-17 21:35:14 +00:00
prefs_register_bool_preference ( tipc_module , " dissect_tipc_data " ,
" Dissect TIPC data " ,
" Whether to try to dissect TIPC data or not " ,
& dissect_tipc_data ) ;
2007-09-17 14:10:34 +00:00
prefs_register_bool_preference ( tipc_module , " try_heuristic_first " ,
2008-03-17 21:35:14 +00:00
" Try heuristic sub-dissectors first " ,
" Try to decode a TIPCv2 packet using an heuristic sub-dissector before using a registered sub-dissector " ,
& try_heuristic_first ) ;
2007-10-27 15:48:47 +00:00
prefs_register_enum_preference ( tipc_module , " handle_v2_as " ,
" Handle version 2 as " ,
2008-03-17 21:35:14 +00:00
" TIPC 1.7 removes/adds fields (not) available in TIPC 1.5/1.6 while keeping the version number 2 in the packages. \" ALL \" shows all fields that were ever used in both versions. " ,
2007-10-27 15:48:47 +00:00
& handle_v2_as ,
2008-03-17 21:35:14 +00:00
handle_v2_as_options ,
2007-10-27 15:48:47 +00:00
TRUE ) ;
2008-03-17 21:35:14 +00:00
prefs_register_uint_preference ( tipc_module , " alternate_port " ,
" TIPC-over-TCP port " , " Decode this TCP ports traffic as TIPC. Set to \" 0 \" to disable. " , 10 ,
& tipc_alternate_tcp_port ) ;
prefs_register_bool_preference ( tipc_module , " desegment " ,
" Reassemble TIPC-over-TCP messages spanning multiple TCP segments " ,
" Whether the TIPC-over-TCP dissector should reassemble messages spanning multiple TCP segments. "
" To use this option, you must also enable \" Allow subdissectors to reassemble TCP streams \" in the TCP protocol settings. " ,
& tipc_tcp_desegment ) ;
2005-11-22 21:48:10 +00:00
}
void
proto_reg_handoff_tipc ( void )
{
2008-09-03 16:42:35 +00:00
static gboolean inited = FALSE ;
static dissector_handle_t tipc_tcp_handle ;
static guint tipc_alternate_tcp_port_prev = 0 ;
2008-03-17 21:35:14 +00:00
if ( ! inited ) {
2008-09-23 00:55:28 +00:00
dissector_handle_t tipc_handle ;
2008-03-17 21:35:14 +00:00
tipc_handle = create_dissector_handle ( dissect_tipc , proto_tipc ) ;
tipc_tcp_handle = new_create_dissector_handle ( dissect_tipc_tcp , proto_tipc ) ;
ip_handle = find_dissector ( " ip " ) ;
data_handle = find_dissector ( " data " ) ;
2010-12-20 05:35:29 +00:00
dissector_add_uint ( " ethertype " , ETHERTYPE_TIPC , tipc_handle ) ;
2008-03-17 21:35:14 +00:00
inited = TRUE ;
} else {
/* change TIPC-over-TCP port if changed in the preferences */
if ( tipc_alternate_tcp_port ! = tipc_alternate_tcp_port_prev ) {
if ( tipc_alternate_tcp_port_prev ! = 0 )
2010-12-20 05:35:29 +00:00
dissector_delete_uint ( " tcp.port " , tipc_alternate_tcp_port_prev , tipc_tcp_handle ) ;
2008-03-17 21:35:14 +00:00
if ( tipc_alternate_tcp_port ! = 0 )
2010-12-20 05:35:29 +00:00
dissector_add_uint ( " tcp.port " , tipc_alternate_tcp_port , tipc_tcp_handle ) ;
2008-03-17 21:35:14 +00:00
tipc_alternate_tcp_port_prev = tipc_alternate_tcp_port ;
}
}
2005-11-22 21:48:10 +00:00
}