diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-02-15 11:39:55 -0800 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2011-02-15 11:39:55 -0800 |
commit | 177ca7cd76a9245818b99f1dd6700c276511fcc0 (patch) | |
tree | b37b07cbd93eb5afccd84343b3059623db25b5a7 /netcfg/netcfg.c | |
parent | b5d68a3c28d0b7a947373344cbda2a2369d0b67d (diff) | |
download | system_core-177ca7cd76a9245818b99f1dd6700c276511fcc0.zip system_core-177ca7cd76a9245818b99f1dd6700c276511fcc0.tar.gz system_core-177ca7cd76a9245818b99f1dd6700c276511fcc0.tar.bz2 |
update netcfg to use prefixLength not netmask
Change-Id: I353906d220382a1f5d9aad689e3927fd3dbc91d2
Diffstat (limited to 'netcfg/netcfg.c')
-rw-r--r-- | netcfg/netcfg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/netcfg/netcfg.c b/netcfg/netcfg.c index aae1228..c520075 100644 --- a/netcfg/netcfg.c +++ b/netcfg/netcfg.c @@ -50,16 +50,16 @@ void usage(void) int dump_interface(const char *name) { - unsigned addr, mask, flags; + unsigned addr, prefixLength, flags; unsigned char hwbuf[ETH_ALEN]; - if(ifc_get_info(name, &addr, &mask, &flags)) { + if(ifc_get_info(name, &addr, &prefixLength, &flags)) { return 0; } printf("%-8s %s ", name, flags & 1 ? "UP " : "DOWN"); - printf("%-16s", ipaddr(addr)); - printf("%-16s", ipaddr(mask)); + printf("%40s", ipaddr(addr)); + printf("/%-4d", prefixLength); printf("0x%08x ", flags); if (!ifc_get_hwaddr(name, hwbuf)) { int i; |