Lines Matching full:tcp
1 /* Shared library add-on to iptables to add TCP support. */
15 "tcp match options:\n" in tcp_help()
16 "[!] --tcp-flags mask comp match when TCP flags & mask == comp\n" in tcp_help()
19 " (equivalent to --tcp-flags SYN,RST,ACK,FIN SYN)\n" in tcp_help()
26 "[!] --tcp-option number match if TCP option set\n"); in tcp_help()
35 {.name = "tcp-flags", .has_arg = true, .val = '4'},
36 {.name = "tcp-option", .has_arg = true, .val = '5'},
48 ports[0] = ports[1] = xtables_parse_port(buffer, "tcp"); in parse_tcp_ports()
53 ports[0] = buffer[0] ? xtables_parse_port(buffer, "tcp") : 0; in parse_tcp_ports()
54 ports[1] = cp[0] ? xtables_parse_port(cp, "tcp") : 0xFFFF; in parse_tcp_ports()
97 "Unknown TCP flag `%s'", ptr); in parse_tcp_flag()
123 xtables_error(PARAMETER_PROBLEM, "Bad TCP option \"%s\"", option); in parse_tcp_option()
170 "Only one of `--syn' or `--tcp-flags' " in tcp_parse()
179 "Only one of `--syn' or `--tcp-flags' " in tcp_parse()
184 "--tcp-flags requires two args."); in tcp_parse()
195 "Only one `--tcp-option' allowed"); in tcp_parse()
211 if ((service = getservbyport(htons(port), "tcp"))) in port_to_service()
300 const struct xt_tcp *tcp = (struct xt_tcp *)match->data; in tcp_print() local
302 printf(" tcp"); in tcp_print()
303 print_ports("spt", tcp->spts[0], tcp->spts[1], in tcp_print()
304 tcp->invflags & XT_TCP_INV_SRCPT, in tcp_print()
306 print_ports("dpt", tcp->dpts[0], tcp->dpts[1], in tcp_print()
307 tcp->invflags & XT_TCP_INV_DSTPT, in tcp_print()
309 print_option(tcp->option, in tcp_print()
310 tcp->invflags & XT_TCP_INV_OPTION, in tcp_print()
312 print_flags(tcp->flg_mask, tcp->flg_cmp, in tcp_print()
313 tcp->invflags & XT_TCP_INV_FLAGS, in tcp_print()
315 if (tcp->invflags & ~XT_TCP_INV_MASK) in tcp_print()
317 tcp->invflags & ~XT_TCP_INV_MASK); in tcp_print()
356 printf(" --tcp-option %u", tcpinfo->option); in tcp_save()
363 printf(" --tcp-flags "); in tcp_save()
411 xt_xlate_add(xl, "tcp sport %s%u-%u", in tcp_xlate()
415 xt_xlate_add(xl, "tcp sport %s%u", in tcp_xlate()
424 xt_xlate_add(xl, "tcp dport %s%u-%u", in tcp_xlate()
428 xt_xlate_add(xl, "tcp dport %s%u", in tcp_xlate()
436 xt_xlate_add(xl, "tcp option %u %s", tcpinfo->option, in tcp_xlate()
443 xt_xlate_add(xl, "tcp flags %s", in tcp_xlate()
452 xt_xlate_add(xl, "meta l4proto tcp"); in tcp_xlate()
459 .name = "tcp",