@Override public String toString() { return address.toString(); }
@Override public ObjectNode encodeCriterion(ObjectNode root, Criterion criterion) { final EthCriterion ethCriterion = (EthCriterion) criterion; return root.put(CriterionCodec.MAC, ethCriterion.mac().toString()); } }
@Override public String toString() { return toStringHelper(getClass()) .add("systemPriority", Short.toString(systemPriority)) .add("systemMac", systemMac.toString()) .add("key", Short.toString(key)) .add("portPriority", Short.toString(portPriority)) .add("port", Short.toString(port)) .add("state", state.toString()) .toString(); } }
@Override public ObjectNode encodeCriterion(ObjectNode root, Criterion criterion) { final IPv6NDLinkLayerAddressCriterion ipv6NDLinkLayerAddressCriterion = (IPv6NDLinkLayerAddressCriterion) criterion; return root.put(CriterionCodec.MAC, ipv6NDLinkLayerAddressCriterion.mac().toString()); } }
@Override public ObjectNode encode(Ethernet ethernet, CodecContext context) { checkNotNull(ethernet, "Ethernet cannot be null"); final ObjectNode result = context.mapper().createObjectNode() .put("vlanId", ethernet.getVlanID()) .put("etherType", ethernet.getEtherType()) .put("priorityCode", ethernet.getPriorityCode()) .put("pad", ethernet.isPad()); if (ethernet.getDestinationMAC() != null) { result.put("destMac", ethernet.getDestinationMAC().toString()); } if (ethernet.getSourceMAC() != null) { result.put("srcMac", ethernet.getSourceMAC().toString()); } return result; }
@Override public ObjectNode encode(Host host, CodecContext context) { checkNotNull(host, "Host cannot be null"); final JsonCodec<HostLocation> locationCodec = context.codec(HostLocation.class); final ObjectNode result = context.mapper().createObjectNode() .put("id", host.id().toString()) .put("mac", host.mac().toString()) .put("vlan", host.vlan().toString()) .put("innerVlan", host.innerVlan().toString()) .put("outerTpid", host.tpid().toString()) .put("configured", host.configured()); final ArrayNode jsonIpAddresses = result.putArray("ipAddresses"); for (final IpAddress ipAddress : host.ipAddresses()) { jsonIpAddresses.add(ipAddress.toString()); } result.set("ipAddresses", jsonIpAddresses); final ArrayNode jsonLocations = result.putArray("locations"); for (final HostLocation location : host.locations()) { jsonLocations.add(locationCodec.encode(location, context)); } result.set("locations", jsonLocations); return annotate(result, host, context); }
formatStringBuilder.append(intf.mac().toString());
neighbor.neighborMacAddress().toString(), interfaceName, circuitType, neighbor.interfaceState(), neighbor.holdingTime());
final L2ModificationInstruction.ModEtherInstruction modEtherInstruction = (L2ModificationInstruction.ModEtherInstruction) l2Instruction; result.put(InstructionCodec.MAC, modEtherInstruction.mac().toString()); break; case VLAN_ID:
if (onoslldp != null) { Type lt; if (notMy(eth.getSourceMAC().toString())) { lt = Type.EDGE; } else {