defopt SB_MAX, which controls the maximum allowable size of socket buffers

This commit is contained in:
kml 1999-02-09 02:15:45 +00:00
parent 0b4e481612
commit 96ba3fc35f
2 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files,v 1.271 1999/02/07 09:34:58 jonathan Exp $
# $NetBSD: files,v 1.272 1999/02/09 02:15:45 kml Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@ -70,6 +70,8 @@ defopt TCP_COMPAT_42
defopt TCP_RECVSPACE
defopt TCP_SENDSPACE
defopt SB_MAX
# these are not together so that turning on UVMHIST only affects files that
# use it, not most of the kernel
defopt opt_uvm.h UVM

View File

@ -1,4 +1,4 @@
/* $NetBSD: socketvar.h,v 1.33 1999/01/20 09:15:42 mycroft Exp $ */
/* $NetBSD: socketvar.h,v 1.34 1999/02/09 02:15:45 kml Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@ -43,6 +43,8 @@
#ifndef _KERNEL
struct uio;
#include "opt_sb_max.h"
#endif
TAILQ_HEAD(soqhead, socket);
@ -97,7 +99,11 @@ struct socket {
short sb_flags; /* flags, see below */
short sb_timeo; /* timeout for read/write */
} so_rcv, so_snd;
#ifndef SB_MAX
#define SB_MAX (256*1024) /* default for max chars in sockbuf */
#endif
#define SB_LOCK 0x01 /* lock on data queue */
#define SB_WANT 0x02 /* someone is waiting to lock */
#define SB_WAIT 0x04 /* someone is waiting for data/space */