protected VSS(Parser <H> p, Pipe <H> map, Deparser <H> d) { this.p = p; this.map = map; this.d = d; }
public void Use(Parser <H, M> p, VerifyChecksum <H, M> vr, Ingress <H, M> ig, Egress <H, M> eg, ComputeChecksum <H, M> ck, Deparser <H> dep) { this.p = p; this.vr = vr; this.ig = ig; this.eg = eg; this.ck = ck; this.dep = dep; }
public packet_out ProcessPacket(byte[] packet, Parser <H, M> p, VerifyChecksum <H, M> vr, Ingress <H, M> ig, Egress <H, M> eg, ComputeChecksum <H, M> ck, Deparser <H> dep) { H hdr = default(H); M meta = default(M); standard_metadata_t smeta = new standard_metadata_t(); try { p.apply(new packet_in(packet), out hdr, meta, ref meta, smeta, ref smeta); } catch (P4Exception ex) { Console.Error.WriteLine("P4 exception. V1Model not sure how to give to remainder of pipeline."); Console.Error.WriteLine(ex.Error); } vr.apply(hdr, meta, ref meta); ig.apply(hdr, ref hdr, meta, ref meta, smeta, ref smeta); eg.apply(hdr, ref hdr, meta, ref meta, smeta, ref smeta); ck.apply(hdr, ref hdr, meta, ref meta); packet_out po = new packet_out(smeta); dep.apply(po, hdr); // TODO do something with the result return(po); }
public void use(Parser <H> p, Pipe <H> map, Deparser <H> d) { // TODO the arch should be set up here to process packets // Expected to be called from the Main method? }
public void Use(Parser <H> p, Pipe <H> map, Deparser <H> d) { this.p = p; this.map = map; this.d = d; }