/* * if_tap.h, written by Mouse, based largely on NetBSD's if_tun.h, * which is marked thus: * *** Copyright (c) 1988, Julian Onions *** Nottingham University 1987. *** *** This source may be freely distributed, however I would be interested *** in any changes that are made. *** *** This driver takes packets off the IP i/f and hands them up to a *** user process to have it's wicked way with. This driver has it's *** roots in a similar driver written by Phil Cockcroft (formerly) at *** UCL. This driver is based much more on read/write/select mode of *** operation though. *** *** from: Header: if_tnreg.h,v 1.1.2.1 1992/07/16 22:39:16 friedl Exp * * Any intellectual property rights I (Mouse) have in this work I * hereby release into the public domain. */ #ifndef _NET_IF_TAP_H_ #define _NET_IF_TAP_H_ /* Hard limit on packet size */ #define TAPMAXPKT 32768 /* * This interface is designed to be compatible with the FreeBSD/Linux tap. */ #define TAPMRU TAPMAXPKT struct tapinfo { int baudrate; short int mtu; unsigned char type; unsigned char dummy; /* does anything care about this? */ } ; #define TAPGDEBUG _IOR('t', 89, int) #define TAPSDEBUG _IOW('t', 90, int) #define TAPSIFINFO _IOW('t', 91, struct tapinfo) #define TAPGIFINFO _IOR('t', 92, struct tapinfo) #define VMIO_SIOCSIFFLAGS _IO('V', 0) #define VMIO_SIOCSKEEP _IO('V', 1) #define VMIO_SIOCSIFBR _IO('V', 2) #define VMIO_SIOCSLADRF _IO('V', 3) #define VMIO_SIOCSETMACADDR _IO('V', 4) #define VMIO_SIOCPORT _IO('V', 5) #define VMIO_SIOCBRIDGE _IO('V', 6) #define VMIO_SIOCNETIF _IO('V', 7) /* Control device read/write interface */ /* Data block consists of an unsigned int, which is a flags word. Bits set in the flags word indicate which other pieces are present. */ /* Flag bits, and structs describing the data. If multiple pieces are present, they occur in order of increasing TAPF_* value (ie, LSB's data first, MSB's data last). */ #define TAPF_MAC 0x00000001 struct tapf_mac { unsigned char mac[6]; } ; #define TAPF__ALL 0x00000001 #endif /* !_NET_IF_TAP_H_ */