Move tcp_fields_to_net() static inline into tcp_var.h, just below its

friend tcp_fields_to_host(). There is third party code that also uses
this inline.

Reviewed by:	ae
This commit is contained in:
Gleb Smirnoff 2017-02-10 17:46:26 +00:00
parent 10addc1eb5
commit cfff3743cd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=313561
2 changed files with 9 additions and 10 deletions

View File

@ -863,6 +863,15 @@ tcp_fields_to_host(struct tcphdr *th)
th->th_urp = ntohs(th->th_urp);
}
static inline void
tcp_fields_to_net(struct tcphdr *th)
{
th->th_seq = htonl(th->th_seq);
th->th_ack = htonl(th->th_ack);
th->th_win = htons(th->th_win);
th->th_urp = htons(th->th_urp);
}
#endif /* _KERNEL */
#endif /* _NETINET_TCP_VAR_H_ */

View File

@ -72,16 +72,6 @@ __FBSDID("$FreeBSD$");
#define TCP_KEYLEN_MIN 1 /* minimum length of TCP-MD5 key */
#define TCP_KEYLEN_MAX 80 /* maximum length of TCP-MD5 key */
static inline void
tcp_fields_to_net(struct tcphdr *th)
{
th->th_seq = htonl(th->th_seq);
th->th_ack = htonl(th->th_ack);
th->th_win = htons(th->th_win);
th->th_urp = htons(th->th_urp);
}
static int
tcp_ipsec_pcbctl(struct inpcb *inp, struct sockopt *sopt)
{