summaryrefslogtreecommitdiff
path: root/data/mbim-service-basic-connect.json
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-14 21:12:57 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-04-21 19:28:17 +0200
commitdf0804ca512cf8ada3a7262f0edeb07f2c6f7ead (patch)
treef7a0489e8b7082e2da753da33c4e94495923c29e /data/mbim-service-basic-connect.json
parentd639ad7654bed7a9fec1eb6d1f01fa327f3ec10d (diff)
mbim-codegen: huge refactor
I really don't want to split this change into different commits... The overall changes are: * Skip using Value classes, it just complicates the logic a bit here. MBIM is not as complicated as QMI, so it's fine to define all the logic of the generation into 2 main parts: Message creation/parsing and Struct types. * Support for IPv4 and IPv6 values and arrays. If any of the MBIM protocol designers reads this, be aware that I've been cursing you all in the past few days. If you decided to reference IPs as offsets, why the hell don't you do the same when the values are defined within a struct? * Implement the 'IP configuration' message handling * Support for appending structs and arrays of structs into messages. Not fully implemented yet, anyway.
Diffstat (limited to 'data/mbim-service-basic-connect.json')
-rw-r--r--data/mbim-service-basic-connect.json139
1 files changed, 136 insertions, 3 deletions
diff --git a/data/mbim-service-basic-connect.json b/data/mbim-service-basic-connect.json
index b58b1fa..eb5a8b4 100644
--- a/data/mbim-service-basic-connect.json
+++ b/data/mbim-service-basic-connect.json
@@ -401,17 +401,150 @@
"response" : [ { "name" : "ProvisionedContextsCount",
"format" : "guint32" },
{ "name" : "ProvisionedContexts",
- "format" : "struct-array",
+ "format" : "ref-struct-array",
"struct-type" : "MbimProvisionedContextElement",
"array-size-field" : "ProvisionedContextsCount" } ],
"notification" : [ { "name" : "ProvisionedContextsCount",
"format" : "guint32" },
{ "name" : "ProvisionedContexts",
- "format" : "struct-array",
+ "format" : "ref-struct-array",
"struct-type" : "MbimProvisionedContextElement",
"array-size-field" : "ProvisionedContextsCount" } ] },
// *********************************************************************************
+ { "name" : "MbimIPv4Element",
+ "type" : "Struct",
+ "contents" : [ { "name" : "OnLinkPrefixLength",
+ "format" : "guint32" },
+ { "name" : "IPv4Address",
+ "format" : "ipv4" } ] },
+
+ { "name" : "MbimIPv6Element",
+ "type" : "Struct",
+ "contents" : [ { "name" : "OnLinkPrefixLength",
+ "format" : "guint32" },
+ { "name" : "IPv6Address",
+ "format" : "ipv6" } ] },
+
+ { "name" : "IP Configuration",
+ "service" : "Basic Connect",
+ "type" : "Command",
+ "query" : [ { "name" : "SessionId",
+ "format" : "guint32" },
+ { "name" : "IPv4ConfigurationAvailable",
+ "format" : "guint32",
+ "public-format" : "MbimIPConfigurationAvailableFlag" },
+ { "name" : "IPv6ConfigurationAvailable",
+ "format" : "guint32",
+ "public-format" : "MbimIPConfigurationAvailableFlag" },
+ { "name" : "IPv4AddressCount",
+ "format" : "guint32" },
+ { "name" : "IPv4Address",
+ "format" : "struct-array",
+ "struct-type" : "MbimIPv4Element",
+ "array-size-field" : "IPv4AddressCount" },
+ { "name" : "IPv6AddressCount",
+ "format" : "guint32" },
+ { "name" : "IPv6Address",
+ "format" : "struct-array",
+ "struct-type" : "MbimIPv6Element",
+ "array-size-field" : "IPv6AddressCount" },
+ { "name" : "IPv4Gateway",
+ "format" : "ref-ipv4" },
+ { "name" : "IPv6Gateway",
+ "format" : "ref-ipv6" },
+ { "name" : "IPv4DnsServerCount",
+ "format" : "guint32" },
+ { "name" : "IPv4DnsServer",
+ "format" : "ipv4-array",
+ "array-size-field" : "IPv4DnsServerCount" },
+ { "name" : "IPv6DnsServerCount",
+ "format" : "guint32" },
+ { "name" : "IPv6DnsServer",
+ "format" : "ipv6-array",
+ "array-size-field" : "IPv6DnsServerCount" },
+ { "name" : "IPv4Mtu",
+ "format" : "guint32" },
+ { "name" : "IPv6Mtu",
+ "format" : "guint32" } ],
+ "response" : [ { "name" : "SessionId",
+ "format" : "guint32" },
+ { "name" : "IPv4ConfigurationAvailable",
+ "format" : "guint32",
+ "public-format" : "MbimIPConfigurationAvailableFlag" },
+ { "name" : "IPv6ConfigurationAvailable",
+ "format" : "guint32",
+ "public-format" : "MbimIPConfigurationAvailableFlag" },
+ { "name" : "IPv4AddressCount",
+ "format" : "guint32" },
+ { "name" : "IPv4Address",
+ "format" : "struct-array",
+ "struct-type" : "MbimIPv4Element",
+ "array-size-field" : "IPv4AddressCount" },
+ { "name" : "IPv6AddressCount",
+ "format" : "guint32" },
+ { "name" : "IPv6Address",
+ "format" : "struct-array",
+ "struct-type" : "MbimIPv6Element",
+ "array-size-field" : "IPv6AddressCount" },
+ { "name" : "IPv4Gateway",
+ "format" : "ref-ipv4" },
+ { "name" : "IPv6Gateway",
+ "format" : "ref-ipv6" },
+ { "name" : "IPv4DnsServerCount",
+ "format" : "guint32" },
+ { "name" : "IPv4DnsServer",
+ "format" : "ipv4-array",
+ "array-size-field" : "IPv4DnsServerCount" },
+ { "name" : "IPv6DnsServerCount",
+ "format" : "guint32" },
+ { "name" : "IPv6DnsServer",
+ "format" : "ipv6-array",
+ "array-size-field" : "IPv6DnsServerCount" },
+ { "name" : "IPv4Mtu",
+ "format" : "guint32" },
+ { "name" : "IPv6Mtu",
+ "format" : "guint32" } ],
+ "notification" : [ { "name" : "SessionId",
+ "format" : "guint32" },
+ { "name" : "IPv4ConfigurationAvailable",
+ "format" : "guint32",
+ "public-format" : "MbimIPConfigurationAvailableFlag" },
+ { "name" : "IPv6ConfigurationAvailable",
+ "format" : "guint32",
+ "public-format" : "MbimIPConfigurationAvailableFlag" },
+ { "name" : "IPv4AddressCount",
+ "format" : "guint32" },
+ { "name" : "IPv4Address",
+ "format" : "struct-array",
+ "struct-type" : "MbimIPv4Element",
+ "array-size-field" : "IPv4AddressCount" },
+ { "name" : "IPv6AddressCount",
+ "format" : "guint32" },
+ { "name" : "IPv6Address",
+ "format" : "struct-array",
+ "struct-type" : "MbimIPv6Element",
+ "array-size-field" : "IPv6AddressCount" },
+ { "name" : "IPv4Gateway",
+ "format" : "ref-ipv4" },
+ { "name" : "IPv6Gateway",
+ "format" : "ref-ipv6" },
+ { "name" : "IPv4DnsServerCount",
+ "format" : "guint32" },
+ { "name" : "IPv4DnsServer",
+ "format" : "ipv4-array",
+ "array-size-field" : "IPv4DnsServerCount" },
+ { "name" : "IPv6DnsServerCount",
+ "format" : "guint32" },
+ { "name" : "IPv6DnsServer",
+ "format" : "ipv6-array",
+ "array-size-field" : "IPv6DnsServerCount" },
+ { "name" : "IPv4Mtu",
+ "format" : "guint32" },
+ { "name" : "IPv6Mtu",
+ "format" : "guint32" } ] },
+
+ // *********************************************************************************
{ "name" : "MbimDeviceServiceElement",
"type" : "Struct",
"contents" : [ { "name" : "DeviceServiceId",
@@ -435,7 +568,7 @@
{ "name" : "MaxDssSessions",
"format" : "guint32" },
{ "name" : "DeviceServices",
- "format" : "struct-array",
+ "format" : "ref-struct-array",
"struct-type" : "MbimDeviceServiceElement",
"array-size-field" : "DeviceServicesCount" } ] }
]