Lines Matching refs:tcph

442 		to->tcph = from->tcph ?  in ClonePacketCtx()
444 if (to->tcph) in ClonePacketCtx()
446 to->payload = from->tcph ? in ClonePacketCtx()
447 ((uint8_t *)(to->tcph) + (to->tcph->doff<<2)) : NULL; in ClonePacketCtx()
575 if (!(pkt->iph) || !(pkt->tcph)) { in mtcp_sendpkt()
583 pkt->iph->saddr, pkt->tcph->source, in mtcp_sendpkt()
584 pkt->iph->daddr, pkt->tcph->dest, in mtcp_sendpkt()
585 htonl(pkt->tcph->seq), htonl(pkt->tcph->ack_seq), in mtcp_sendpkt()
586 ntohs(pkt->tcph->window), TCP_FLAG_ACK, in mtcp_sendpkt()
939 struct tcphdr *tcph; in mtcp_setlastpkt() local
1062 cur_pkt_ctx->p.tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ihl<<2)); in mtcp_setlastpkt()
1063 cur_pkt_ctx->p.payload = (uint8_t *)cur_pkt_ctx->p.tcph + in mtcp_setlastpkt()
1064 (cur_pkt_ctx->p.tcph->doff<<2); in mtcp_setlastpkt()
1067 cur_pkt_ctx->p.tcph = NULL; in mtcp_setlastpkt()
1082 cur_pkt_ctx->p.tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ihl<<2)); in mtcp_setlastpkt()
1083 cur_pkt_ctx->p.payload = (uint8_t *)cur_pkt_ctx->p.tcph + in mtcp_setlastpkt()
1084 (cur_pkt_ctx->p.tcph->doff<<2); in mtcp_setlastpkt()
1087 cur_pkt_ctx->p.tcph = NULL; in mtcp_setlastpkt()
1100 (tcph=(struct tcphdr *)((uint8_t *)iph + (iph->ihl<<2))) == NULL) { in mtcp_setlastpkt()
1108 if (offset + datalen > (tcph->doff<<2)) { in mtcp_setlastpkt()
1115 memcpy((uint8_t *)tcph + offset, data, datalen); in mtcp_setlastpkt()
1117 cur_pkt_ctx->p.seq = ntohl(tcph->seq); in mtcp_setlastpkt()
1119 cur_pkt_ctx->p.ack_seq = ntohl(tcph->ack_seq); in mtcp_setlastpkt()
1121 cur_pkt_ctx->p.window = ntohs(tcph->window); in mtcp_setlastpkt()
1127 memmove((uint8_t *)tcph + offset, in mtcp_setlastpkt()
1128 (uint8_t *)tcph + offset + datalen, in mtcp_setlastpkt()
1129 cur_pkt_ctx->p.payloadlen + (tcph->doff<<2) in mtcp_setlastpkt()
1132 cur_pkt_ctx->p.payload = (uint8_t *)tcph + (tcph->doff<<2); in mtcp_setlastpkt()
1134 memmove((uint8_t *)tcph + offset + datalen, in mtcp_setlastpkt()
1135 (uint8_t *)tcph + offset + 1, in mtcp_setlastpkt()
1136 cur_pkt_ctx->p.payloadlen + (tcph->doff<<2) in mtcp_setlastpkt()
1138 memcpy((uint8_t *)tcph + offset, data, datalen); in mtcp_setlastpkt()
1140 cur_pkt_ctx->p.payload = (uint8_t *)tcph + (tcph->doff<<2); in mtcp_setlastpkt()
1144 tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ihl<<2)); in mtcp_setlastpkt()
1145 payload = (uint8_t *)tcph + (tcph->doff<<2); in mtcp_setlastpkt()
1148 (iph->ihl<<2) - (tcph->doff<<2)) { in mtcp_setlastpkt()
1164 (tcph->doff<<2) - (iph->ihl<<2); in mtcp_setlastpkt()
1171 (tcph->doff<<2) - (iph->ihl<<2); in mtcp_setlastpkt()
1189 tcph = (struct tcphdr *)((uint8_t *)iph + (iph->ihl<<2)); in mtcp_setlastpkt()
1190 tcph->check = 0; in mtcp_setlastpkt()
1191 tcph->check = TCPCalcChecksum((uint16_t *)tcph, in mtcp_setlastpkt()