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
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 */
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 *);
64 struct iodesc
*socktodesc(int);
66 #endif /* __SYS_LIBNETBOOT_NETIF_H */