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