Hi,
I am tring to hook socket system call and want to add some extra functionality
But i am not able to link sys_bind() function in socketcall. It says unresolved
symbol.
The code is as given below.
unsigned long a[6];
unsigned long a0,a1;
int err, check_family = 0;
struct sockaddr_un *sunaddr = NULL;
if(call<1||call>SYS_RECVMSG)
return -EINVAL;
if (copy_from_user(a, args, nargs[call]))
return -EFAULT;
a0=a[0];
a1=a[1];
sunaddr = (struct sockaddr_un *)a1;
if(sunaddr->sun_family == AF_UNIX)
check_family = 1;
err = sys_bind(a0,(struct sockaddr __user *)a1, a[2]);
}
What might be the cause of not linking this call ?
In order to get it work, i copied the sys_bind() call from the socket.c file to
the .c file that i am using. Now the system is working fine. Is this approach
is correct one ? or will it create some problems in future.
One more thing is sys_bind() is not defined as static.
Thanks,
Deepak Joshi
---------------------------------
All New Yahoo! Mail Tired of unwanted email come-ons? Let our SpamGuard
protect you.
--
______________________________________________________________________
Pune GNU/Linux Users Group Mailing List: ([email protected])
List Information: http://plug.org.in/cgi-bin/mailman/listinfo/plug-mail
Send 'help' to [EMAIL PROTECTED] for mailing instructions.