mirror of
https://github.com/openbsd/src.git
synced 2024-12-22 07:27:59 -08:00
Declare some global TCP variables constant.
OK mvs@
This commit is contained in:
parent
4ac9059474
commit
7aa20da420
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tcp_fsm.h,v 1.9 2018/02/05 14:53:26 bluhm Exp $ */
|
||||
/* $OpenBSD: tcp_fsm.h,v 1.10 2024/12/20 21:30:17 bluhm Exp $ */
|
||||
/* $NetBSD: tcp_fsm.h,v 1.6 1994/10/14 16:01:48 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
@ -68,7 +68,7 @@
|
||||
* determined by state, with the proviso that TH_FIN is sent only
|
||||
* if all data queued for output is included in the segment.
|
||||
*/
|
||||
u_char tcp_outflags[TCP_NSTATES] = {
|
||||
const u_char tcp_outflags[TCP_NSTATES] = {
|
||||
TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK,
|
||||
TH_ACK, TH_ACK,
|
||||
TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_ACK, TH_ACK,
|
||||
@ -76,7 +76,7 @@ u_char tcp_outflags[TCP_NSTATES] = {
|
||||
#endif /* TCPOUTFLAGS */
|
||||
|
||||
#ifdef TCPSTATES
|
||||
const char *tcpstates[] = {
|
||||
const char *const tcpstates[] = {
|
||||
"CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD",
|
||||
"ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING",
|
||||
"LAST_ACK", "FIN_WAIT_2", "TIME_WAIT",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tcp_timer.c,v 1.76 2024/01/28 20:34:25 bluhm Exp $ */
|
||||
/* $OpenBSD: tcp_timer.c,v 1.77 2024/12/20 21:30:17 bluhm Exp $ */
|
||||
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
|
||||
|
||||
/*
|
||||
@ -167,10 +167,10 @@ tcp_canceltimers(struct tcpcb *tp)
|
||||
TCP_TIMER_DISARM(tp, i);
|
||||
}
|
||||
|
||||
int tcp_backoff[TCP_MAXRXTSHIFT + 1] =
|
||||
const int tcp_backoff[TCP_MAXRXTSHIFT + 1] =
|
||||
{ 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
|
||||
|
||||
int tcp_totbackoff = 511; /* sum of tcp_backoff[] */
|
||||
const int tcp_totbackoff = 511; /* sum of tcp_backoff[] */
|
||||
|
||||
/*
|
||||
* TCP timer processing.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tcp_timer.h,v 1.21 2024/01/29 22:47:13 bluhm Exp $ */
|
||||
/* $OpenBSD: tcp_timer.h,v 1.22 2024/12/20 21:30:17 bluhm Exp $ */
|
||||
/* $NetBSD: tcp_timer.h,v 1.6 1995/03/26 20:32:37 jtc Exp $ */
|
||||
|
||||
/*
|
||||
@ -160,7 +160,7 @@ extern int tcp_keepidle; /* time before keepalive probes begin */
|
||||
extern int tcp_keepintvl; /* time between keepalive probes */
|
||||
extern int tcp_maxidle; /* time to drop after starting probes */
|
||||
extern int tcp_ttl; /* time to live for TCP segs */
|
||||
extern int tcp_backoff[];
|
||||
extern const int tcp_backoff[];
|
||||
|
||||
void tcp_timer_init(void);
|
||||
#endif /* _KERNEL */
|
||||
|
Loading…
Reference in New Issue
Block a user