Date: Tue, 23 Mar 1999 17:39:24 -0500 (EST) From: Dan Seguin <dseg@texar.com> To: freebsd-hackers@freebsd.org Subject: syscalls Message-ID: <Pine.BSF.3.91.990323173006.1207A-100000@pak.texar.com>
next in thread | raw e-mail | index | archive | help
Hi all.
Is it possible to make syscalls from KLDs? I had assumed that the indirect
syscall(SYS_call, ...) would do the trick, but all I get is a panic (12,
page fault) when I try to load the KLD. Is there anything special I need
to do before calling syscall()? What I'm trying to do is create a
socket/connect channel for auditing purposes. So...
/* Code snippet */
{
#include <sys/socket.h>
#include <unistd.h>
int sockfd;
sockfd = syscall(SYS_socket, AF_UNIX, SOCK_STREAM, 0);
}
etc, etc. This appears in a function that is called upon KLD LOAD.
I've tried __syscall((quad_t) SYS_socket, AF_UNIX, SOCK_STREAM, 0), to no
avail.
Thanks for your help.
DSeg
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.990323173006.1207A-100000>
