Lines Matching refs:tcp

377 	struct tcphdr		*tcp;  member
1299 struct tcphdr *tcp = L3HDR(struct tcphdr,ip); in tcpopts_match() local
1300 u_char *cp = (u_char *)(tcp + 1); in tcpopts_match()
1301 int x = (tcp->th_off << 2) - sizeof(struct tcphdr); in tcpopts_match()
1492 struct tcphdr *const tcp = (struct tcphdr *)icmp; in ipfw_log() local
1508 ntohs(tcp->th_sport), in ipfw_log()
1510 ntohs(tcp->th_dport)); in ipfw_log()
2022 ipfw_state_update_tcp(struct ipfw_state *s, int dir, const struct tcphdr *tcp) in ipfw_state_update_tcp() argument
2024 uint32_t seq = ntohl(tcp->th_seq); in ipfw_state_update_tcp()
2025 uint32_t ack = ntohl(tcp->th_ack); in ipfw_state_update_tcp()
2027 if (tcp->th_flags & TH_RST) in ipfw_state_update_tcp()
2040 if (tcp->th_flags & TH_ACK) { in ipfw_state_update_tcp()
2065 if (tcp->th_flags & TH_ACK) { in ipfw_state_update_tcp()
2086 const struct tcphdr *tcp, struct ipfw_state *s) in ipfw_state_update() argument
2092 if (tcp != NULL && !ipfw_state_update_tcp(s, dir, tcp)) in ipfw_state_update()
2142 int *match_direction, const struct tcphdr *tcp) in ipfw_state_lookup() argument
2175 ipfw_state_update(pkt, dir, tcp, s); in ipfw_state_lookup()
2189 uint16_t type, struct ip_fw *rule, const struct tcphdr *tcp) in ipfw_state_alloc() argument
2223 ipfw_state_update(id, MATCH_FORWARD, tcp, s); in ipfw_state_alloc()
2231 const struct tcphdr *tcp) in ipfw_state_add() argument
2235 s = ipfw_state_alloc(ctx, id, type, rule, tcp); in ipfw_state_add()
2746 ipfw_insn_limit *cmd, struct ip_fw_args *args, const struct tcphdr *tcp) in ipfw_state_install() argument
2795 tcp); in ipfw_state_install()
2817 s = ipfw_state_add(ctx, &args->f_id, O_LIMIT, rule, t, tcp); in ipfw_state_install()
2882 struct tcphdr *tcp; in send_pkt() local
2894 tcp = (struct tcphdr *)(ip + 1); /* no IP options */ in send_pkt()
2896 tcp->th_off = 5; in send_pkt()
2904 tcp->th_sport = htons(id->dst_port); in send_pkt()
2905 tcp->th_dport = htons(id->src_port); in send_pkt()
2908 tcp->th_seq = htonl(ack); in send_pkt()
2909 tcp->th_ack = htonl(0); in send_pkt()
2910 tcp->th_flags = TH_RST; in send_pkt()
2914 tcp->th_seq = htonl(0); in send_pkt()
2915 tcp->th_ack = htonl(seq); in send_pkt()
2916 tcp->th_flags = TH_RST | TH_ACK; in send_pkt()
2931 tcp->th_dport = htons(id->dst_port); in send_pkt()
2932 tcp->th_sport = htons(id->src_port); in send_pkt()
2934 tcp->th_seq = htonl(seq); in send_pkt()
2935 tcp->th_ack = htonl(ack); in send_pkt()
2936 tcp->th_flags = TH_ACK; in send_pkt()
2945 tcp->th_sum = in_cksum(m, m->m_pkthdr.len); in send_pkt()
2972 struct tcphdr *const tcp = in send_reject() local
2975 if ((tcp->th_flags & TH_RST) == 0) { in send_reject()
2976 send_pkt(&args->f_id, ntohl(tcp->th_seq), in send_reject()
2977 ntohl(tcp->th_ack), tcp->th_flags | TH_RST); in send_reject()
3291 struct tcphdr *tcp; in ipfw_setup_local() local
3324 local->tcp = tcp = L3HDR(struct tcphdr, ip); in ipfw_setup_local()
3325 local->dst_port = tcp->th_dport; in ipfw_setup_local()
3326 local->src_port = tcp->th_sport; in ipfw_setup_local()
3327 args->f_id.flags = tcp->th_flags; in ipfw_setup_local()
3543 lc.tcp, &x->xlat_st); in ipfw_chk()
4027 (ipfw_insn_limit *)cmd, args, lc.tcp); in ipfw_chk()
4056 lc.tcp); in ipfw_chk()
4126 &args->f_id, &dyn_dir, lc.tcp); in ipfw_chk()
4197 lc.tcp, &x->xlat_pair->xlat_st); in ipfw_chk()