Exemplo n.º 1
0
        public byte[] ToByteArray()
        {
            Writer w = new Writer(Size);

            w.Write(Match.ToByteArray());
            w.Write(TableId);
            w.Pad(1);
            w.Write(OutPort);
            return(w.ToByteArray());
        }
Exemplo n.º 2
0
        public byte[] ToByteArray()
        {
            Writer w = new Writer(Size);

            w.Write(Header.ToByteArray());
            w.Write(Match.ToByteArray());
            w.Write(Cookie);
            w.Write(Priority);
            w.Write(Reason);
            w.Pad(1);
            w.Write(DurationSec);
            w.Write(DurationNsec);
            w.Write(IdleTimeout);
            w.Pad(2);
            w.Write(PacketCount);
            w.Write(ByteCount);
            return(w.ToByteArray());
        }
Exemplo n.º 3
0
        public byte[] ToByteArray()
        {
            Writer w = new Writer();

            UpdateLength();
            w.Write(Length);
            w.Write(TableId);
            w.Pad(1);
            w.Write(Match.ToByteArray());
            w.Write(DurationSec);
            w.Write(DurationNsec);
            w.Write(Priority);
            w.Write(IdleTimeout);
            w.Write(HardTimeout);
            w.Pad(6);
            w.Write(Cookie);
            w.Write(PacketCount);
            w.Write(ByteCount);

            w.Write(Actions.ToByteArray());
            return(w.ToByteArray());
        }
Exemplo n.º 4
0
        public byte[] ToByteArray()
        {
            Writer w = new Writer();

            UpdateLength();
            //var pos = (long)Header.Length;
            w.Write(Header.ToByteArray());
            //pos = w.Position;
            w.Write(Match.ToByteArray());
            //pos = w.Position;
            w.Write(Cookie);
            w.Write(Command);
            w.Write(IdleTimeout);
            w.Write(HardTimeout);
            w.Write(Priority);
            w.Write(BufferId);
            w.Write(OutPort);
            w.Write(Flags);
            //pos = w.Position;
            w.Write(Actions.ToByteArray());
            //pos = w.Position;
            return(w.ToByteArray());
        }