diff -urN linux-2.4.16-wt2-4h/net/socket.c linux-2.4.16-wt2-4i/net/socket.c --- linux-2.4.16-wt2-4h/net/socket.c Sat Dec 1 21:22:34 2001 +++ linux-2.4.16-wt2-4i/net/socket.c Sat Dec 1 21:22:23 2001 @@ -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 +