25 static Field p_fields[] =
27 {"type", Fnum, Otype, "type", },
28 {"conn", Fnum, Oconn, "conn", },
29 {"seq", Fnum, Oseq, "seq", },
30 {"len", Fnum, Olen, "len", },
38 compile_cmp(aoe.name, f, p_fields);
41 sysfatal("unknown aoe field: %s", f->s);
45 p_filter(Filter *f, Msg *m)
49 if(m->pe - m->ps < Hsize)
57 return h->type == f->ulv;
59 return h->conn = f->ulv;
61 return h->seq = f->ulv;
63 return h->len = f->ulv;
68 static char* ttab[] = {
85 if(m->pe - m->ps < Hsize)
93 if(h->type < nelem(ttab))
96 snprint(buf, sizeof buf, "%d", h->type);
101 m->p = seprint(m->p, m->e, "type=%s conn=%d seq=%d len=%d %.*s",
102 s, h->conn, h->seq, h->len,
103 (int)utfnlen(p, h->len), p);