if ((tcp->th_flags & (TH_SYN|TH_ACK)) != TH_SYN)
return (NULL);
if (ip) {
- if ((ip->ip_off & htons(IP_OFFMASK)) != 0)
+ if ((ip->ip_off & IP_OFFMASK) != 0)
return (NULL);
}
struct sockaddr_in sin;
#endif
- fp.fp_psize = ntohs(ip->ip_len);
+ fp.fp_psize = ip->ip_len;
fp.fp_ttl = ip->ip_ttl;
- if (ip->ip_off & htons(IP_DF))
+ if (ip->ip_off & IP_DF)
fp.fp_flags |= PF_OSFP_DF;
#ifdef _KERNEL
strlcpy(srcname, inet_ntoa(ip->ip_src), sizeof(srcname));
sizeof(fp.fp_mss));
fp.fp_tcpopts = (fp.fp_tcpopts <<
PF_OSFP_TCPOPT_BITS) | PF_OSFP_TCPOPT_MSS;
- NTOHS(fp.fp_mss);
+ fp.fp_mss = ntohs(fp.fp_mss);
break;
case TCPOPT_WINDOW:
if (optlen >= TCPOLEN_WINDOW)
memcpy(&fp.fp_wscale, &optp[2],
sizeof(fp.fp_wscale));
- NTOHS(fp.fp_wscale);
fp.fp_tcpopts = (fp.fp_tcpopts <<
PF_OSFP_TCPOPT_BITS) |
PF_OSFP_TCPOPT_WSCALE;