aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJano Svitok <jsv@whitestein.com>2018-09-12 07:39:52 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2018-09-12 10:20:41 +0000
commit59ae0a2d83db6c67ef4fcc8700163a53cf6cb461 (patch)
tree3c778a71d9a7e59110709d703fa692c8a14f9de4
parenta6dc0c27fcc0c1a008c24daf8359f09a4d146965 (diff)
MBIM: changes after Microsoft fixed documentation
- update doc link to MBIM_CID_PCO - add numeric values and dissector skeleton for MBIM_CID_BASE_STATIONS_INFO and MBIM_CID_LOCATION_INFO_STATUS - MBIM_CID_MS_NETWORK_BLACKLIST: Set command has the same data as response - MBIM_CID_MS_NETWORK_BLACKLIST: Query command has no data, but is legal Change-Id: I8158029ae1e9ae2bc6fb389e889eb0bb71aa3d5d Reviewed-on: https://code.wireshark.org/review/29624 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-mbim.c80
1 files changed, 51 insertions, 29 deletions
diff --git a/epan/dissectors/packet-mbim.c b/epan/dissectors/packet-mbim.c
index eb8490d..def8857 100644
--- a/epan/dissectors/packet-mbim.c
+++ b/epan/dissectors/packet-mbim.c
@@ -20,7 +20,7 @@
* https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-network-blacklist-operations
* https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-lte-attach-operations
* https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-multi-sim-operations
- * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-protocol-configuration-operations--pco-
+ * https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-protocol-configuration-options-pco-operations
* https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-modem-reset-operations
*
* https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-sar-platform-support
@@ -1256,11 +1256,11 @@ static const value_string mbim_uuid_intel_ciq_cid_vals[] = {
{ 0, NULL}
};
-#define MBIM_CID_ATDS_SIGNAL 1
-#define MBIM_CID_ATDS_LOCATION 2
-#define MBIM_CID_ATDS_OPERATORS 3
-#define MBIM_CID_ATDS_RAT 4
-#define MBIM_CID_ATDS_REGISTER_STATE 9
+#define MBIM_CID_ATDS_SIGNAL 1
+#define MBIM_CID_ATDS_LOCATION 2
+#define MBIM_CID_ATDS_OPERATORS 3
+#define MBIM_CID_ATDS_RAT 4
+#define MBIM_CID_ATDS_REGISTER_STATE 9
#define MBIM_CID_ATDS_SET_PROJECTION_TABLES 10
static const value_string mbim_uuid_atds_cid_vals[] = {
@@ -1286,25 +1286,18 @@ static const value_string mbim_uuid_multiflow_cid_vals[] = {
{ 0, NULL}
};
-#define MBIM_CID_MS_PROVISIONED_CONTEXT_V2 1
-#define MBIM_CID_MS_NETWORK_BLACKLIST 2
-#define MBIM_CID_MS_LTE_ATTACH_CONFIG 3
-#define MBIM_CID_MS_LTE_ATTACH_STATUS 4
-#define MBIM_CID_MS_SYS_CAPS 5
-#define MBIM_CID_MS_DEVICE_CAPS_V2 6
-#define MBIM_CID_MS_DEVICE_SLOT_MAPPINGS 7
-#define MBIM_CID_MS_SLOT_INFO_STATUS 8
-#define MBIM_CID_PCO 9
-#define MBIM_CID_MS_DEVICE_RESET 10
-
-/*
-TODO: These are not defined in the online docs. I guessed them from
-packet capture.
-See https://github.com/MicrosoftDocs/windows-driver-docs/issues/824
-
-#define MBIM_CID_BASE_STATIONS_INFO 11
-#define MBIM_CID_LOCATION_INFO_STATUS 12
- */
+#define MBIM_CID_MS_PROVISIONED_CONTEXT_V2 1
+#define MBIM_CID_MS_NETWORK_BLACKLIST 2
+#define MBIM_CID_MS_LTE_ATTACH_CONFIG 3
+#define MBIM_CID_MS_LTE_ATTACH_STATUS 4
+#define MBIM_CID_MS_SYS_CAPS 5
+#define MBIM_CID_MS_DEVICE_CAPS_V2 6
+#define MBIM_CID_MS_DEVICE_SLOT_MAPPINGS 7
+#define MBIM_CID_MS_SLOT_INFO_STATUS 8
+#define MBIM_CID_PCO 9
+#define MBIM_CID_MS_DEVICE_RESET 10
+#define MBIM_CID_BASE_STATIONS_INFO 11
+#define MBIM_CID_LOCATION_INFO_STATUS 12
static const value_string mbim_uuid_basic_connect_extensions_cid_vals[] = {
{ MBIM_CID_MS_PROVISIONED_CONTEXT_V2, "MS_PROVISIONED_CONTEXT_V2"},
@@ -1317,6 +1310,8 @@ static const value_string mbim_uuid_basic_connect_extensions_cid_vals[] = {
{ MBIM_CID_MS_SLOT_INFO_STATUS, "MS_SLOT_INFO_STATUS"},
{ MBIM_CID_PCO, "MBIM_CID_PCO"},
{ MBIM_CID_MS_DEVICE_RESET, "MS_DEVICE_RESET"},
+ { MBIM_CID_BASE_STATIONS_INFO, "MBIM_CID_BASE_STATIONS_INFO"},
+ { MBIM_CID_LOCATION_INFO_STATUS, "MBIM_CID_LOCATION_INFO_STATUS"},
{ 0, NULL}
};
@@ -5760,10 +5755,9 @@ dissect_mbim_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
break;
case MBIM_CID_MS_NETWORK_BLACKLIST:
if (cmd_type == MBIM_COMMAND_SET) {
- /* TODO: documentation not provided by MSFT, see https://github.com/MicrosoftDocs/windows-driver-docs/issues/823 */
- proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
- } else {
- proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
+ mbim_dissect_ms_network_blacklist_info(frag_tvb, subtree, offset);
+ } else if (info_buff_len) {
+ proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
}
break;
case MBIM_CID_MS_LTE_ATTACH_CONFIG:
@@ -5808,6 +5802,20 @@ dissect_mbim_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
}
break;
+ case MBIM_CID_BASE_STATIONS_INFO:
+ if (cmd_type == MBIM_COMMAND_SET) {
+ proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
+ } else if (info_buff_len) {
+ proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
+ }
+ break;
+ case MBIM_CID_LOCATION_INFO_STATUS:
+ if (cmd_type == MBIM_COMMAND_SET) {
+ proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
+ } else if (info_buff_len) {
+ proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_info_buffer, frag_tvb, offset, info_buff_len);
+ }
+ break;
default:
proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
break;
@@ -6657,6 +6665,20 @@ dissect_mbim_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
}
break;
+ case MBIM_CID_BASE_STATIONS_INFO:
+ if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
+ proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
+ } else {
+ proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
+ }
+ break;
+ case MBIM_CID_LOCATION_INFO_STATUS:
+ if (mbim_info && (mbim_info->cmd_type == MBIM_COMMAND_SET)) {
+ proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
+ } else {
+ proto_tree_add_item(subtree, hf_mbim_info_buffer, frag_tvb, offset, info_buff_len, ENC_NA);
+ }
+ break;
default:
proto_tree_add_expert(subtree, pinfo, &ei_mbim_unexpected_msg, frag_tvb, offset, -1);
break;