Lines Matching refs:tcp
1 /* Shared library add-on to iptables to add TCP support. */
15 "TCP v%s options:\n"
16 " --tcp-flags [!] mask comp match when TCP flags & mask == comp\n"
19 " (equivalent to --tcp-flags SYN,RST,ACK SYN)\n"
26 " --tcp-option [!] number match if TCP option set\n\n",
36 { "tcp-flags", 1, 0, '4' },
37 { "tcp-option", 1, 0, '5' },
49 ports[0] = ports[1] = parse_port(buffer, "tcp");
54 ports[0] = buffer[0] ? parse_port(buffer, "tcp") : 0;
55 ports[1] = cp[0] ? parse_port(cp, "tcp") : 0xFFFF;
101 "Unknown TCP flag `%s'", ptr);
127 exit_error(PARAMETER_PROBLEM, "Bad TCP option `%s'", option);
182 "Only one of `--syn' or `--tcp-flags' "
191 "Only one of `--syn' or `--tcp-flags' "
198 "--tcp-flags requires two args.");
209 "Only one `--tcp-option' allowed");
235 if ((service = getservbyport(htons(port), "tcp")))
323 const struct ip6t_tcp *tcp = (struct ip6t_tcp *)match->data;
325 printf("tcp ");
326 print_ports("spt", tcp->spts[0], tcp->spts[1],
327 tcp->invflags & IP6T_TCP_INV_SRCPT,
329 print_ports("dpt", tcp->dpts[0], tcp->dpts[1],
330 tcp->invflags & IP6T_TCP_INV_DSTPT,
332 print_option(tcp->option,
333 tcp->invflags & IP6T_TCP_INV_OPTION,
335 print_flags(tcp->flg_mask, tcp->flg_cmp,
336 tcp->invflags & IP6T_TCP_INV_FLAGS,
338 if (tcp->invflags & ~IP6T_TCP_INV_MASK)
340 tcp->invflags & ~IP6T_TCP_INV_MASK);
380 printf("--tcp-option %u ", tcpinfo->option);
388 printf("--tcp-flags ");
398 static struct ip6tables_match tcp = {
399 .name = "tcp",
415 register_match6(&tcp);