• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/ipv4/

Lines Matching defs:th

237 static inline void TCP_ECN_rcv_synack(struct tcp_sock *tp, struct tcphdr *th)
239 if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || th->cwr))
243 static inline void TCP_ECN_rcv_syn(struct tcp_sock *tp, struct tcphdr *th)
245 if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || !th->cwr))
249 static inline int TCP_ECN_rcv_ecn_echo(struct tcp_sock *tp, struct tcphdr *th)
251 if (th->ece && !th->syn && (tp->ecn_flags & TCP_ECN_OK))
3750 struct tcphdr *th = tcp_hdr(skb);
3751 int length = (th->doff * 4) - sizeof(struct tcphdr);
3753 ptr = (unsigned char *)(th + 1);
3774 if (opsize == TCPOLEN_MSS && th->syn && !estab) {
3785 if (opsize == TCPOLEN_WINDOW && th->syn &&
3809 if (opsize == TCPOLEN_SACK_PERM && th->syn &&
3820 TCP_SKB_CB(skb)->sacked = (ptr - 2) - (unsigned char *)th;
3864 static int tcp_parse_aligned_timestamp(struct tcp_sock *tp, struct tcphdr *th)
3866 __be32 *ptr = (__be32 *)(th + 1);
3883 static int tcp_fast_parse_options(struct sk_buff *skb, struct tcphdr *th,
3889 if (th->doff == (sizeof(*th) / 4)) {
3893 th->doff == ((sizeof(*th) + TCPOLEN_TSTAMP_ALIGNED) / 4)) {
3894 if (tcp_parse_aligned_timestamp(tp, th))
3905 u8 *tcp_parse_md5sig_option(struct tcphdr *th)
3907 int length = (th->doff << 2) - sizeof (*th);
3908 u8 *ptr = (u8*)(th + 1);
3980 struct tcphdr *th = tcp_hdr(skb);
3985 (th->ack && seq == TCP_SKB_CB(skb)->end_seq && seq == tp->rcv_nxt) &&
3991 !tcp_may_update_window(tp, ack, seq, ntohs(th->window) << tp->rx_opt.snd_wscale) &&
4064 static void tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
4363 struct tcphdr *th = tcp_hdr(skb);
4371 __skb_pull(skb, th->doff * 4);
4398 eaten = (chunk == skb->len && !th->fin);
4416 if (th->fin)
4417 tcp_fin(skb, sk, th);
4956 static void tcp_check_urg(struct sock *sk, struct tcphdr *th)
4959 u32 ptr = ntohs(th->urg_ptr);
4963 ptr += ntohl(th->seq);
5022 static void tcp_urg(struct sock *sk, struct sk_buff *skb, struct tcphdr *th)
5027 if (th->urg)
5028 tcp_check_urg(sk, th);
5032 u32 ptr = tp->urg_seq - ntohl(th->seq) + (th->doff * 4) -
5033 th->syn;
5143 struct tcphdr *th, int syn_inerr)
5149 if (tcp_fast_parse_options(skb, th, tp, &hash_location) &&
5152 if (!th->rst) {
5168 if (!th->rst)
5174 if (th->rst) {
5187 if (th->syn && !before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) {
5226 struct tcphdr *th, unsigned len)
5257 if ((tcp_flag_word(th) & TCP_HP_BITS) == tp->pred_flags &&
5263 * is automatically equal to th->doff*4 due to pred_flags
5270 if (!tcp_parse_aligned_timestamp(tp, th))
5400 if (len < (th->doff << 2) || tcp_checksum_complete_user(sk, skb))
5407 res = tcp_validate_incoming(sk, skb, th, 1);
5412 if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0)
5418 tcp_urg(sk, skb, th);
5437 struct tcphdr *th, unsigned len)
5447 if (th->ack) {
5477 if (th->rst) {
5489 if (!th->syn)
5499 TCP_ECN_rcv_synack(tp, th);
5513 tp->snd_wnd = ntohs(th->window);
5628 if (th->rst) {
5643 if (th->syn) {
5665 tp->snd_wnd = ntohs(th->window);
5669 TCP_ECN_rcv_syn(tp, th);
5701 struct tcphdr *th, unsigned len)
5715 if (th->ack)
5718 if (th->rst)
5721 if (th->syn) {
5748 queued = tcp_rcv_synsent_state_process(sk, skb, th, len);
5753 tcp_urg(sk, skb, th);
5759 res = tcp_validate_incoming(sk, skb, th, 0);
5764 if (th->ack) {
5785 tp->snd_wnd = ntohs(th->window) <<
5835 after(TCP_SKB_CB(skb)->end_seq - th->fin, tp->rcv_nxt))) {
5844 } else if (th->fin || sock_owned_by_user(sk)) {
5879 tcp_urg(sk, skb, th);
5896 after(TCP_SKB_CB(skb)->end_seq - th->fin, tp->rcv_nxt)) {