iPXE
netdev_settings.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008 Michael Brown <mbrown@fensystems.co.uk>.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  * 02110-1301, USA.
18  *
19  * You can also choose to distribute this program under the terms of
20  * the Unmodified Binary Distribution Licence (as given in the file
21  * COPYING.UBDL), provided that you have satisfied its requirements.
22  */
23 
24 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
25 
26 #include <string.h>
27 #include <errno.h>
28 #include <byteswap.h>
29 #include <ipxe/dhcp.h>
30 #include <ipxe/dhcpopts.h>
31 #include <ipxe/settings.h>
32 #include <ipxe/device.h>
33 #include <ipxe/netdevice.h>
34 #include <ipxe/init.h>
35 
36 /** @file
37  *
38  * Network device configuration settings
39  *
40  */
41 
42 /** Network device predefined settings */
43 const struct setting mac_setting __setting ( SETTING_NETDEV, mac ) = {
44  .name = "mac",
45  .description = "MAC address",
46  .type = &setting_type_hex,
47 };
48 const struct setting hwaddr_setting __setting ( SETTING_NETDEV, hwaddr ) = {
49  .name = "hwaddr",
50  .description = "Hardware address",
51  .type = &setting_type_hex,
52 };
53 const struct setting bustype_setting __setting ( SETTING_NETDEV, bustype ) = {
54  .name = "bustype",
55  .description = "Bus type",
56  .type = &setting_type_string,
57 };
58 const struct setting busloc_setting __setting ( SETTING_NETDEV, busloc ) = {
59  .name = "busloc",
60  .description = "Bus location",
61  .type = &setting_type_uint32,
62 };
63 const struct setting busid_setting __setting ( SETTING_NETDEV, busid ) = {
64  .name = "busid",
65  .description = "Bus ID",
66  .type = &setting_type_hex,
67 };
68 const struct setting linktype_setting __setting ( SETTING_NETDEV, linktype ) = {
69  .name = "linktype",
70  .description = "Link-layer type",
71  .type = &setting_type_string,
72 };
73 const struct setting chip_setting __setting ( SETTING_NETDEV, chip ) = {
74  .name = "chip",
75  .description = "Chip",
76  .type = &setting_type_string,
77 };
78 const struct setting ifname_setting __setting ( SETTING_NETDEV, ifname ) = {
79  .name = "ifname",
80  .description = "Interface name",
81  .type = &setting_type_string,
82 };
83 const struct setting mtu_setting __setting ( SETTING_NETDEV, mtu ) = {
84  .name = "mtu",
85  .description = "MTU",
86  .type = &setting_type_int16,
87  .tag = DHCP_MTU,
88 };
89 
90 /**
91  * Store link-layer address setting
92  *
93  * @v netdev Network device
94  * @v data Setting data, or NULL to clear setting
95  * @v len Length of setting data
96  * @ret rc Return status code
97  */
98 static int netdev_store_mac ( struct net_device *netdev,
99  const void *data, size_t len ) {
101 
102  /* Record new MAC address */
103  if ( data ) {
104  if ( len != netdev->ll_protocol->ll_addr_len )
105  return -EINVAL;
106  memcpy ( netdev->ll_addr, data, len );
107  } else {
108  /* Reset MAC address if clearing setting */
110  }
111 
112  return 0;
113 }
114 
115 /**
116  * Fetch link-layer address setting
117  *
118  * @v netdev Network device
119  * @v data Buffer to fill with setting data
120  * @v len Length of buffer
121  * @ret len Length of setting data, or negative error
122  */
123 static int netdev_fetch_mac ( struct net_device *netdev, void *data,
124  size_t len ) {
125  size_t max_len = netdev->ll_protocol->ll_addr_len;
126 
127  if ( len > max_len )
128  len = max_len;
129  memcpy ( data, netdev->ll_addr, len );
130  return max_len;
131 }
132 
133 /**
134  * Fetch hardware address setting
135  *
136  * @v netdev Network device
137  * @v data Buffer to fill with setting data
138  * @v len Length of buffer
139  * @ret len Length of setting data, or negative error
140  */
141 static int netdev_fetch_hwaddr ( struct net_device *netdev, void *data,
142  size_t len ) {
143  size_t max_len = netdev->ll_protocol->hw_addr_len;
144 
145  if ( len > max_len )
146  len = max_len;
147  memcpy ( data, netdev->hw_addr, len );
148  return max_len;
149 }
150 
151 /**
152  * Fetch bus type setting
153  *
154  * @v netdev Network device
155  * @v data Buffer to fill with setting data
156  * @v len Length of buffer
157  * @ret len Length of setting data, or negative error
158  */
159 static int netdev_fetch_bustype ( struct net_device *netdev, void *data,
160  size_t len ) {
161  static const char *bustypes[] = {
162  [BUS_TYPE_PCI] = "PCI",
163  [BUS_TYPE_ISAPNP] = "ISAPNP",
164  [BUS_TYPE_EISA] = "EISA",
165  [BUS_TYPE_MCA] = "MCA",
166  [BUS_TYPE_ISA] = "ISA",
167  [BUS_TYPE_TAP] = "TAP",
168  [BUS_TYPE_EFI] = "EFI",
169  [BUS_TYPE_XEN] = "XEN",
170  [BUS_TYPE_HV] = "HV",
171  [BUS_TYPE_USB] = "USB",
172  [BUS_TYPE_DT] = "DT",
173  };
174  struct device_description *desc = &netdev->dev->desc;
175  const char *bustype;
176 
177  assert ( desc->bus_type < ( sizeof ( bustypes ) /
178  sizeof ( bustypes[0] ) ) );
179  bustype = bustypes[desc->bus_type];
180  if ( ! bustype )
181  return -ENOENT;
182  strncpy ( data, bustype, len );
183  return strlen ( bustype );
184 }
185 
186 /**
187  * Fetch bus location setting
188  *
189  * @v netdev Network device
190  * @v data Buffer to fill with setting data
191  * @v len Length of buffer
192  * @ret len Length of setting data, or negative error
193  */
194 static int netdev_fetch_busloc ( struct net_device *netdev, void *data,
195  size_t len ) {
196  struct device_description *desc = &netdev->dev->desc;
197  uint32_t busloc;
198 
199  busloc = cpu_to_be32 ( desc->location );
200  if ( len > sizeof ( busloc ) )
201  len = sizeof ( busloc );
202  memcpy ( data, &busloc, len );
203  return sizeof ( busloc );
204 }
205 
206 /**
207  * Fetch bus ID setting
208  *
209  * @v netdev Network device
210  * @v data Buffer to fill with setting data
211  * @v len Length of buffer
212  * @ret len Length of setting data, or negative error
213  */
214 static int netdev_fetch_busid ( struct net_device *netdev, void *data,
215  size_t len ) {
216  struct device_description *desc = &netdev->dev->desc;
217  struct dhcp_netdev_desc dhcp_desc;
218 
219  dhcp_desc.type = desc->bus_type;
220  dhcp_desc.vendor = htons ( desc->vendor );
221  dhcp_desc.device = htons ( desc->device );
222  if ( len > sizeof ( dhcp_desc ) )
223  len = sizeof ( dhcp_desc );
224  memcpy ( data, &dhcp_desc, len );
225  return sizeof ( dhcp_desc );
226 }
227 
228 /**
229  * Fetch link layer type setting
230  *
231  * @v netdev Network device
232  * @v data Buffer to fill with setting data
233  * @v len Length of buffer
234  * @ret len Length of setting data, or negative error
235  */
236 static int netdev_fetch_linktype ( struct net_device *netdev, void *data,
237  size_t len ) {
238  const char *linktype = netdev->ll_protocol->name;
239 
240  strncpy ( data, linktype, len );
241  return strlen ( linktype );
242 }
243 
244 /**
245  * Fetch chip setting
246  *
247  * @v netdev Network device
248  * @v data Buffer to fill with setting data
249  * @v len Length of buffer
250  * @ret len Length of setting data, or negative error
251  */
252 static int netdev_fetch_chip ( struct net_device *netdev, void *data,
253  size_t len ) {
254  const char *chip = netdev->dev->driver_name;
255 
256  strncpy ( data, chip, len );
257  return strlen ( chip );
258 }
259 
260 /**
261  * Fetch ifname setting
262  *
263  * @v netdev Network device
264  * @v data Buffer to fill with setting data
265  * @v len Length of buffer
266  * @ret len Length of setting data, or negative error
267  */
268 static int netdev_fetch_ifname ( struct net_device *netdev, void *data,
269  size_t len ) {
270  const char *ifname = netdev->name;
271 
272  strncpy ( data, ifname, len );
273  return strlen ( ifname );
274 }
275 
276 /** A network device setting operation */
278  /** Setting */
279  const struct setting *setting;
280  /** Store setting (or NULL if not supported)
281  *
282  * @v netdev Network device
283  * @v data Setting data, or NULL to clear setting
284  * @v len Length of setting data
285  * @ret rc Return status code
286  */
287  int ( * store ) ( struct net_device *netdev, const void *data,
288  size_t len );
289  /** Fetch setting
290  *
291  * @v netdev Network device
292  * @v data Buffer to fill with setting data
293  * @v len Length of buffer
294  * @ret len Length of setting data, or negative error
295  */
296  int ( * fetch ) ( struct net_device *netdev, void *data, size_t len );
297 };
298 
299 /** Network device settings */
301  { &mac_setting, netdev_store_mac, netdev_fetch_mac },
302  { &hwaddr_setting, NULL, netdev_fetch_hwaddr },
303  { &bustype_setting, NULL, netdev_fetch_bustype },
304  { &busloc_setting, NULL, netdev_fetch_busloc },
305  { &busid_setting, NULL, netdev_fetch_busid },
306  { &linktype_setting, NULL, netdev_fetch_linktype },
307  { &chip_setting, NULL, netdev_fetch_chip },
308  { &ifname_setting, NULL, netdev_fetch_ifname },
309 };
310 
311 /**
312  * Store value of network device setting
313  *
314  * @v settings Settings block
315  * @v setting Setting to store
316  * @v data Setting data, or NULL to clear setting
317  * @v len Length of setting data
318  * @ret rc Return status code
319  */
320 static int netdev_store ( struct settings *settings,
321  const struct setting *setting,
322  const void *data, size_t len ) {
323  struct net_device *netdev = container_of ( settings, struct net_device,
324  settings.settings );
326  unsigned int i;
327 
328  /* Handle network device-specific settings */
329  for ( i = 0 ; i < ( sizeof ( netdev_setting_operations ) /
330  sizeof ( netdev_setting_operations[0] ) ) ; i++ ) {
332  if ( setting_cmp ( setting, op->setting ) == 0 ) {
333  if ( op->store ) {
334  return op->store ( netdev, data, len );
335  } else {
336  return -ENOTSUP;
337  }
338  }
339  }
340 
342 }
343 
344 /**
345  * Fetch value of network device setting
346  *
347  * @v settings Settings block
348  * @v setting Setting to fetch
349  * @v data Buffer to fill with setting data
350  * @v len Length of buffer
351  * @ret len Length of setting data, or negative error
352  */
353 static int netdev_fetch ( struct settings *settings, struct setting *setting,
354  void *data, size_t len ) {
355  struct net_device *netdev = container_of ( settings, struct net_device,
356  settings.settings );
358  unsigned int i;
359 
360  /* Handle network device-specific settings */
361  for ( i = 0 ; i < ( sizeof ( netdev_setting_operations ) /
362  sizeof ( netdev_setting_operations[0] ) ) ; i++ ) {
364  if ( setting_cmp ( setting, op->setting ) == 0 )
365  return op->fetch ( netdev, data, len );
366  }
367 
369 }
370 
371 /**
372  * Clear network device settings
373  *
374  * @v settings Settings block
375  */
376 static void netdev_clear ( struct settings *settings ) {
378 }
379 
380 /** Network device configuration settings operations */
382  .store = netdev_store,
383  .fetch = netdev_fetch,
384  .clear = netdev_clear,
385 };
386 
387 /**
388  * Redirect "netX" settings block
389  *
390  * @v settings Settings block
391  * @ret settings Underlying settings block
392  */
393 static struct settings * netdev_redirect ( struct settings *settings ) {
394  struct net_device *netdev;
395 
396  /* Redirect to "netX" network device */
398  if ( netdev ) {
399  return netdev_settings ( netdev );
400  } else {
401  return settings;
402  }
403 }
404 
405 /** "netX" settings operations */
408 };
409 
410 /** "netX" settings */
412  .refcnt = NULL,
416 };
417 
418 /** Initialise "netX" settings */
419 static void netdev_redirect_settings_init ( void ) {
420  int rc;
421 
423  "netX" ) ) != 0 ) {
424  DBG ( "Could not register netX settings: %s\n",
425  strerror ( rc ) );
426  return;
427  }
428 }
429 
430 /** "netX" settings initialiser */
431 struct init_fn netdev_redirect_settings_init_fn __init_fn ( INIT_LATE ) = {
432  .name = "netX",
433  .initialise = netdev_redirect_settings_init,
434 };
435 
436 /**
437  * Apply network device settings
438  *
439  * @ret rc Return status code
440  */
441 static int apply_netdev_settings ( void ) {
442  struct net_device *netdev;
443  struct settings *settings;
444  struct ll_protocol *ll_protocol;
445  size_t max_mtu;
446  size_t old_mtu;
447  size_t mtu;
448  int rc;
449 
450  /* Process settings for each network device */
451  for_each_netdev ( netdev ) {
452 
453  /* Get network device settings */
455 
456  /* Get MTU */
457  mtu = fetch_uintz_setting ( settings, &mtu_setting );
458 
459  /* Do nothing unless MTU is specified */
460  if ( ! mtu )
461  continue;
462 
463  /* Limit MTU to maximum supported by hardware */
465  max_mtu = ( netdev->max_pkt_len - ll_protocol->ll_header_len );
466  if ( mtu > max_mtu ) {
467  DBGC ( netdev, "NETDEV %s cannot support MTU %zd (max "
468  "%zd)\n", netdev->name, mtu, max_mtu );
469  mtu = max_mtu;
470  }
471 
472  /* Update maximum packet length */
473  old_mtu = netdev->mtu;
474  netdev->mtu = mtu;
475  if ( mtu != old_mtu ) {
476  DBGC ( netdev, "NETDEV %s MTU is %zd\n",
477  netdev->name, mtu );
478  }
479 
480  /* Close and reopen network device if MTU has increased */
481  if ( netdev_is_open ( netdev ) && ( mtu > old_mtu ) ) {
482  netdev_close ( netdev );
483  if ( ( rc = netdev_open ( netdev ) ) != 0 ) {
484  DBGC ( netdev, "NETDEV %s could not reopen: "
485  "%s\n", netdev->name, strerror ( rc ) );
486  return rc;
487  }
488  }
489  }
490 
491  return 0;
492 }
493 
494 /** Network device settings applicator */
495 struct settings_applicator netdev_applicator __settings_applicator = {
497 };
static int netdev_fetch_mac(struct net_device *netdev, void *data, size_t len)
Fetch link-layer address setting.
#define EINVAL
Invalid argument.
Definition: errno.h:428
static struct settings netdev_redirect_settings
"netX" settings
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
Dynamic Host Configuration Protocol.
int(* fetch)(struct net_device *netdev, void *data, size_t len)
Fetch setting.
uint8_t ll_header_len
Link-layer header length.
Definition: netdevice.h:200
uint8_t type
Bus type ID.
Definition: dhcp.h:450
static struct netdev_setting_operation netdev_setting_operations[]
Network device settings.
uint8_t ll_addr_len
Link-layer address length.
Definition: netdevice.h:198
static struct settings * netdev_redirect(struct settings *settings)
Redirect "netX" settings block.
static struct settings_operations netdev_redirect_settings_operations
"netX" settings operations
const struct setting * setting
Setting.
Error codes.
const struct setting mac_setting __setting(SETTING_NETDEV, mac)
Network device predefined settings.
size_t mtu
Maximum transmission unit length.
Definition: netdevice.h:415
#define DBGC(...)
Definition: compiler.h:505
#define ENOENT
No such file or directory.
Definition: errno.h:514
A settings applicator.
Definition: settings.h:251
void generic_settings_clear(struct settings *settings)
Clear generic settings block.
Definition: settings.c:207
static int apply_netdev_settings(void)
Apply network device settings.
int generic_settings_fetch(struct settings *settings, struct setting *setting, void *data, size_t len)
Fetch value of generic setting.
Definition: settings.c:178
uint8_t mac[ETH_ALEN]
MAC address.
Definition: ena.h:24
void(* init_addr)(const void *hw_addr, void *ll_addr)
Initialise link-layer address.
Definition: netdevice.h:150
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
Definition: netdevice.h:586
A link-layer protocol.
Definition: netdevice.h:114
static void netdev_clear(struct settings *settings)
Clear network device settings.
#define ENOTSUP
Operation not supported.
Definition: errno.h:589
A hardware device description.
Definition: device.h:19
#define BUS_TYPE_MCA
MCA bus type.
Definition: device.h:52
const char * name
Name.
Definition: settings.h:28
const char * name
Protocol name.
Definition: netdevice.h:116
char * strncpy(char *dest, const char *src, size_t max)
Copy string.
Definition: string.c:360
struct ena_llq_option desc
Descriptor counts.
Definition: ena.h:20
static int netdev_fetch_chip(struct net_device *netdev, void *data, size_t len)
Fetch chip setting.
#define BUS_TYPE_ISA
ISA bus type.
Definition: device.h:55
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define SETTING_NETDEV
Network device settings.
Definition: settings.h:63
static int netdev_fetch_busid(struct net_device *netdev, void *data, size_t len)
Fetch bus ID setting.
static int netdev_is_open(struct net_device *netdev)
Check whether or not network device is open.
Definition: netdevice.h:661
An initialisation function.
Definition: init.h:14
#define BUS_TYPE_PCI
PCI bus type.
Definition: device.h:43
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
#define container_of(ptr, type, field)
Get containing structure.
Definition: stddef.h:35
uint8_t hw_addr_len
Hardware address length.
Definition: netdevice.h:196
ring len
Length.
Definition: dwmac.h:231
const char * name
Definition: init.h:15
static struct net_device * netdev
Definition: gdbudp.c:52
const char * driver_name
Driver name.
Definition: device.h:80
static int netdev_store(struct settings *settings, const struct setting *setting, const void *data, size_t len)
Store value of network device setting.
#define DHCP_MTU
Maximum transmission unit.
Definition: dhcp.h:86
struct settings_applicator netdev_applicator __settings_applicator
Network device settings applicator.
Configuration settings.
struct settings *(* redirect)(struct settings *settings)
Redirect to underlying settings block (if applicable)
Definition: settings.h:91
#define BUS_TYPE_EISA
EISA bus type.
Definition: device.h:49
char * strerror(int errno)
Retrieve string representation of error number.
Definition: strerror.c:78
A network device setting operation.
#define for_each_netdev(netdev)
Iterate over all network devices.
Definition: netdevice.h:546
uint16_t device
Device ID.
Definition: dhcp.h:454
A network device.
Definition: netdevice.h:352
Network device descriptor.
Definition: dhcp.h:448
size_t strlen(const char *src)
Get length of string.
Definition: string.c:243
Settings block operations.
Definition: settings.h:85
A settings block.
Definition: settings.h:132
static int netdev_fetch_linktype(struct net_device *netdev, void *data, size_t len)
Fetch link layer type setting.
unsigned long fetch_uintz_setting(struct settings *settings, const struct setting *setting)
Fetch value of unsigned integer setting, or zero.
Definition: settings.c:1068
const char * name
Name.
Definition: settings.h:136
#define BUS_TYPE_DT
Devicetree bus type.
Definition: device.h:73
static int netdev_fetch_hwaddr(struct net_device *netdev, void *data, size_t len)
Fetch hardware address setting.
#define BUS_TYPE_EFI
EFI bus type.
Definition: device.h:61
unsigned int uint32_t
Definition: stdint.h:12
DHCP options.
struct list_head siblings
Sibling settings blocks.
Definition: settings.h:140
A setting.
Definition: settings.h:23
struct device * dev
Underlying hardware device.
Definition: netdevice.h:364
void netdev_close(struct net_device *netdev)
Close network device.
Definition: netdevice.c:895
Network device management.
#define BUS_TYPE_TAP
TAP bus type.
Definition: device.h:58
#define cpu_to_be32(value)
Definition: byteswap.h:110
static uint16_t struct vmbus_xfer_pages_operations * op
Definition: netvsc.h:327
char name[NETDEV_NAME_LEN]
Name of this network device.
Definition: netdevice.h:362
static int netdev_fetch_bustype(struct net_device *netdev, void *data, size_t len)
Fetch bus type setting.
struct settings_operations netdev_settings_operations
Network device configuration settings operations.
int generic_settings_store(struct settings *settings, const struct setting *setting, const void *data, size_t len)
Store value of generic setting.
Definition: settings.c:126
uint32_t mtu
Maximum MTU.
Definition: ena.h:28
struct net_device * find_netdev(const char *name)
Get network device by name.
Definition: netdevice.c:988
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static int netdev_fetch_ifname(struct net_device *netdev, void *data, size_t len)
Fetch ifname setting.
uint8_t data[48]
Additional event data.
Definition: ena.h:22
struct device_description desc
Device description.
Definition: device.h:82
static void netdev_redirect_settings_init(void)
Initialise "netX" settings.
int(* apply)(void)
Apply updated settings.
Definition: settings.h:256
Device model.
struct init_fn netdev_redirect_settings_init_fn __init_fn(INIT_LATE)
"netX" settings initialiser
struct list_head children
Child settings blocks.
Definition: settings.h:142
int register_settings(struct settings *settings, struct settings *parent, const char *name)
Register settings block.
Definition: settings.c:475
static int netdev_fetch(struct settings *settings, struct setting *setting, void *data, size_t len)
Fetch value of network device setting.
uint16_t vendor
Vendor ID.
Definition: dhcp.h:452
#define BUS_TYPE_XEN
Xen bus type.
Definition: device.h:64
uint8_t ll_addr[MAX_LL_ADDR_LEN]
Link-layer address.
Definition: netdevice.h:387
size_t max_pkt_len
Maximum packet length.
Definition: netdevice.h:409
#define INIT_LATE
Late initialisation.
Definition: init.h:32
#define DBG(...)
Print a debugging message.
Definition: compiler.h:498
#define LIST_HEAD_INIT(list)
Initialise a static list head.
Definition: list.h:30
#define BUS_TYPE_USB
USB bus type.
Definition: device.h:70
struct generic_settings settings
Configuration settings applicable to this device.
Definition: netdevice.h:428
linktype
Definition: 3c90x.h:240
static int netdev_store_mac(struct net_device *netdev, const void *data, size_t len)
Store link-layer address setting.
int(* store)(struct net_device *netdev, const void *data, size_t len)
Store setting (or NULL if not supported)
int(* store)(struct settings *settings, const struct setting *setting, const void *data, size_t len)
Store value of setting.
Definition: settings.h:108
int setting_cmp(const struct setting *a, const struct setting *b)
Compare two settings.
Definition: settings.c:1120
uint8_t hw_addr[MAX_HW_ADDR_LEN]
Hardware address.
Definition: netdevice.h:381
#define NULL
NULL pointer (VOID *)
Definition: Base.h:321
String functions.
int netdev_open(struct net_device *netdev)
Open network device.
Definition: netdevice.c:861
#define htons(value)
Definition: byteswap.h:135
struct ll_protocol * ll_protocol
Link-layer protocol.
Definition: netdevice.h:372
struct refcnt * refcnt
Reference counter.
Definition: settings.h:134
static int netdev_fetch_busloc(struct net_device *netdev, void *data, size_t len)
Fetch bus location setting.
#define BUS_TYPE_HV
Hyper-V bus type.
Definition: device.h:67
#define BUS_TYPE_ISAPNP
ISAPnP bus type.
Definition: device.h:46