Deleted Added
full compact
unpcb.h (60833) unpcb.h (60938)
1/*
2 * Copyright (c) 1982, 1986, 1989, 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 * @(#)unpcb.h 8.1 (Berkeley) 6/2/93
1/*
2 * Copyright (c) 1982, 1986, 1989, 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 * @(#)unpcb.h 8.1 (Berkeley) 6/2/93
34 * $FreeBSD: head/sys/sys/unpcb.h 60833 2000-05-23 20:41:01Z jake $
34 * $FreeBSD: head/sys/sys/unpcb.h 60938 2000-05-26 02:09:24Z jake $
35 */
36
37#ifndef _SYS_UNPCB_H_
38#define _SYS_UNPCB_H_
39
40#include <sys/queue.h>
41
42/*

--- 17 unchanged lines hidden (view full) ---

60 * necessarily one which is referencing it). This generates
61 * the need for unp_refs and unp_nextref to be separate fields.
62 *
63 * Stream sockets keep copies of receive sockbuf sb_cc and sb_mbcnt
64 * so that changes in the sockbuf may be computed to modify
65 * back pressure on the sender accordingly.
66 */
67typedef u_quad_t unp_gen_t;
35 */
36
37#ifndef _SYS_UNPCB_H_
38#define _SYS_UNPCB_H_
39
40#include <sys/queue.h>
41
42/*

--- 17 unchanged lines hidden (view full) ---

60 * necessarily one which is referencing it). This generates
61 * the need for unp_refs and unp_nextref to be separate fields.
62 *
63 * Stream sockets keep copies of receive sockbuf sb_cc and sb_mbcnt
64 * so that changes in the sockbuf may be computed to modify
65 * back pressure on the sender accordingly.
66 */
67typedef u_quad_t unp_gen_t;
68LIST_HEAD(unp_head, struct unpcb);
68LIST_HEAD(unp_head, unpcb);
69
70struct unpcb {
69
70struct unpcb {
71 LIST_ENTRY(struct unpcb) unp_link; /* glue on list of all PCBs */
71 LIST_ENTRY(unpcb) unp_link; /* glue on list of all PCBs */
72 struct socket *unp_socket; /* pointer back to socket */
73 struct vnode *unp_vnode; /* if associated with file */
74 struct vnode *unp_rvnode; /* root vp for creating process */
75 ino_t unp_ino; /* fake inode number */
76 struct unpcb *unp_conn; /* control block of connected socket */
77 struct unp_head unp_refs; /* referencing socket linked list */
72 struct socket *unp_socket; /* pointer back to socket */
73 struct vnode *unp_vnode; /* if associated with file */
74 struct vnode *unp_rvnode; /* root vp for creating process */
75 ino_t unp_ino; /* fake inode number */
76 struct unpcb *unp_conn; /* control block of connected socket */
77 struct unp_head unp_refs; /* referencing socket linked list */
78 LIST_ENTRY(struct unpcb) unp_reflink; /* link in unp_refs list */
78 LIST_ENTRY(unpcb) unp_reflink; /* link in unp_refs list */
79 struct sockaddr_un *unp_addr; /* bound address of socket */
80 int unp_cc; /* copy of rcv.sb_cc */
81 int unp_mbcnt; /* copy of rcv.sb_mbcnt */
82 unp_gen_t unp_gencnt; /* generation count of this instance */
83};
84
85#define sotounpcb(so) ((struct unpcb *)((so)->so_pcb))
86

--- 29 unchanged lines hidden ---
79 struct sockaddr_un *unp_addr; /* bound address of socket */
80 int unp_cc; /* copy of rcv.sb_cc */
81 int unp_mbcnt; /* copy of rcv.sb_mbcnt */
82 unp_gen_t unp_gencnt; /* generation count of this instance */
83};
84
85#define sotounpcb(so) ((struct unpcb *)((so)->so_pcb))
86

--- 29 unchanged lines hidden ---