1 #include "ipf.h" 2 3 4 void 5 printtcpflags(tcpf, tcpfm) 6 u_32_t tcpf, tcpfm; 7 { 8 u_char *t; 9 char *s; 10 11 if (tcpf & ~TCPF_ALL) { 12 PRINTF("0x%x", tcpf); 13 } else { 14 for (s = flagset, t = flags; *s; s++, t++) { 15 if (tcpf & *t) 16 (void)putchar(*s); 17 } 18 } 19 20 if (tcpfm) { 21 (void)putchar('/'); 22 if (tcpfm & ~TCPF_ALL) { 23 PRINTF("0x%x", tcpfm); 24 } else { 25 for (s = flagset, t = flags; *s; s++, t++) 26 if (tcpfm & *t) 27 (void)putchar(*s); 28 } 29 } 30 } 31