Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet syncache: make some functions static



details:   https://anonhg.NetBSD.org/src/rev/137b6f7daf59
branches:  trunk
changeset: 370170:137b6f7daf59
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Sep 20 10:12:18 2022 +0000

description:
syncache: make some functions static

diffstat:

 sys/netinet/tcp_syncache.c |  14 +++++++++-----
 sys/netinet/tcp_syncache.h |   8 +++-----
 2 files changed, 12 insertions(+), 10 deletions(-)

diffs (76 lines):

diff -r 9dc7f84f3aa9 -r 137b6f7daf59 sys/netinet/tcp_syncache.c
--- a/sys/netinet/tcp_syncache.c        Tue Sep 20 07:37:29 2022 +0000
+++ b/sys/netinet/tcp_syncache.c        Tue Sep 20 10:12:18 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_syncache.c,v 1.1 2022/09/20 07:19:14 ozaki-r Exp $ */
+/*     $NetBSD: tcp_syncache.c,v 1.2 2022/09/20 10:12:18 ozaki-r Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_syncache.c,v 1.1 2022/09/20 07:19:14 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_syncache.c,v 1.2 2022/09/20 10:12:18 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -201,7 +201,11 @@
 #endif /* IPSEC*/
 #endif
 
-static void syn_cache_timer(void *);
+static void    syn_cache_timer(void *);
+static struct syn_cache *
+               syn_cache_lookup(const struct sockaddr *, const struct sockaddr *,
+               struct syn_cache_head **);
+static int     syn_cache_respond(struct syn_cache *);
 
 /* syn hash parameters */
 #define        TCP_SYN_HASH_SIZE       293
@@ -497,7 +501,7 @@
 /*
  * Find an entry in the syn cache.
  */
-struct syn_cache *
+static struct syn_cache *
 syn_cache_lookup(const struct sockaddr *src, const struct sockaddr *dst,
     struct syn_cache_head **headp)
 {
@@ -1094,7 +1098,7 @@
  * Returns 0 on success.
  */
 
-int
+static int
 syn_cache_respond(struct syn_cache *sc)
 {
 #ifdef INET6
diff -r 9dc7f84f3aa9 -r 137b6f7daf59 sys/netinet/tcp_syncache.h
--- a/sys/netinet/tcp_syncache.h        Tue Sep 20 07:37:29 2022 +0000
+++ b/sys/netinet/tcp_syncache.h        Tue Sep 20 10:12:18 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_syncache.h,v 1.1 2022/09/20 07:19:14 ozaki-r Exp $ */
+/*     $NetBSD: tcp_syncache.h,v 1.2 2022/09/20 10:12:18 ozaki-r Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -207,15 +207,13 @@
                struct mbuf *, u_char *, int, struct tcp_opt_info *);
 void    syn_cache_unreach(const struct sockaddr *, const struct sockaddr *,
           struct tcphdr *);
-struct socket *syn_cache_get(struct sockaddr *, struct sockaddr *,
+struct socket
+       *syn_cache_get(struct sockaddr *, struct sockaddr *,
                struct tcphdr *, struct socket *so, struct mbuf *);
 void    syn_cache_init(void);
 void    syn_cache_insert(struct syn_cache *, struct tcpcb *);
-struct syn_cache *syn_cache_lookup(const struct sockaddr *, const struct sockaddr *,
-               struct syn_cache_head **);
 void    syn_cache_reset(struct sockaddr *, struct sockaddr *,
                struct tcphdr *);
-int     syn_cache_respond(struct syn_cache *);
 void    syn_cache_cleanup(struct tcpcb *);
 #endif
 



Home | Main Index | Thread Index | Old Index