7 typedef struct Hdr Hdr;
11 uchar ln[4]; /* optional, present if L flag set*/
16 FLHDR= 1, /* sizeof(flags) */
17 LNHDR= 4, /* sizeof(ln) */
25 Version = (1<<2)|(1<<1)|(1<<0),
56 if(m->pe - m->ps < FLHDR)
62 if (h->flags & FlagL) {
63 if(m->pe - m->ps < LNHDR)
69 /* next protocol depending on type*/
70 demux(p_mux, 0, 0, m, &dump);
72 m->p = seprint(m->p, m->e, "ver=%1d", h->flags & Version);
73 m->p = seprint(m->p, m->e, " fl=%s", flags(h->flags));
76 m->p = seprint(m->p, m->e, " totallen=%1d", NetL(h->ln));
78 /* these are not in the header, just print them for our convenience */
79 m->p = seprint(m->p, m->e, " dataln=%1zd", m->pe - m->ps);
80 if ((h->flags & (FlagL|FlagS|FlagM)) == 0 && m->ps == m->pe)
81 m->p = seprint(m->p, m->e, " ack");
92 p_mux, /* we need this to get the dump printed */