From owner-freebsd-hackers Mon Oct 23 10:15:50 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id EF36737B479 for ; Mon, 23 Oct 2000 10:15:47 -0700 (PDT) Received: (qmail 30439 invoked by uid 0); 23 Oct 2000 17:15:44 -0000 Received: from unknown (HELO blade) (212.118.36.37) by mail.gmx.net with SMTP; 23 Oct 2000 17:15:44 -0000 From: "d_f0rce" To: Subject: Understanding what happens on open() within the kernel Date: Mon, 23 Oct 2000 19:18:15 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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