@Override public OFOxmArpTpaMasked readFrom(ChannelBuffer bb) throws OFParseError { // fixed value property typeLen == 0x80002f08L int typeLen = bb.readInt(); if (typeLen != (int) 0x80002f08) throw new OFParseError("Wrong typeLen: Expected=0x80002f08L(0x80002f08L), got=" + typeLen); IPv4Address value = IPv4Address.read4Bytes(bb); IPv4Address mask = IPv4Address.read4Bytes(bb); OFOxmArpTpaMaskedVer12 oxmArpTpaMaskedVer12 = new OFOxmArpTpaMaskedVer12(value, mask); if (logger.isTraceEnabled()) logger.trace("readFrom - read={}", oxmArpTpaMaskedVer12); return oxmArpTpaMaskedVer12; }
@Override public OFOxmTunnelIpv4SrcMasked readFrom(ByteBuf bb) throws OFParseError { // fixed value property typeLen == 0x13f08L int typeLen = bb.readInt(); if (typeLen != 0x13f08) throw new OFParseError("Wrong typeLen: Expected=0x13f08L(0x13f08L), got=" + typeLen); IPv4Address value = IPv4Address.read4Bytes(bb); IPv4Address mask = IPv4Address.read4Bytes(bb); OFOxmTunnelIpv4SrcMaskedVer13 oxmTunnelIpv4SrcMaskedVer13 = new OFOxmTunnelIpv4SrcMaskedVer13(value, mask); if (logger.isTraceEnabled()) logger.trace("readFrom - read={}", oxmTunnelIpv4SrcMaskedVer13); return oxmTunnelIpv4SrcMaskedVer13; }
@Override public OFActionSetNwDst readFrom(ChannelBuffer bb) throws OFParseError { int start = bb.readerIndex(); // fixed value property type == 6 short type = bb.readShort(); if (type != (short) 0x6) throw new OFParseError("Wrong type: Expected=OFActionType.SET_NW_DST(6), got=" + type); int length = U16.f(bb.readShort()); if (length != 8) throw new OFParseError("Wrong length: Expected=8(8), got=" + length); if (bb.readableBytes() + (bb.readerIndex() - start) < length) { // Buffer does not have all data yet bb.readerIndex(start); return null; } if (logger.isTraceEnabled()) logger.trace("readFrom - length={}", length); IPv4Address nwAddr = IPv4Address.read4Bytes(bb); OFActionSetNwDstVer11 actionSetNwDstVer11 = new OFActionSetNwDstVer11(nwAddr); if (logger.isTraceEnabled()) logger.trace("readFrom - read={}", actionSetNwDstVer11); return actionSetNwDstVer11; }