1 /****************************************************************************
2 * Copyright(c) 2000-2001 Broadcom Corporation. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation.
10 * Description: Broadcom Network Interface Card Extension (NICE) is an
11 * extension to Linux NET device kernel mode drivers.
12 * NICE is designed to provide additional functionalities,
13 * such as receive packet intercept. To support Broadcom NICE,
14 * the network device driver can be modified by adding an
15 * device ioctl handler and by indicating receiving packets
16 * to the NICE receive handler. Broadcom NICE will only be
17 * enabled by a NICE-aware intermediate driver, such as
18 * Broadcom Advanced Server Program Driver (BASP). When NICE
19 * is not enabled, the modified network device drivers
20 * functions exactly as other non-NICE aware drivers.
24 * Created: September 17, 2000
26 ****************************************************************************/
33 #define SIOCNICE SIOCDEVPRIVATE+7
38 * The following structure needs to be less than IFNAMSIZ (16 bytes) because
39 * we're overloading ifreq.ifr_ifru.
41 * If 16 bytes is not enough, we should consider relaxing this because
42 * this is no field after ifr_ifru in the ifreq structure. But we may
43 * run into future compatiability problem in case of changing struct ifreq.
52 /* cmd = NICE_CMD_SET_RX or NICE_CMD_GET_RX */
55 void (*nrqus1_rx)( struct sk_buff*, void* );
59 /* cmd = NICE_CMD_QUERY_SUPPORT */
63 __u32 nrqus2_support_rx:1;
64 __u32 nrqus2_support_vlan:1;
65 __u32 nrqus2_support_get_speed:1;
69 /* cmd = NICE_CMD_GET_SPEED */
72 unsigned int nrqus3_speed; /* 0 if link is down, */
73 /* otherwise speed in Mbps */
76 /* cmd = NICE_CMD_BLINK_LED */
79 unsigned int nrqus4_blink_time; /* blink duration in seconds */
85 #define nrq_rx nrq_nrqu.nrqu_nrqus1.nrqus1_rx
86 #define nrq_ctx nrq_nrqu.nrqu_nrqus1.nrqus1_ctx
87 #define nrq_support_rx nrq_nrqu.nrqu_nrqus2.nrqus2_support_rx
88 #define nrq_magic nrq_nrqu.nrqu_nrqus2.nrqus2_magic
89 #define nrq_support_vlan nrq_nrqu.nrqu_nrqus2.nrqus2_support_vlan
90 #define nrq_support_get_speed nrq_nrqu.nrqu_nrqus2.nrqus2_support_get_speed
91 #define nrq_speed nrq_nrqu.nrqu_nrqus3.nrqus3_speed
92 #define nrq_blink_time nrq_nrqu.nrqu_nrqus4.nrqus4_blink_time
97 #define NICE_REQUESTOR_MAGIC 0x4543494E /* NICE in ascii */
98 #define NICE_DEVICE_MAGIC 0x4E494345 /* ECIN in ascii */
103 #define NICE_CMD_QUERY_SUPPORT 0x00000001
104 #define NICE_CMD_SET_RX 0x00000002
105 #define NICE_CMD_GET_RX 0x00000003
106 #define NICE_CMD_GET_SPEED 0x00000004
107 #define NICE_CMD_BLINK_LED 0x00000005
109 #endif /* _nicext_h_ */