--- ./net/socket.c~ Sun Mar 31 01:24:57 2002 +++ ./net/socket.c Sun Mar 31 01:25:06 2002 @@ -1791,3 +1791,41 @@ return ret; } +int tux_Dprintk; +int tux_TDprintk; + +#ifdef CONFIG_TUX_MODULE + +int (*sys_tux_ptr) (unsigned int action, user_req_t *u_info) = NULL; + +struct module *tux_module = NULL; +spinlock_t tux_module_lock = SPIN_LOCK_UNLOCKED; + +asmlinkage int sys_tux (unsigned int action, user_req_t *u_info) +{ + int ret; + + if (current->tux_info) + return sys_tux_ptr(action, u_info); + + ret = -ENOSYS; + spin_lock(&tux_module_lock); + if (!tux_module) + goto out_unlock; + __MOD_INC_USE_COUNT(tux_module); + spin_unlock(&tux_module_lock); + + if (!sys_tux_ptr) + TUX_BUG(); + ret = sys_tux_ptr(action, u_info); + + spin_lock(&tux_module_lock); + __MOD_DEC_USE_COUNT(tux_module); +out_unlock: + spin_unlock(&tux_module_lock); + + return ret; +} + +#endif +