private byte[] createV6PseudoHeader(EncodeContext cxt, IContainerValue udpPrtl,
IRecordSetValue ipv6Header, int upperPrtlBytes, int startOffset)
throws BitBufferException {
byte[] pseudoBlock = new byte[V6_PSEUDO_HEADER_BYTES + upperPrtlBytes];
ByteBuffer pseudoBuffer = ByteBuffer.wrap(pseudoBlock);
IOctetstringValue address;
//Source Address
address = (IOctetstringValue)ipv6Header.getField(
Ipv6TypeEVExtFactory.IPV6_HEADER_SOURCE_ADDRESS);
assert address != null;
pseudoBuffer.put(address.getValue());
//Destination Address
address = (IOctetstringValue)ipv6Header.getField(
Ipv6TypeEVExtFactory.IPV6_HEADER_DESTINATION_ADDRESS);
assert address != null;
pseudoBuffer.put(address.getValue());
//Upper Layer Packet Length
pseudoBuffer.putInt(upperPrtlBytes);
//3octet zero
pseudoBuffer.position(pseudoBuffer.position() + 3);
//Next Header