socketvar.h (55943) | socketvar.h (59288) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)socketvar.h 8.3 (Berkeley) 2/19/95 | 1/*- 2 * Copyright (c) 1982, 1986, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)socketvar.h 8.3 (Berkeley) 2/19/95 |
34 * $FreeBSD: head/sys/sys/socketvar.h 55943 2000-01-14 02:53:29Z jasone $ | 34 * $FreeBSD: head/sys/sys/socketvar.h 59288 2000-04-16 18:53:38Z jlemon $ |
35 */ 36 37#ifndef _SYS_SOCKETVAR_H_ 38#define _SYS_SOCKETVAR_H_ 39 40#include <sys/queue.h> /* for TAILQ macros */ 41#include <sys/select.h> /* for struct selinfo */ 42 --- 56 unchanged lines hidden (view full) --- 99#define SB_LOCK 0x01 /* lock on data queue */ 100#define SB_WANT 0x02 /* someone is waiting to lock */ 101#define SB_WAIT 0x04 /* someone is waiting for data/space */ 102#define SB_SEL 0x08 /* someone is selecting */ 103#define SB_ASYNC 0x10 /* ASYNC I/O, need signals */ 104#define SB_UPCALL 0x20 /* someone wants an upcall */ 105#define SB_NOINTR 0x40 /* operations not interruptible */ 106#define SB_AIO 0x80 /* AIO operations queued */ | 35 */ 36 37#ifndef _SYS_SOCKETVAR_H_ 38#define _SYS_SOCKETVAR_H_ 39 40#include <sys/queue.h> /* for TAILQ macros */ 41#include <sys/select.h> /* for struct selinfo */ 42 --- 56 unchanged lines hidden (view full) --- 99#define SB_LOCK 0x01 /* lock on data queue */ 100#define SB_WANT 0x02 /* someone is waiting to lock */ 101#define SB_WAIT 0x04 /* someone is waiting for data/space */ 102#define SB_SEL 0x08 /* someone is selecting */ 103#define SB_ASYNC 0x10 /* ASYNC I/O, need signals */ 104#define SB_UPCALL 0x20 /* someone wants an upcall */ 105#define SB_NOINTR 0x40 /* operations not interruptible */ 106#define SB_AIO 0x80 /* AIO operations queued */ |
107#define SB_KNOTE 0x100 /* kernel note attached */ |
|
107 108 void (*so_upcall) __P((struct socket *, void *, int)); 109 void *so_upcallarg; 110 struct ucred *so_cred; /* user credentials */ 111 /* NB: generation count must not be first; easiest to make it last. */ 112 so_gen_t so_gencnt; /* generation count */ 113 void *so_emuldata; /* private data for emulators */ 114}; --- 52 unchanged lines hidden (view full) --- 167/* 168 * Macros for sockets and socket buffering. 169 */ 170 171/* 172 * Do we need to notify the other side when I/O is possible? 173 */ 174#define sb_notify(sb) (((sb)->sb_flags & (SB_WAIT | SB_SEL | SB_ASYNC | \ | 108 109 void (*so_upcall) __P((struct socket *, void *, int)); 110 void *so_upcallarg; 111 struct ucred *so_cred; /* user credentials */ 112 /* NB: generation count must not be first; easiest to make it last. */ 113 so_gen_t so_gencnt; /* generation count */ 114 void *so_emuldata; /* private data for emulators */ 115}; --- 52 unchanged lines hidden (view full) --- 168/* 169 * Macros for sockets and socket buffering. 170 */ 171 172/* 173 * Do we need to notify the other side when I/O is possible? 174 */ 175#define sb_notify(sb) (((sb)->sb_flags & (SB_WAIT | SB_SEL | SB_ASYNC | \ |
175 SB_UPCALL | SB_AIO)) != 0) | 176 SB_UPCALL | SB_AIO | SB_KNOTE)) != 0) |
176 177/* 178 * How much space is there in a socket buffer (so->so_snd or so->so_rcv)? 179 * This is problematical if the fields are unsigned, as the space might 180 * still be negative (cc > hiwat or mbcnt > mbmax). Should detect 181 * overflow and return 0. Should use "lmin" but it doesn't exist now. 182 */ 183#define sbspace(sb) \ --- 201 unchanged lines hidden --- | 177 178/* 179 * How much space is there in a socket buffer (so->so_snd or so->so_rcv)? 180 * This is problematical if the fields are unsigned, as the space might 181 * still be negative (cc > hiwat or mbcnt > mbmax). Should detect 182 * overflow and return 0. Should use "lmin" but it doesn't exist now. 183 */ 184#define sbspace(sb) \ --- 201 unchanged lines hidden --- |