Module Name: src Committed By: ozaki-r Date: Tue Sep 20 10:12:18 UTC 2022
Modified Files: src/sys/netinet: tcp_syncache.c tcp_syncache.h Log Message: syncache: make some functions static To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/netinet/tcp_syncache.c \ src/sys/netinet/tcp_syncache.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/tcp_syncache.c diff -u src/sys/netinet/tcp_syncache.c:1.1 src/sys/netinet/tcp_syncache.c:1.2 --- src/sys/netinet/tcp_syncache.c:1.1 Tue Sep 20 07:19:14 2022 +++ src/sys/netinet/tcp_syncache.c Tue Sep 20 10:12:18 2022 @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: tcp_syncache #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 @@ syn_cache_cleanup(struct tcpcb *tp) /* * 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 @@ syn_cache_add(struct sockaddr *src, stru * Returns 0 on success. */ -int +static int syn_cache_respond(struct syn_cache *sc) { #ifdef INET6 Index: src/sys/netinet/tcp_syncache.h diff -u src/sys/netinet/tcp_syncache.h:1.1 src/sys/netinet/tcp_syncache.h:1.2 --- src/sys/netinet/tcp_syncache.h:1.1 Tue Sep 20 07:19:14 2022 +++ src/sys/netinet/tcp_syncache.h Tue Sep 20 10:12:18 2022 @@ -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 @@ int syn_cache_add(struct sockaddr *, st 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