Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Output format improvment for ifconfig(8)



On Wed, 31 Oct 2012, Paul Goyette wrote:
--- ifconfig.out.old    2012-10-31 16:20:21.000000000 -0700
+++ ifconfig.out.new    2012-10-31 16:20:58.000000000 -0700
@@ -1,6 +1,10 @@
wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
-       
capabilities=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx,UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>
-       
enabled=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx,UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>
+       capable=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
+       capable=7ff80<UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx>
+       capable=7ff80<UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>
+       enabled=7ff80<TSO4,IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
+       enabled=7ff80<UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx>
+       enabled=7ff80<UDP6CSUM_Rx,UDP6CSUM_Tx,TSO6>

I like this, except I think you should use "capabilities=" instead of "capable=", to minimise the change in output format, for the benefit of scripts that attempt to parse the output.

Also, it would be nice if the output format were documented in ifconfig(8), but it was already undocumented before you proposed any changes.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index