*/\r
public class OF10StatsRequestInputFactory implements OFSerializer<MultipartRequestInput> {\r
\r
- private static final byte MESSAGE_TYPE = 18;\r
- private static final int MESSAGE_LENGTH = 16;\r
+ private static final byte MESSAGE_TYPE = 16;\r
+ private static final int MESSAGE_LENGTH = 12;\r
\r
private static OF10StatsRequestInputFactory instance; \r
\r
public static void encodeMatchV10(ByteBuf out, MatchV10 match) {\r
out.writeInt(match.getWildcards().intValue());\r
out.writeShort(match.getInPort());\r
- out.writeBytes(match.getDlSrc().getValue().getBytes());\r
- out.writeBytes(match.getDlDst().getValue().getBytes());\r
+ out.writeBytes(ByteBufUtils.macAddressToBytes(match.getDlSrc().getValue()));\r
+ out.writeBytes(ByteBufUtils.macAddressToBytes(match.getDlDst().getValue()));\r
out.writeShort(match.getDlVlan());\r
out.writeByte(match.getDlVlanPcp());\r
ByteBufUtils.padBuffer(PADDING_IN_MATCH, out);\r
out.writeByte(match.getNwTos());\r
out.writeByte(match.getNwProto());\r
ByteBufUtils.padBuffer(PADDING_IN_MATCH_2, out);\r
- String[] srcGroups = match.getNwSrc().getValue().split(".");\r
+ String[] srcGroups = match.getNwSrc().getValue().split("\\.");\r
for (int i = 0; i < srcGroups.length; i++) {\r
out.writeByte(Integer.parseInt(srcGroups[i]));\r
}\r
- String[] dstGroups = match.getNwSrc().getValue().split(".");\r
+ String[] dstGroups = match.getNwSrc().getValue().split("\\.");\r
for (int i = 0; i < dstGroups.length; i++) {\r
out.writeByte(Integer.parseInt(dstGroups[i]));\r
}\r