Lines Matching refs:tcph
382 struct tcphdr *tcph; in i40iw_form_cm_frame() local
411 packetsize = sizeof(*iph) + sizeof(*tcph); in i40iw_form_cm_frame()
413 packetsize = sizeof(*ip6h) + sizeof(*tcph); in i40iw_form_cm_frame()
420 sqbuf->tcphlen = sizeof(*tcph) + opts_len; in i40iw_form_cm_frame()
431 tcph = (struct tcphdr *)buf; in i40iw_form_cm_frame()
432 buf += sizeof(*tcph); in i40iw_form_cm_frame()
461 tcph = (struct tcphdr *)buf; in i40iw_form_cm_frame()
462 buf += sizeof(*tcph); in i40iw_form_cm_frame()
488 tcph->source = htons(cm_node->loc_port); in i40iw_form_cm_frame()
489 tcph->dest = htons(cm_node->rem_port); in i40iw_form_cm_frame()
491 tcph->seq = htonl(cm_node->tcp_cntxt.loc_seq_num); in i40iw_form_cm_frame()
495 tcph->ack_seq = htonl(cm_node->tcp_cntxt.loc_ack_num); in i40iw_form_cm_frame()
496 tcph->ack = 1; in i40iw_form_cm_frame()
498 tcph->ack_seq = 0; in i40iw_form_cm_frame()
503 tcph->syn = 1; in i40iw_form_cm_frame()
510 tcph->fin = 1; in i40iw_form_cm_frame()
514 tcph->rst = 1; in i40iw_form_cm_frame()
516 tcph->doff = (u16)((sizeof(*tcph) + opts_len + 3) >> 2); in i40iw_form_cm_frame()
517 sqbuf->tcphlen = tcph->doff << 2; in i40iw_form_cm_frame()
518 tcph->window = htons(cm_node->tcp_cntxt.rcv_wnd); in i40iw_form_cm_frame()
519 tcph->urg_ptr = 0; in i40iw_form_cm_frame()
697 struct tcphdr *tcph, in i40iw_handle_tcp_options() argument
701 u8 *optionsloc = (u8 *)&tcph[1]; in i40iw_handle_tcp_options()
707 (u32)tcph->syn)) { in i40iw_handle_tcp_options()
721 cm_node->tcp_cntxt.snd_wnd = ntohs(tcph->window) << in i40iw_handle_tcp_options()
2534 static int i40iw_check_syn(struct i40iw_cm_node *cm_node, struct tcphdr *tcph) in i40iw_check_syn() argument
2538 if (ntohl(tcph->ack_seq) != cm_node->tcp_cntxt.loc_seq_num) { in i40iw_check_syn()
2550 static int i40iw_check_seq(struct i40iw_cm_node *cm_node, struct tcphdr *tcph) in i40iw_check_seq() argument
2559 seq = ntohl(tcph->seq); in i40iw_check_seq()
2560 ack_seq = ntohl(tcph->ack_seq); in i40iw_check_seq()
2581 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; in i40iw_handle_syn_pkt() local
2587 optionsize = (tcph->doff << 2) - sizeof(struct tcphdr); in i40iw_handle_syn_pkt()
2588 inc_sequence = ntohl(tcph->seq); in i40iw_handle_syn_pkt()
2604 ret = i40iw_handle_tcp_options(cm_node, tcph, optionsize, 1); in i40iw_handle_syn_pkt()
2650 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; in i40iw_handle_synack_pkt() local
2655 optionsize = (tcph->doff << 2) - sizeof(struct tcphdr); in i40iw_handle_synack_pkt()
2656 inc_sequence = ntohl(tcph->seq); in i40iw_handle_synack_pkt()
2661 if (i40iw_check_syn(cm_node, tcph)) { in i40iw_handle_synack_pkt()
2665 cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq); in i40iw_handle_synack_pkt()
2667 ret = i40iw_handle_tcp_options(cm_node, tcph, optionsize, 0); in i40iw_handle_synack_pkt()
2692 cm_node->tcp_cntxt.loc_seq_num = ntohl(tcph->ack_seq); in i40iw_handle_synack_pkt()
2698 cm_node->tcp_cntxt.loc_seq_num = ntohl(tcph->ack_seq); in i40iw_handle_synack_pkt()
2724 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; in i40iw_handle_ack_pkt() local
2730 optionsize = (tcph->doff << 2) - sizeof(struct tcphdr); in i40iw_handle_ack_pkt()
2732 if (i40iw_check_seq(cm_node, tcph)) in i40iw_handle_ack_pkt()
2735 inc_sequence = ntohl(tcph->seq); in i40iw_handle_ack_pkt()
2739 ret = i40iw_handle_tcp_options(cm_node, tcph, optionsize, 1); in i40iw_handle_ack_pkt()
2742 cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq); in i40iw_handle_ack_pkt()
2757 cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq); in i40iw_handle_ack_pkt()
2809 struct tcphdr *tcph = (struct tcphdr *)rbuf->tcph; in i40iw_process_packet() local
2813 if (tcph->rst) { in i40iw_process_packet()
2815 } else if (tcph->syn) { in i40iw_process_packet()
2817 if (tcph->ack) in i40iw_process_packet()
2819 } else if (tcph->ack) { in i40iw_process_packet()
2822 if (tcph->fin) in i40iw_process_packet()
2842 (!i40iw_check_seq(cm_node, (struct tcphdr *)rbuf->tcph))) in i40iw_process_packet()
3129 struct tcphdr *tcph; in i40iw_receive_ilq() local
3160 tcph = (struct tcphdr *)rbuf->tcph; in i40iw_receive_ilq()
3176 cm_info.loc_port = ntohs(tcph->dest); in i40iw_receive_ilq()
3177 cm_info.rem_port = ntohs(tcph->source); in i40iw_receive_ilq()
3189 if (!tcph->syn || tcph->ack) in i40iw_receive_ilq()
3215 if (!tcph->rst && !tcph->fin) { in i40iw_receive_ilq()