Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2000 19:18:15 +0200
From:      "d_f0rce" <d_f0rce@gmx.de>
To:        <freebsd-hackers@freebsd.org>
Subject:   Understanding what happens on open() within the kernel
Message-ID:  <BHENIGBMBOEPNAIDKJCEOEPDCAAA.d_f0rce@gmx.de>

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

i'm currently working on understanding the FreeBSD kernel.
Therefore I read the book "The design and implementation
of the 4.4BSD OS". As I know that most of the things described
in this book are probably no longer up to date, I think
that the basics should be the same.
As I would like to experiment a bit with the serial port
I have a question conerning the open() call.

Perhabs you could tell me if I understood the open-procedure
correctly:
On opening i.e. /dev/cuaa0 the kernel sees that this is a tty
device. It then calls ttyopen(). Ttyopen() knows which driver
is responsible by analyzing the minor device number. It calls
the real open() function from the driver responsible for that
device and then fills in the tty structure.
Now you can change settings by using ioctl() or the termios
functions.

What would I have to do to get the filled in tty_structure
directly, without using ioctl to get the settings of a tty?
Or is there perhabs an ioctl() call to get the tty_structure?

Greetings,
Alex

PS: Please answer directly to me as I'm not on the list.




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?BHENIGBMBOEPNAIDKJCEOEPDCAAA.d_f0rce>