if (!argIPAddress.isSet()) {
// Print IP address(es) for device
out.format(fmt_ip, dev.getId(), api.getProtocolAddressInfo(EthernetConstants.ETH_P_IP));
} else {
// Set IP address for device
final IPv4Address ip = argIPAddress.getValue();
final IPv4Address mask = argSubnetMask.getValue();
final IPv4ConfigurationService cfg = InitialNaming.lookup(IPv4ConfigurationService.NAME);
cfg.configureDeviceStatic(dev, ip, mask, true);
// FIXME ... this doesn't show the device's new address because the
// IPv4 ConfigurationServiceImpl calls processor.apply with the