Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

a little help here please, if_tun.c

From: Tho Nguyen <tdn23(at)drexel.edu>
Date: Tue Nov 19 2002 - 22:58:29 EST


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


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library