diff options
Diffstat (limited to 'src/qmicli/qmicli.c')
-rw-r--r-- | src/qmicli/qmicli.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qmicli/qmicli.c b/src/qmicli/qmicli.c index dc63c41..949a4a0 100644 --- a/src/qmicli/qmicli.c +++ b/src/qmicli/qmicli.c @@ -32,6 +32,7 @@ #include <libqmi-glib.h> #include "qmicli.h" +#include "qmicli-helpers.h" #define PROGRAM_NAME "qmicli" #define PROGRAM_VERSION PACKAGE_VERSION @@ -50,6 +51,7 @@ static gboolean get_service_version_info_flag; static gchar *device_set_instance_id_str; static gboolean device_open_version_info_flag; static gboolean device_open_sync_flag; +static gchar *device_open_net_str; static gboolean device_open_proxy_flag; static gchar *client_cid_str; static gboolean client_no_release_cid_flag; @@ -82,6 +84,10 @@ static GOptionEntry main_entries[] = { "Request to use the 'qmi-proxy' proxy", NULL }, + { "device-open-net", 0, 0, G_OPTION_ARG_STRING, &device_open_net_str, + "Open device with specific link protocol and QoS flags", + "[net-802-3|net-raw-ip|net-qos-header|net-no-qos-header]" + }, { "client-cid", 0, 0, G_OPTION_ARG_STRING, &client_cid_str, "Use the given CID, don't allocate a new one", "[CID]" @@ -481,6 +487,9 @@ device_new_ready (GObject *unused, open_flags |= QMI_DEVICE_OPEN_FLAGS_SYNC; if (device_open_proxy_flag) open_flags |= QMI_DEVICE_OPEN_FLAGS_PROXY; + if (device_open_net_str) + if (!qmicli_read_net_open_flags_from_string (device_open_net_str, &open_flags)) + exit (EXIT_FAILURE); /* Open the device */ qmi_device_open (device, |