1 /* $NetBSD: netif.h,v 1.7 2009/01/17 14:00:36 tsutsui Exp $ */
3 #ifndef __SYS_LIBNETBOOT_NETIF_H
4 #define __SYS_LIBNETBOOT_NETIF_H
8 struct netif
; /* forward */
12 int (*netif_match
)(struct netif
*, void *);
13 int (*netif_probe
)(struct netif
*, void *);
14 void (*netif_init
)(struct iodesc
*, void *);
15 int (*netif_get
)(struct iodesc
*, void *, size_t, saseconds_t
);
16 int (*netif_put
)(struct iodesc
*, void *, size_t);
17 void (*netif_end
)(struct netif
*);
18 struct netif_dif
*netif_ifs
;
25 struct netif_stats
*dif_stats
;
27 /* the following fields are used internally by the netif layer */
42 struct netif_driver
*nif_driver
;
48 extern struct netif_driver
*netif_drivers
[]; /* machdep */
49 extern int n_netif_drivers
;
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
*);
59 int netif_open(void *);
62 #endif /* __SYS_LIBNETBOOT_NETIF_H */