/* from UCB 7.3 12/30/87 */
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#ifndef _sys_socketvar_h
#define _sys_socketvar_h
/*
* Kernel structure per socket.
* Contains send and receive buffer queues,
* handle on protocol and pointer to protocol
* private data and error information.
*/
struct socket {
/*
* Variables for connection queueing.
* Socket where accepts occur is so_head in all subsidiary sockets.
* If so_head is 0, socket is not related to an accept.
* For head socket so_q0 queues partially completed connections,
* while so_q is a queue of connections ready to be accepted.
* If a connection is aborted and it has so_head set, then
* it has to be pulled out of either so_q0 or so_q.
* We allow connections to queue up based on current queue lengths
* and limit on number of queued connections for this socket.
*/
/*
* Variables for socket buffering.
*/
struct sockbuf {
/*
* Hooks for alternative wakeup strategies.
* These are used by kernel subsystems wishing to access the socket
* abstraction. If so_wupfunc is nonnull, it is called in place of
* wakeup any time that wakeup would otherwise be called with an
* argument whose value is an address lying within a socket structure.
*/
};
struct wupalt {
/*
* Other state information here, for example, for a stream
* connected to a socket.
*/
};
/*
* Socket state bits.
*/
/*
* Macros for sockets and socket buffering.
*/
/* how much space is there in a socket buffer (so->so_snd or so->so_rcv) */
/* do we have to send all at once on a socket? */
/* can we read something from so? */
/* can we write something to so? */
/* adjust counters in sb reflecting allocation of m */
}
/* adjust counters in sb reflecting freeing of m */
}
/* set lock on sockbuf sb */
} \
}
/* release lock on sockbuf sb */
else \
} \
}
#ifdef KERNEL
#endif
#endif /*!_sys_socketvar_h*/