Lines Matching defs:tcp

158 	tcphdr_t	th, *tcp = &th;
165 bzero((char *)ip, MAX(sizeof(*tcp), sizeof(*ic)) + sizeof(*ip));
166 bzero((char *)tcp, sizeof(*tcp));
207 if (!strcasecmp(*cpp, "tcp") || !strcasecmp(*cpp, "udp") ||
212 tx_proto = "tcp";
236 fprintf(stderr, "tcp/udp with no source port\n");
240 tcp->th_sport = htons(tx_portnum(last));
242 tcp->th_win = htons(4096);
243 TCP_OFF_A(tcp, sizeof(*tcp) >> 2);
256 fprintf(stderr, "tcp/udp with no destination port\n");
260 tcp->th_dport = htons(tx_portnum(last));
268 __tcp_set_flags(tcp, 0);
271 __tcp_set_flags(tcp, __tcp_get_flags(tcp) |
273 if (__tcp_get_flags(tcp))
277 if (__tcp_get_flags(tcp) & TH_URG)
278 tcp->th_urp = htons(1);
281 tcp->th_seq = htonl(atoi(*cpp + 4));
286 tcp->th_ack = htonl(atoi(*cpp + 4));
320 bcopy((char *)tcp, ((char *)ip) + (IP_HL(ip) << 2),
321 sizeof(*tcp));
334 tcphdr_t th, *tcp = &th;
337 bzero((char *)ip6, MAX(sizeof(*tcp), sizeof(*ic6)) + sizeof(*ip6));
338 bzero((char *)tcp, sizeof(*tcp));
356 if (!strcasecmp(*cpp, "tcp")) {
358 tx_proto = "tcp";
397 fprintf(stderr, "tcp/udp with no source port\n");
401 tcp->th_sport = htons(tx_portnum(last));
403 tcp->th_win = htons(4096);
404 TCP_OFF_A(tcp, sizeof(*tcp) >> 2);
422 fprintf(stderr, "tcp/udp with no destination port\n");
426 tcp->th_dport = htons(tx_portnum(last));
440 __tcp_set_flags(tcp, 0);
443 __tcp_set_flags(tcp, __tcp_get_flags(tcp) |
445 if (__tcp_get_flags(tcp))
449 if (__tcp_get_flags(tcp) & TH_URG)
450 tcp->th_urp = htons(1);
453 tcp->th_seq = htonl(atoi(*cpp + 4));
458 tcp->th_ack = htonl(atoi(*cpp + 4));
481 bcopy((char *)tcp, (char *)ip6 + sizeof(*ip6),
482 sizeof(*tcp));