1 /* $NetBSD: netif.h,v 1.4 1995/09/14 23:45:30 pk Exp $ */
5 #ifndef __SYS_LIBNETBOOT_NETIF_H
6 #define __SYS_LIBNETBOOT_NETIF_H
9 #define NENTS(x) sizeof(x)/sizeof(x[0])
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;
26 struct netif_stats *dif_stats;
28 /* the following fields are used internally by the netif layer */
43 struct netif_driver *nif_driver;
49 extern struct netif_driver *netif_drivers[]; /* machdep */
50 extern int n_netif_drivers;
52 extern int netif_debug;
54 void netif_init(void);
55 struct netif *netif_select(void *);
56 int netif_probe(struct netif *, void *);
57 void netif_attach(struct netif *, struct iodesc *, void *);
58 void netif_detach(struct netif *);
59 ssize_t netif_get(struct iodesc *, void *, size_t, time_t);
60 ssize_t netif_put(struct iodesc *, void *, size_t);
62 int netif_open(void *);
65 struct iodesc *socktodesc(int);
67 #endif /* __SYS_LIBNETBOOT_NETIF_H */