free ip options when detaching; notify routine to in_pcbnotify
[unix-history] / usr / src / sys / netinet / in_pcb.h
CommitLineData
8ae0e4b4
KM
1/*
2 * Copyright (c) 1982 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 *
6 * @(#)in_pcb.h 6.2 (Berkeley) %G%
7 */
bae4854b
BJ
8
9/*
10 * Common structure pcb for internet protocol implementation.
11 * Here are stored pointers to local and foreign host table
12 * entries, local and foreign socket numbers, and pointers
13 * up (to a socket structure) and down (to a protocol-specific)
14 * control block.
15 */
16struct inpcb {
17 struct inpcb *inp_next,*inp_prev;
18 /* pointers to other pcb's */
b454c3ea
BJ
19 struct inpcb *inp_head; /* pointer back to chain of inpcb's
20 for this protocol */
bae4854b
BJ
21 struct in_addr inp_faddr; /* foreign host table entry */
22 u_short inp_fport; /* foreign port */
23 struct in_addr inp_laddr; /* local host table entry */
24 u_short inp_lport; /* local port */
25 struct socket *inp_socket; /* back pointer to socket */
26 caddr_t inp_ppcb; /* pointer to per-protocol pcb */
c124e997 27 struct route inp_route; /* placeholder for routing entry */
bae4854b
BJ
28};
29
ebcadd38
BJ
30#define INPLOOKUP_WILDCARD 1
31#define INPLOOKUP_SETLOCAL 2
32
bae4854b
BJ
33#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
34
35#ifdef KERNEL
36struct inpcb *in_pcblookup();
37#endif