Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jan 2005 13:26:50 +0100 (MET)
From:      =?ISO-8859-1?Q?=22Anton_W=F6llert=22?= <MethoD.EaglE@gmx.net>
To:        freebsd-hackers@freebsd.org
Subject:   operation sequence of ioctl's 
Message-ID:  <11679.1106483210@www25.gmx.net>

next in thread | raw e-mail | index | archive | help
Hello,

my question is how a ioctl is called when i use int ioctl(fd ....) from
userland. i think first, a trap is generated through the handler in
exeption.S, that calls the routine for system-calls, and that calls via the
syscall-vector-table the function sys_ioctl (? i think). by the way, where
is this vector-table initialized? sys_ioctl handles then the copying of args
etc. and calls then some kind of fd->some_what->ioctl(foo, bar, bla). so i
think the function which is called, depends of the filedescriptor that is
passed via ioctl. so am i right with the assumption that for example the
kbd-driver adds via what? the /dev/kdb file-descriptor and if i want to
control something from the keyboard, i have to do ioctl(open("/dev/kbd"),
TURN_LED_ON, 0) (just as an meta-code example). but what is with the stdin,
stdout and stderr file-descriptors. what type do they have and where are
they initialized? so and last question, where is the function|macro
VOP_IOCTL defined?

thanks in advance

-- 
Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?11679.1106483210>