machine-readable --query-ip-configuration [patch] (2nd attempt)
Daniel Barlow
dan at telent.net
Thu Mar 23 22:47:17 UTC 2017
[ Sorry. hit something magic that apparently meant 'send'. Trying again ]
Hi all
I recently added an EM7455 to my Thinkpad X1 and in the goal of making it
work have been learning a *little* more than I expected to have to about
MBIM (and for that matter about IPv6-only connectivity)
Because my current distribution doesn't seem to want to let me run
ModemManager without NetworkManager I wanted to make everything work using
the supplied mbim-network script, and it seems that the biggest missing bit
there is actually configuring the interface/gateway/dns servers etc after
the connection is made. Because I don't much like writing machine parsers
for potentially brittle intended-for-humans output, I took the liberty of
writing a small patch to optionally turn the output of
--query-ip-configuration into awk-friendly tab separated lines. So for
example I can run
$ mbimcli -p -d /dev/cdc-wdm0 --query-ip-configuration --machine-readable
IPv4 fields none
IPv6 fields address, gateway, dns, mtu
IPv6 address 2a01:4c8:1b:eb13:2dbf:b045:8a94:88fa/64
IPv6 gateway 2a01:4c8:1b:eb13:40dc:ba5f:4d43:d4c
IPv6 dns 2a01:4c8:f000:1::1
IPv6 dns 2a01:4c8:f000:1::2
IPv6 mtu 1500
Would there be any interest in merging this or something like it? I see
some previous discussion about extending mbim-network to configure the wwan
interface (
https://lists.freedesktop.org/archives/libmbim-devel/2015-May/000576.html)
and it seems to me like having an easy-to-parse output format for the
necessary config data would be an important part of that work.
I can't see any contribution guidelines in the project repo so I hope that
attaching a diff as MIME is acceptable. I've also posted it as a gist at
https://gist.github.com/telent/fa67574cbb483228d9861376e8dea92a
-dan
--
dan at telent.net
http://ww.telent.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libmbim-devel/attachments/20170323/0cf3547a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tab-separated.patch
Type: application/octet-stream
Size: 10032 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libmbim-devel/attachments/20170323/0cf3547a/attachment.obj>
More information about the libmbim-devel
mailing list