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)
 {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to