ethtool Equivalent for OS X Lion Other than ifconfig, is there an app/script for OS X Lion that produces similar output/info to ethtool?

Specifically, I would like to be able to query the following:


driver info
online/offline
speed
duplex


Output from ethtool looks like this:

ajc@ajc-3] sudo ethtool eth0|grep Duplex                                                                                                                                                    ~
    Duplex: Full
ajc@ajc-3] sudo ethtool eth0|grep Speed                                                                                                                                                     ~
    Speed: 100Mb/s
ajc@ajc-3] sudo ethtool eth0|grep Link                                                                                                                                                      ~
    Link detected: yes
ajc@ajc-3] sudo ethtool -i eth0                                                                                                                                                             ~
driver: pcnet32
version: 1.32
firmware-version: 
bus-info: 0000:00:03.0
My primary tools for reading OSX details on hardware are system_profiler and ioreg. For network interface details, ifconfig is the best bet. The first two will show you connection paths for the hardware as well as software driver information. In your example - media and status provide most of the details you listed.

mac:~ me$ ifconfig en0 

en0: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
    options=2b&lt;RXCSUM,TXCSUM,VLAN_HWTAGGING,TSO4&gt;
    ether 00:1b:63:a8:33:33 
    inet6 fe80::21b:63ff:fea8:3333%en0 prefixlen 64 scopeid 0x4 
    inet 172.16.1.8 netmask 0xffffff00 broadcast 172.16.1.255
    media: autoselect (100baseTX &lt;full-duplex,flow-control&gt;)
    status: active

mac:~ me$ system_profiler|awk '/^Ethernet Cards/{c=15;next}c--&gt;0'

        ethernet:

          Type: Ethernet Controller
          Bus: PCI
          Vendor ID: 0x10de
          Device ID: 0x0ab0
          Subsystem Vendor ID: 0x10de
          Subsystem ID: 0xcb79
          Revision ID: 0x00b1
          BSD name: en0
          Kext name: nvenet.kext
          Location: /System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/nvenet.kext
          Version: 2.0.17


In your case, you are grepping for Duplex, Speed and Link and on Mac hardware you can get all of that data from ifconfig en0 | egrep [media|status] as desired.