public OfpFlowMod(Stream stream, OfpHeader header = null) { BeBinaryReader br = new BeBinaryReader(stream, Encoding.ASCII, true); Header = header ?? new OfpHeader(stream); //var pos = stream.Position; Match = new OfpMatch(stream); //pos = stream.Position; br.Parse(out Cookie); br.Parse(out Command); br.Parse(out IdleTimeout); br.Parse(out HardTimeout); br.Parse(out Priority); br.Parse(out BufferId); br.Parse(out OutPort); //FIXED: br.Parse(out Flags); //pos = stream.Position; IOfpAction action = OfpActionHeader.ParseAction(stream); while (action != null) { Actions[action.Header.Type] = action; action = OfpActionHeader.ParseAction(stream); } }
public OfpFlowStats(Stream stream) { BeBinaryReader br = new BeBinaryReader(stream, Encoding.ASCII, true); br.Parse(out Length); br.Parse(out TableId); br.ReadBytes(1); Match = new OfpMatch(stream); br.Parse(out DurationSec); br.Parse(out DurationNsec); br.Parse(out Priority); br.Parse(out IdleTimeout); br.Parse(out HardTimeout); br.ReadBytes(6); br.Parse(out Cookie); br.Parse(out PacketCount); br.Parse(out ByteCount); IOfpAction action = OfpActionHeader.ParseAction(stream); while (action != null) { Actions[action.Header.Type] = action; action = OfpActionHeader.ParseAction(stream); } }
public OfpAggregateStatsRequest(Stream stream, OfpHeader header = null) { BeBinaryReader br = new BeBinaryReader(stream, Encoding.ASCII, true); Match = new OfpMatch(stream); br.Parse(out TableId); br.ReadBytes(1); br.Parse(out OutPort); }
public OfpFlowRemoved(Stream stream, OfpHeader header = null) { BeBinaryReader br = new BeBinaryReader(stream, Encoding.ASCII, true); Header = header ?? new OfpHeader(stream); Match = new OfpMatch(stream); br.Parse(out Cookie); br.Parse(out Priority); br.Parse(out Reason); br.ReadBytes(1); br.Parse(out DurationSec); br.Parse(out DurationNsec); br.Parse(out IdleTimeout); br.ReadBytes(2); br.Parse(out PacketCount); br.Parse(out ByteCount); }