Пример #1
0
    @Override
    protected String buildString() {
      StringBuilder sb = new StringBuilder();
      String ls = System.getProperty("line.separator");

      sb.append("[ICMPv4 Redirect Header (").append(length()).append(" bytes)]").append(ls);
      sb.append("  Gateway Internet Address: ").append(gatewayInternetAddress).append(ls);

      return sb.toString();
    }
    @Override
    protected String buildString() {
      StringBuilder sb = new StringBuilder();
      String ls = System.getProperty("line.separator");

      sb.append("[ICMPv6 Neighbor Advertisement Header (")
          .append(length())
          .append(" bytes)]")
          .append(ls);
      sb.append("  Router flag: ").append(routerFlag).append(ls);
      sb.append("  Solicited flag: ").append(solicitedFlag).append(ls);
      sb.append("  Override flag: ").append(overrideFlag).append(ls);
      sb.append("  Reserved: ").append(reserved).append(ls);
      sb.append("  Target Address: ").append(targetAddress).append(ls);
      for (IpV6NeighborDiscoveryOption opt : options) {
        sb.append("  Option: ").append(opt).append(ls);
      }

      return sb.toString();
    }