2013-08-11 14:28:45 +00:00
|
|
|
#include "ipf.h"
|
|
|
|
|
|
|
|
|
|
|
|
void
|
2021-12-20 17:07:20 +00:00
|
|
|
printtcpflags(u_32_t tcpf, u_32_t tcpfm)
|
2013-08-11 14:28:45 +00:00
|
|
|
{
|
|
|
|
u_char *t;
|
|
|
|
char *s;
|
|
|
|
|
|
|
|
if (tcpf & ~TCPF_ALL) {
|
|
|
|
PRINTF("0x%x", tcpf);
|
|
|
|
} else {
|
|
|
|
for (s = flagset, t = flags; *s; s++, t++) {
|
|
|
|
if (tcpf & *t)
|
|
|
|
(void)putchar(*s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tcpfm) {
|
|
|
|
(void)putchar('/');
|
|
|
|
if (tcpfm & ~TCPF_ALL) {
|
|
|
|
PRINTF("0x%x", tcpfm);
|
|
|
|
} else {
|
|
|
|
for (s = flagset, t = flags; *s; s++, t++)
|
|
|
|
if (tcpfm & *t)
|
|
|
|
(void)putchar(*s);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|