]> git.saurik.com Git - apple/xnu.git/blob - bsd/net/ndrv_var.h
xnu-792.6.56.tar.gz
[apple/xnu.git] / bsd / net / ndrv_var.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /* Copyright (c) 1997, 1998 Apple Computer, Inc. All Rights Reserved */
24 /*
25 * @(#)ndrv.h 1.1 (MacOSX) 6/10/43
26 * Justin Walker - 970604
27 */
28
29 #ifndef _NET_NDRV_VAR_H
30 #define _NET_NDRV_VAR_H
31 #ifdef PRIVATE
32
33 /*
34 * structure for storing a linked list of multicast addresses
35 * registered by this socket. May be variable in length.
36 */
37
38 struct ndrv_multiaddr
39 {
40 struct ndrv_multiaddr* next;
41 struct if_multiaddr* ifma;
42 struct sockaddr addr;
43 };
44
45 /*
46 * The cb is plugged into the socket (so_pcb), and the ifnet structure
47 * of BIND is plugged in here.
48 * For now, it looks like a raw_cb up front...
49 */
50 struct ndrv_cb
51 {
52 TAILQ_ENTRY(ndrv_cb) nd_next;
53 struct socket *nd_socket; /* Back to the socket */
54 u_int32_t nd_signature; /* Just double-checking */
55 struct sockaddr_ndrv *nd_faddr;
56 struct sockaddr_ndrv *nd_laddr;
57 struct sockproto nd_proto; /* proto family, protocol */
58 int nd_descrcnt; /* # elements in nd_dlist - Obsolete */
59 TAILQ_HEAD(dlist, dlil_demux_desc) nd_dlist; /* Descr. list */
60 struct ifnet *nd_if; /* obsolete, maintained for binary compatibility */
61 u_long nd_proto_family;
62 u_long nd_family;
63 struct ndrv_multiaddr* nd_multiaddrs;
64 short nd_unit;
65 };
66
67 #define sotondrvcb(so) ((struct ndrv_cb *)(so)->so_pcb)
68 #define NDRV_SIGNATURE 0x4e445256 /* "NDRV" */
69
70 /* Nominal allocated space for NDRV sockets */
71 #define NDRVSNDQ 8192
72 #define NDRVRCVQ 8192
73
74 #endif /* PRIVATE */
75 #endif /* _NET_NDRV_VAR_H */