forked from osmocom/wireshark
Convert TIPC to use endpoint conversations
Change-Id: Iab03ebbfc982bf7182851f63c17fa59bc71d7709 Reviewed-on: https://code.wireshark.org/review/24219 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
08bf89f487
commit
23afd28daf
|
@ -365,7 +365,6 @@ typedef enum {
|
|||
PT_EXCHG, /* Fibre Channel exchange */
|
||||
PT_DDP, /* DDP AppleTalk connection */
|
||||
PT_IDP, /* XNS IDP sockets */
|
||||
PT_TIPC, /* TIPC PORT */
|
||||
PT_USB, /* USB endpoint 0xffff means the host */
|
||||
PT_I2C,
|
||||
PT_IBQP, /* Infiniband QP number */
|
||||
|
|
|
@ -1406,8 +1406,6 @@ endpoint_type conversation_pt_to_endpoint_type(port_type pt)
|
|||
return ENDPOINT_DDP;
|
||||
case PT_IDP:
|
||||
return ENDPOINT_IDP;
|
||||
case PT_TIPC:
|
||||
return ENDPOINT_TIPC;
|
||||
case PT_USB:
|
||||
return ENDPOINT_USB;
|
||||
case PT_I2C:
|
||||
|
|
|
@ -154,8 +154,6 @@ static port_type exp_pdu_old_to_new_port_type(guint type)
|
|||
return PT_DDP;
|
||||
case OLD_PT_IDP:
|
||||
return PT_IDP;
|
||||
case OLD_PT_TIPC:
|
||||
return PT_TIPC;
|
||||
case OLD_PT_USB:
|
||||
return PT_USB;
|
||||
case OLD_PT_I2C:
|
||||
|
@ -164,6 +162,7 @@ static port_type exp_pdu_old_to_new_port_type(guint type)
|
|||
return PT_IBQP;
|
||||
case OLD_PT_BLUETOOTH:
|
||||
return PT_BLUETOOTH;
|
||||
case OLD_PT_TIPC:
|
||||
case OLD_PT_TDMOP:
|
||||
case OLD_PT_NCP:
|
||||
case OLD_PT_SBCCS:
|
||||
|
|
|
@ -2141,7 +2141,7 @@ dissect_tipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
proto_item *ti, *item;
|
||||
proto_tree *tipc_tree, *tipc_data_tree;
|
||||
int offset = 0;
|
||||
guint32 dword;
|
||||
guint32 srcport, destport = 0, dword;
|
||||
guint8 version;
|
||||
guint32 msg_size;
|
||||
guint8 hdr_size;
|
||||
|
@ -2293,16 +2293,14 @@ dissect_tipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
|
|||
break;
|
||||
}
|
||||
|
||||
dword = tvb_get_ntohl(tipc_tvb, offset);
|
||||
pinfo->ptype = PT_TIPC;
|
||||
pinfo->srcport = dword;
|
||||
proto_tree_add_item(tipc_tree, hf_tipc_org_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item_ret_uint(tipc_tree, hf_tipc_org_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN, &srcport);
|
||||
offset = offset + 4;
|
||||
if (user != TIPC_NAME_DISTRIBUTOR) {
|
||||
dword = tvb_get_ntohl(tipc_tvb, offset);
|
||||
pinfo->destport = dword;
|
||||
proto_tree_add_item(tipc_tree, hf_tipc_dst_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item_ret_uint(tipc_tree, hf_tipc_dst_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN, &destport);
|
||||
}
|
||||
|
||||
conversation_create_endpoint(pinfo, &pinfo->src, &pinfo->dst, ENDPOINT_TIPC, srcport, destport, 0);
|
||||
|
||||
offset = offset + 4;
|
||||
/* 20 - 24 Bytes
|
||||
20 bytes: Used in subnetwork local, connection oriented messages, where error code, reroute
|
||||
|
|
|
@ -122,8 +122,6 @@ static guint exp_pdu_new_to_old_port_type(port_type pt)
|
|||
return OLD_PT_DDP;
|
||||
case PT_IDP:
|
||||
return OLD_PT_IDP;
|
||||
case PT_TIPC:
|
||||
return OLD_PT_TIPC;
|
||||
case PT_USB:
|
||||
return OLD_PT_USB;
|
||||
case PT_I2C:
|
||||
|
|
|
@ -1140,7 +1140,6 @@ port_type_to_str (port_type type)
|
|||
case PT_EXCHG: return "FC EXCHG";
|
||||
case PT_DDP: return "DDP";
|
||||
case PT_IDP: return "IDP";
|
||||
case PT_TIPC: return "TIPC";
|
||||
case PT_USB: return "USB";
|
||||
case PT_I2C: return "I2C";
|
||||
case PT_IBQP: return "IBQP";
|
||||
|
|
Loading…
Reference in New Issue