HaikuDepot: notify work status from main window
[haiku.git] / src / libs / compat / freebsd11_network / shared.h
bloba21de1c72700170ebfc17edc1ff3d7371fb94659
1 /*
2 * Copyright 2009, Colin Günther, coling@gmx.de. All Rights Reserved.
3 * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. All Rights Reserved.
4 * Copyright 2007, Hugo Santos. All Rights Reserved.
5 * Copyright 2004, Marcus Overhagen. All Rights Reserved.
6 * Distributed under the terms of the MIT License.
7 */
8 #ifndef SHARED_H_
9 #define SHARED_H_
12 #define MAX_DEVICES 8
15 struct ifnet;
17 struct device {
18 struct device *parent;
19 struct device *root;
21 driver_t *driver;
22 struct list children;
24 uint32 flags;
26 char device_name[128];
27 int unit;
28 char nameunit[64];
29 const char *description;
30 void *softc;
31 void *ivars;
33 struct {
34 int (*probe)(device_t dev);
35 int (*attach)(device_t dev);
36 int (*detach)(device_t dev);
37 int (*suspend)(device_t dev);
38 int (*resume)(device_t dev);
39 void (*shutdown)(device_t dev);
41 int (*miibus_readreg)(device_t, int, int);
42 int (*miibus_writereg)(device_t, int, int, int);
43 void (*miibus_statchg)(device_t);
44 void (*miibus_linkchg)(device_t);
45 void (*miibus_mediainit)(device_t);
47 int (*bus_child_location_str)(device_t dev __unused, device_t child,
48 char *buf, size_t buflen);
49 int (*bus_child_pnpinfo_str)(device_t dev __unused, device_t child,
50 char *buf, size_t buflen);
51 void (*bus_hinted_child)(device_t dev, const char *name, int unit);
52 int (*bus_print_child)(device_t dev, device_t child);
53 int (*bus_read_ivar)(device_t dev, device_t child __unused, int which,
54 uintptr_t *result);
55 } methods;
57 struct list_link link;
61 extern const char *gDeviceNameList[];
62 extern struct ifnet *gDevices[];
63 extern int32 gDeviceCount;
65 #endif /* SHARED_H_ */