- constify.
- make tcp_dooptions and tcpipqent_pool static.
This commit is contained in:
parent
6c6dad782f
commit
c31e22237d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_input.c,v 1.253 2006/10/17 09:31:17 yamt Exp $ */
|
||||
/* $NetBSD: tcp_input.c,v 1.254 2006/10/21 10:08:54 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -152,7 +152,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.253 2006/10/17 09:31:17 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.254 2006/10/21 10:08:54 yamt Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ipsec.h"
|
||||
|
@ -374,6 +374,9 @@ extern struct evcnt tcp_reass_fragdup;
|
|||
|
||||
#endif /* TCP_REASS_COUNTERS */
|
||||
|
||||
static int tcp_dooptions(struct tcpcb *, const u_char *, int,
|
||||
const struct tcphdr *, struct mbuf *, int, struct tcp_opt_info *);
|
||||
|
||||
#ifdef INET
|
||||
static void tcp4_log_refused(const struct ip *, const struct tcphdr *);
|
||||
#endif
|
||||
|
@ -383,7 +386,8 @@ static void tcp6_log_refused(const struct ip6_hdr *, const struct tcphdr *);
|
|||
|
||||
#define TRAVERSE(x) while ((x)->m_next) (x) = (x)->m_next
|
||||
|
||||
POOL_INIT(tcpipqent_pool, sizeof(struct ipqent), 0, 0, 0, "tcpipqepl", NULL);
|
||||
static POOL_INIT(tcpipqent_pool, sizeof(struct ipqent), 0, 0, 0, "tcpipqepl",
|
||||
NULL);
|
||||
|
||||
struct ipqent *
|
||||
tcpipqent_alloc()
|
||||
|
@ -2841,8 +2845,9 @@ tcp_signature(struct mbuf *m, struct tcphdr *th, int thoff,
|
|||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcphdr *th,
|
||||
static int
|
||||
tcp_dooptions(struct tcpcb *tp, const u_char *cp, int cnt,
|
||||
const struct tcphdr *th,
|
||||
struct mbuf *m __unused, int toff __unused, struct tcp_opt_info *oi)
|
||||
{
|
||||
u_int16_t mss;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_sack.c,v 1.20 2006/10/20 13:11:09 reinoud Exp $ */
|
||||
/* $NetBSD: tcp_sack.c,v 1.21 2006/10/21 10:08:54 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 The NetBSD Foundation, Inc.
|
||||
|
@ -109,7 +109,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.20 2006/10/20 13:11:09 reinoud Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.21 2006/10/21 10:08:54 yamt Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ipsec.h"
|
||||
|
@ -236,14 +236,15 @@ tcp_new_dsack(struct tcpcb *tp, tcp_seq seq, u_int32_t len)
|
|||
}
|
||||
|
||||
void
|
||||
tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
|
||||
tcp_sack_option(struct tcpcb *tp, const struct tcphdr *th, const u_char *cp,
|
||||
int optlen)
|
||||
{
|
||||
struct sackblk
|
||||
t_sack_block[(MAX_TCPOPTLEN - 2) / (sizeof(u_int32_t) * 2)];
|
||||
struct sackblk *sack = NULL;
|
||||
struct sackhole *cur = NULL;
|
||||
struct sackhole *tmp = NULL;
|
||||
char *lp = cp + 2;
|
||||
const char *lp = cp + 2;
|
||||
int i, j, num_sack_blks;
|
||||
tcp_seq left, right, acked;
|
||||
|
||||
|
@ -393,7 +394,7 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
|
|||
}
|
||||
|
||||
void
|
||||
tcp_del_sackholes(struct tcpcb *tp, struct tcphdr *th)
|
||||
tcp_del_sackholes(struct tcpcb *tp, const struct tcphdr *th)
|
||||
{
|
||||
/* Max because this could be an older ack that just arrived. */
|
||||
tcp_seq lastack = SEQ_GT(th->th_ack, tp->snd_una) ?
|
||||
|
@ -430,7 +431,7 @@ tcp_free_sackholes(struct tcpcb *tp)
|
|||
* in fast recovery.
|
||||
*/
|
||||
void
|
||||
tcp_sack_newack(struct tcpcb *tp, struct tcphdr *th)
|
||||
tcp_sack_newack(struct tcpcb *tp, const struct tcphdr *th)
|
||||
{
|
||||
if (tp->t_partialacks < 0) {
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp_var.h,v 1.140 2006/10/19 11:40:51 yamt Exp $ */
|
||||
/* $NetBSD: tcp_var.h,v 1.141 2006/10/21 10:08:54 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -837,8 +837,6 @@ struct secasvar *tcp_signature_getsav(struct mbuf *, struct tcphdr *);
|
|||
int tcp_signature(struct mbuf *, struct tcphdr *, int, struct secasvar *,
|
||||
char *);
|
||||
#endif
|
||||
int tcp_dooptions(struct tcpcb *, u_char *, int, struct tcphdr *,
|
||||
struct mbuf *, int, struct tcp_opt_info *);
|
||||
void tcp_drain(void);
|
||||
void tcp_established(struct tcpcb *);
|
||||
void tcp_init(void);
|
||||
|
@ -892,12 +890,13 @@ tcp_seq tcp_new_iss1(void *, void *, u_int16_t, u_int16_t, size_t,
|
|||
tcp_seq);
|
||||
|
||||
void tcp_new_dsack(struct tcpcb *, tcp_seq, u_int32_t);
|
||||
void tcp_sack_option(struct tcpcb *, struct tcphdr *, u_char *, int);
|
||||
void tcp_del_sackholes(struct tcpcb *, struct tcphdr *);
|
||||
void tcp_sack_option(struct tcpcb *, const struct tcphdr *,
|
||||
const u_char *, int);
|
||||
void tcp_del_sackholes(struct tcpcb *, const struct tcphdr *);
|
||||
void tcp_free_sackholes(struct tcpcb *);
|
||||
void tcp_sack_adjust(struct tcpcb *tp);
|
||||
struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt);
|
||||
void tcp_sack_newack(struct tcpcb *, struct tcphdr *);
|
||||
void tcp_sack_newack(struct tcpcb *, const struct tcphdr *);
|
||||
int tcp_sack_numblks(const struct tcpcb *);
|
||||
#define TCP_SACK_OPTLEN(nblks) ((nblks) * 8 + 2 + 2)
|
||||
|
||||
|
|
Loading…
Reference in New Issue