Lines Matching refs:th

168   struct tcp_hdr *th;
190 th = (struct tcp_hdr *)&((struct vj_u32_t*)ip)[ilen];
191 if ((TCPH_FLAGS(th) & (TCP_SYN|TCP_FIN|TCP_RST|TCP_ACK)) != TCP_ACK) {
196 hlen = ilen + TCPH_HDRLEN(th);
223 || (*(struct vj_u32_t*)th).v != (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) {
244 && (*(struct vj_u32_t*)th).v == (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) {
282 * check is unnecessary but costless). The 4th line checks the TCP
283 * header length. The 5th line checks IP options, if any. The 6th
291 || TCPH_HDRLEN(th) != TCPH_HDRLEN(oth)
293 || (TCPH_HDRLEN(th) > 5 && BCMP(th + 1, oth + 1, (TCPH_HDRLEN(th) - 5) << 2))) {
303 if (TCPH_FLAGS(th) & TCP_URG) {
304 deltaS = lwip_ntohs(th->urgp);
307 } else if (th->urgp != oth->urgp) {
315 if ((deltaS = (u16_t)(lwip_ntohs(th->wnd) - lwip_ntohs(oth->wnd))) != 0) {
320 if ((deltaL = lwip_ntohl(th->ackno) - lwip_ntohl(oth->ackno)) != 0) {
329 if ((deltaL = lwip_ntohl(th->seqno) - lwip_ntohl(oth->seqno)) != 0) {
387 if (TCPH_FLAGS(th) & TCP_PSH) {
394 deltaA = lwip_ntohs(th->chksum);
500 struct tcp_hdr *th;
536 th = (struct tcp_hdr *)&((u8_t*)&cs->cs_ip)[hlen];
537 th->chksum = lwip_htons((*cp << 8) | cp[1]);
540 TCPH_SET_FLAG(th, TCP_PSH);
542 TCPH_UNSET_FLAG(th, TCP_PSH);
550 tmp = lwip_ntohl(th->ackno) + i;
551 th->ackno = lwip_htonl(tmp);
552 tmp = lwip_ntohl(th->seqno) + i;
553 th->seqno = lwip_htonl(tmp);
559 tmp = lwip_ntohl(th->seqno) + lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen;
560 th->seqno = lwip_htonl(tmp);
565 TCPH_SET_FLAG(th, TCP_URG);
566 DECODEU(th->urgp);
568 TCPH_UNSET_FLAG(th, TCP_URG);
571 DECODES(th->wnd);
574 DECODEL(th->ackno);
577 DECODEL(th->seqno);