00001 00034 #ifndef _TPL_COMMON_H 00035 #define _TPL_COMMON_H 00036 00041 enum eTplDrv_IOCtl { 00047 DRV_IOCTL_TYPE, 00048 00057 DRV_IOCTL_IDENT, 00058 00067 DRV_IOCTL_VERSION, 00068 00078 DRV_IOCTL_LOOKUP 00079 }; 00080 00085 #define DRV_IOCTLNAMES "type", "ident", "version", "lookup" 00086 00106 #define BASE_IOCTLS(_type, _ident, _version, _ioctls) \ 00107 case DRV_IOCTL_TYPE: LEAVE('i', (_type)); return (_type);\ 00108 case DRV_IOCTL_IDENT: {\ 00109 int tmp = ModUtil_SetIdent(Data, (_ident));\ 00110 LEAVE('i', tmp); return tmp;\ 00111 }\ 00112 case DRV_IOCTL_VERSION: LEAVE('x', (_version)); return (_version);\ 00113 case DRV_IOCTL_LOOKUP:{\ 00114 int tmp = ModUtil_LookupString( (char**)(_ioctls), (char*)Data );\ 00115 LEAVE('i', tmp);\ 00116 return tmp;\ 00117 } 00118 00123 enum eTplDrv_Type { 00124 DRV_TYPE_NULL, 00125 DRV_TYPE_MISC, 00126 DRV_TYPE_TERMINAL, 00127 DRV_TYPE_VIDEO, 00128 DRV_TYPE_SOUND, 00129 DRV_TYPE_DISK, 00130 DRV_TYPE_KEYBOARD, 00131 DRV_TYPE_MOUSE, 00132 DRV_TYPE_JOYSTICK, 00133 DRV_TYPE_NETWORK 00134 }; 00135 00136 #endif