newsyslog.8: Comment out another zstd reference (and fix a typo).
[dragonfly.git] / lib / libstand / netif.h
blob6e83fc7caea3513acd3dcbcb3a280c6307b000a6
1 /* $NetBSD: netif.h,v 1.4 1995/09/14 23:45:30 pk Exp $ */
3 /* $FreeBSD: src/lib/libstand/netif.h,v 1.1.1.1.6.1 2000/09/10 01:24:16 ps Exp $ */
5 #ifndef __SYS_LIBNETBOOT_NETIF_H
6 #define __SYS_LIBNETBOOT_NETIF_H
7 #include "iodesc.h"
9 #define NENTS(x) sizeof(x)/sizeof(x[0])
11 struct netif_driver {
12 const char *netif_bname;
13 int (*netif_match)(struct netif *, void *);
14 int (*netif_probe)(struct netif *, void *);
15 void (*netif_init)(struct iodesc *, void *);
16 int (*netif_get)(struct iodesc *, void *, size_t, time_t);
17 int (*netif_put)(struct iodesc *, void *, size_t);
18 void (*netif_end)(struct netif *);
19 struct netif_dif *netif_ifs;
20 int netif_nifs;
23 struct netif_dif {
24 int dif_unit;
25 int dif_nsel;
26 struct netif_stats *dif_stats;
27 void *dif_private;
28 /* the following fields are used internally by the netif layer */
29 u_long dif_used;
32 struct netif_stats {
33 int collisions;
34 int collision_error;
35 int missed;
36 int sent;
37 int received;
38 int deferred;
39 int overflow;
42 struct netif {
43 struct netif_driver *nif_driver;
44 int nif_unit;
45 int nif_sel;
46 void *nif_devdata;
49 extern struct netif_driver *netif_drivers[]; /* machdep */
51 extern int netif_debug;
53 void netif_init(void);
54 struct netif *netif_select(void *);
55 int netif_probe(struct netif *, void *);
56 void netif_attach(struct netif *, struct iodesc *, void *);
57 void netif_detach(struct netif *);
58 ssize_t netif_get(struct iodesc *, void *, size_t, time_t);
59 ssize_t netif_put(struct iodesc *, void *, size_t);
61 int netif_open(void *);
62 int netif_close(int);
64 struct iodesc *socktodesc(int);
66 #endif /* __SYS_LIBNETBOOT_NETIF_H */