Date: Fri, 10 Feb 2017 17:46:26 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313561 - in head/sys: netinet netipsec Message-ID: <201702101746.v1AHkQLs081790@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Feb 10 17:46:26 2017 New Revision: 313561 URL: https://svnweb.freebsd.org/changeset/base/313561 Log: 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 Modified: head/sys/netinet/tcp_var.h head/sys/netipsec/xform_tcp.c Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Fri Feb 10 17:37:04 2017 (r313560) +++ head/sys/netinet/tcp_var.h Fri Feb 10 17:46:26 2017 (r313561) @@ -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_ */ Modified: head/sys/netipsec/xform_tcp.c ============================================================================== --- head/sys/netipsec/xform_tcp.c Fri Feb 10 17:37:04 2017 (r313560) +++ head/sys/netipsec/xform_tcp.c Fri Feb 10 17:46:26 2017 (r313561) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702101746.v1AHkQLs081790>