]>
git.saurik.com Git - apple/xnu.git/blob - bsd/net/if_blue.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
22 /* Copyright (c) 1997, 1998 Apple Computer, Inc. All Rights Reserved */
24 * @(#)if_blue.h 1.1 (MacOSX) 6/10/43
26 * 970520 - First version
27 * 980130 - Second version - performance improvements
36 * Y-adapter filter mechanism.
37 * Specifies the Atalk or IP network address of this node.
38 * If BF_ALLOC is set and BF_VALID is not, the corresponding
39 * protocol type should be captured.
44 char ifr_name
[IFNAMSIZ
]; /* if name, e.g. "en0" */
46 unsigned long BF_address
; /* IP address or Atalk Network # */
47 unsigned char BF_node
; /* Atalk node # */
49 struct ifnet
*BF_if
; /* Destination of "passed" pkts */
53 #define BF_ALLOC 0x01 /* Entry in use */
54 #define BF_DEALLOC 0x02 /* Clear matching entry */
55 #define BF_VALID 0x04 /* Address is valid */
56 #define BF_ATALK 0x08 /* Appletalk network address */
57 #define BF_IP 0x10 /* IP network address */
60 { char YS_name
[IFNAMSIZ
]; /* if name, e.g. "en0" */
61 struct BlueFilter YS_filter
[2];
65 int YS_pkts_looped_r2b
;
66 int YS_pkts_looped_b2r
;
73 { struct ifnet ifb_ifn
;
74 struct socket
*ifb_so
;
77 int sig_sent
; /* Set when new pkt arrives; cleared when mt */
78 struct BlueFilter filter
[2]; /* Only need to check IP, A/talk */
84 int no_bufs1
; /* splitter_input got null mbuf */
85 int no_bufs2
; /* ndrv_output couldn't dup mbuf */
89 /* Preallocate slots in blue_if to simplify filtering */
90 #define BFS_ATALK 0x0 /* The Atalk filter */
91 #define BFS_IP 0x1 /* The IP filter */
93 #define SIOCSSPLITTER _IOW('i', 123, struct ifreq) /* set 'splitter' */
94 #define SIOCGSPLITTER _IOR('i', 122, struct ifreq) /* get 'splitter' */
95 #define SIOCGSPLTSTAT _IOWR('i', 121, struct Ystats)
96 #define SIOCSSPLTFILT _IOW('i', 120, struct BlueFilter)
97 #define SIOCZSPLTSTAT _IO('i', 119) /* Clear stats */
100 * Config structure for the Y adapter - NYI
103 { char ifs_on
; /* 1=>on */
104 char ifs_qmax
; /* !0 => maxqlen */
105 short ifs_wait
; /* Time to wait for signal */
106 short ifs_sig
; /* Signal to send */
107 short ifs_pad
; /* Extra space */
111 extern struct ifqueue blueq
; /* Place to put incoming BB packets */
114 extern struct BlueFilter RhapFilter
[]; /* Filters for MacOSX side */
117 #endif /* _IF_BLUE_H */