aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-mausb.c16
-rw-r--r--epan/dissectors/packet-usb.c2
-rw-r--r--epan/dissectors/packet-usb.h6
3 files changed, 23 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mausb.c b/epan/dissectors/packet-mausb.c
index 3999dde1dc..bfeb9cc974 100644
--- a/epan/dissectors/packet-mausb.c
+++ b/epan/dissectors/packet-mausb.c
@@ -541,6 +541,18 @@ static gboolean mausb_has_setup_data(struct mausb_header *header)
return FALSE;
}
+static gboolean mausb_is_setup_response(struct mausb_header *header)
+{
+ if ((TransferResp == header->type) &&
+ (!mausb_is_from_host(header)) &&
+ (MAUSB_TX_TYPE_CTRL == mausb_tx_type(header))) {
+
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
/*** EP Handle parsing helper functions */
static guint8 mausb_ep_handle_ep_num(guint16 handle) {
@@ -1175,6 +1187,10 @@ dissect_mausb_pkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
usb_conv_info, &setup_tree);
}
+ if (mausb_is_setup_response(&header)) {
+ offset = dissect_usb_setup_response(pinfo, mausb_tree, mausb_tree, tvb,
+ offset, URB_COMPLETE, usb_conv_info);
+ }
/*
* TODO: dissect MA USB Payload with USB class dissectors
* (ex: MBIM, USB Audio, etc.)
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index d9dbdbc8ef..e94cf8d9d7 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -2594,7 +2594,7 @@ try_dissect_next_protocol(proto_tree *tree, proto_tree *parent, tvbuff_t *next_t
}
-static int
+int
dissect_usb_setup_response(packet_info *pinfo, proto_tree *tree,
proto_tree *parent, tvbuff_t *tvb, int offset,
guint8 urb_type, usb_conv_info_t *usb_conv_info)
diff --git a/epan/dissectors/packet-usb.h b/epan/dissectors/packet-usb.h
index 40c9cd489b..fac36b4ea8 100644
--- a/epan/dissectors/packet-usb.h
+++ b/epan/dissectors/packet-usb.h
@@ -224,9 +224,15 @@ dissect_usb_unknown_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree,
usb_conv_info_t *usb_conv_info _U_);
int
+dissect_usb_setup_response(packet_info *pinfo, proto_tree *tree,
+ proto_tree *parent, tvbuff_t *tvb, int offset,
+ guint8 urb_type, usb_conv_info_t *usb_conv_info);
+
+int
dissect_usb_setup_request(packet_info *pinfo, proto_tree *parent, tvbuff_t *tvb,
int offset, usb_conv_info_t *usb_conv_info, proto_tree **setup_tree);
+
void
usb_set_addr(packet_info *pinfo, usb_address_t *src_addr,
usb_address_t *dst_addr, guint16 bus_id, guint16 device_address,