@Test public void testP2P2HelloPduBody() throws Exception { channelBuffer = ChannelBuffers.copiedBuffer(p2p); p2PHelloPdu.readFrom(channelBuffer); result = p2PHelloPdu.p2P2HelloPduBody(); assertThat(result, is(notNullValue())); }
public byte[] p2P2HelloPduBody() { List<Byte> bodyList = new ArrayList<>(); bodyList.add(this.circuitType()); bodyList.addAll(IsisUtil.sourceAndLanIdToBytes(this.sourceId())); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.holdingTime()))); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.pduLength()))); bodyList.add((byte) this.localCircuitId()); for (IsisTlv isisTlv : variableLengths) { bodyList.addAll(TlvsToBytes.tlvToBytes(isisTlv)); } return Bytes.toArray(bodyList); }
P2PHelloPdu extends HelloPdu { public byte[] p2P2HelloPduBody() { List<Byte> bodyList = new ArrayList<>(); bodyList.add(this.circuitType()); bodyList.addAll(IsisUtil.sourceAndLanIdToBytes(this.sourceId())); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.holdingTime()))); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.pduLength()))); bodyList.add((byte) this.localCircuitId()); for (IsisTlv isisTlv : variableLengths) { bodyList.addAll(TlvsToBytes.tlvToBytes(isisTlv)); } return Bytes.toArray(bodyList); } }
P2PHelloPdu extends HelloPdu { public byte[] p2P2HelloPduBody() { List<Byte> bodyList = new ArrayList<>(); bodyList.add(this.circuitType()); bodyList.addAll(IsisUtil.sourceAndLanIdToBytes(this.sourceId())); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.holdingTime()))); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.pduLength()))); bodyList.add((byte) this.localCircuitId()); for (IsisTlv isisTlv : variableLengths) { bodyList.addAll(TlvsToBytes.tlvToBytes(isisTlv)); } return Bytes.toArray(bodyList); } P2PHelloPdu(IsisHeader isisHeader); }
P2PHelloPdu extends HelloPdu { public byte[] p2P2HelloPduBody() { List<Byte> bodyList = new ArrayList<>(); bodyList.add(this.circuitType()); bodyList.addAll(IsisUtil.sourceAndLanIdToBytes(this.sourceId())); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.holdingTime()))); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.pduLength()))); bodyList.add((byte) this.localCircuitId()); for (IsisTlv isisTlv : variableLengths) { bodyList.addAll(TlvsToBytes.tlvToBytes(isisTlv)); } return Bytes.toArray(bodyList); } P2PHelloPdu(IsisHeader isisHeader); byte localCircuitId(); void setLocalCircuitId(byte localCircuitId); void setVariableLengths(List<IsisTlv> variableLengths); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); byte[] p2PHeader(); byte[] p2P2HelloPduBody(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
P2PHelloPdu extends HelloPdu { public byte[] p2P2HelloPduBody() { List<Byte> bodyList = new ArrayList<>(); bodyList.add(this.circuitType()); bodyList.addAll(IsisUtil.sourceAndLanIdToBytes(this.sourceId())); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.holdingTime()))); bodyList.addAll(Bytes.asList(IsisUtil.convertToTwoBytes(this.pduLength()))); bodyList.add((byte) this.localCircuitId()); for (IsisTlv isisTlv : variableLengths) { bodyList.addAll(TlvsToBytes.tlvToBytes(isisTlv)); } return Bytes.toArray(bodyList); } P2PHelloPdu(IsisHeader isisHeader); byte localCircuitId(); void setLocalCircuitId(byte localCircuitId); void setVariableLengths(List<IsisTlv> variableLengths); @Override void readFrom(ChannelBuffer channelBuffer); @Override byte[] asBytes(); byte[] p2PHeader(); byte[] p2P2HelloPduBody(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }