public OFMessageSwitchConfigRef parseSwitchConfig(byte[] in) {
GenericRecord record = getRecord(ofpSwitchConfigSchema, in);
// TODO Improvs: We plan to get all flags from Avro protocol type... soon... so let it be now just numbers
short flags = getShort((GenericData.Fixed)record.get("flags"));
OFMessageSwitchConfigRef configH = builder.buildSwitchConfig();
if (flags == 0) {
configH.setConfigFlagFragNormal();
} else {
if ((flags & 1) != 0) configH.setConfigFlagFragDrop();
if ((flags & 2) != 0) configH.setConfigFlagFragReasm();
if ((flags & 3) != 0) configH.setConfigFlagFragMask();
}
return configH;
}