a little help here please, if_tun.c
I am supposed to program a virtual network device driver for openBSD. all the
driver does is: display packets sent to it
I started with if_loop.c and if_tun.c and I think I am lost. can any one
please give me an idea what these functions below do?
how does the kernel assign an IP address to the network device driver?
how does the kernel config(ifconfig) the network device driver?
what functions got call when packets are handed to the network device driver?
sorry for asking too many question, I have never written any device driver.
regards,
Tho.
void tunattach(int);
int tunopen(dev_t, int, int, struct proc *);
int tunclose(dev_t, int, int, struct proc *);
int tun_ioctl(struct ifnet *, u_long, caddr_t);
int tun_output(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *rt);
int tunioctl(dev_t, u_long, caddr_t, int, struct proc *);
int tunread(dev_t, struct uio *, int);
int tunwrite(dev_t, struct uio *, int);
int tunselect(dev_t, int, struct proc *);
int tunkqfilter(dev_t, struct knote *);
Received on Tue Nov 19 22:57:40 2002
This archive was generated by hypermail 2.1.8
: Wed Aug 23 2006 - 13:48:26 EDT
|