diff options
author | Dan Williams <dcbw@redhat.com> | 2012-09-07 18:03:54 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-12-04 15:49:00 -0600 |
commit | 954ce7c35f36bb669a3ba76a35a3e6d14de24b5b (patch) | |
tree | c5340ffa0c7f88867784b3f4a2dd6b0556ef6213 /plugins/mm-modem-hso.c | |
parent | c1a1d20adaa54de958b070ea3dc3894116009431 (diff) | |
download | ModemManager-ip4ex.tar.gz |
core: implement GetIP4ConfigExip4ex
Allows returning the IP method, prefix, and gateway along with other
information.
Diffstat (limited to 'plugins/mm-modem-hso.c')
-rw-r--r-- | plugins/mm-modem-hso.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mm-modem-hso.c b/plugins/mm-modem-hso.c index 39a83fee7..74c470847 100644 --- a/plugins/mm-modem-hso.c +++ b/plugins/mm-modem-hso.c @@ -548,8 +548,13 @@ get_ip4_config_done (MMAtSerialPort *port, break; } } else if (i == 1) { /* IP address */ - if (inet_pton (AF_INET, *iter, &tmp) > 0) + if (inet_pton (AF_INET, *iter, &tmp) > 0) { mm_callback_info_set_data (info, "ip4-address", GUINT_TO_POINTER (tmp), NULL); + mm_callback_info_set_data (info, "ip4-netmask", GUINT_TO_POINTER (0xFFFFFF), NULL); + } + } else if (i == 2) { /* Gateway */ + if (inet_pton (AF_INET, *iter, &tmp) > 0) + mm_callback_info_set_data (info, "ip4-gateway", GUINT_TO_POINTER (tmp), NULL); } else if (i == 3) { /* DNS 1 */ if (inet_pton (AF_INET, *iter, &tmp) > 0) g_array_append_val (dns_array, tmp); |