uqmi: Add IP family selection command-line switch
authorAntti Seppälä <a.seppala@gmail.com>
Sat, 8 Aug 2015 07:44:37 +0000 (07:44 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 13 Aug 2015 06:56:23 +0000 (08:56 +0200)
commit4dc4ca968008f4bdf614e8e9941e9935114d54be
tree3c6d7e1fe662c9d46fab17e10d6dd0fcec3a3253
parentae8c4b22b905136967b89438e958526ac5a37604
uqmi: Add IP family selection command-line switch

This patch adds support for (optionally) specifying ip family via a
command- line switch. The switch sends respective "Set IP Family" WDS
message to qmi-device before actually connecting.

Using this switch allows connecting to ipv6 enabled networks or networks
with dual-stack support with the appropriate hardware (dongle and FW
with ipv6 support) and configuration (AT+CGDCONT reporting ipv6 or
ipv4v6 capability).

Help text:
  --ip-family <family>:    Set ip-family for the connection (ipv4, ipv6, unspecified)

Usage example for ipv6:
  uqmi -d /dev/cdc-wdm0 --set-client-id wds,<cid> --start-network <apn> --ip-family ipv6

Dual-stack usage example:
  uqmi -d /dev/cdc-wdm0 --get-client-id wds
  uqmi -d /dev/cdc-wdm0 --set-client-id wds,<cid-1> --start-network <apn> --ip-family ipv4
  uqmi -d /dev/cdc-wdm0 --get-client-id wds
  uqmi -d /dev/cdc-wdm0 --set-client-id wds,<cid-2> --start-network <apn> --ip-family ipv6

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Tested-by: Matti Laakso <malaakso@elisanet.fi>
commands-wds.c
commands-wds.h