mdm@cocktrice.UUCP (Mike Mitchell) (10/27/88)
I have recently acquired a copy of the book "UNIX Programming on the 80286/80386" by Alan Deikman, and this book raises some questions for me. I have gone through the chapters on how to write a Unix device driver, and Alan Deikman gives some really neat examples. The specific example printed in his book is a device driver for a multi-port serial card with on board modems. He claims that this device driver was written and compiled for Microport System V/386. In looking at the code, however, there are some calls to routines which manipulate the line disci pline found in System V. I cannot find documentation on what these routines expect for arguments and what the expected results are. Specifically the routines in question are: (*linesw[l->t_line).l_open)(1) (*linesw[l->t_line).l_close)(1) (*linesw[l->t_line).l_read)(1) (*linesw[l->t_line).l_write)(1) (*linesw[l->t_line).l_input)(1, ??) ... and some others which look very similar to this Is there a good source of documentation on how one deals with the line discipline from the device driver level? I have looked at other information including Bach's book and nothing covers this aspect with any kind of depth. Thank you for any information. -- Mike Mitchell BELL: (505) 471-7639 2020 Calle Lorca #43 ARPA: mdm@cocktrice.UUCP Santa Fe, NM 87505 UUCP: ...!uunet!dmk3b1!cocktrice!mdm
bowles@lll-crg.llnl.gov (Jeff A. Bowles) (10/28/88)
In article <322@cocktrice.UUCP> mdm@cocktrice.UUCP (Mike Mitchell) writes: >I have recently acquired a copy of the book "UNIX Programming on the >80286/80386" by Alan Deikman, and this book raises some questions for >me. > >In looking at the code, however, there are some calls to routines which >manipulate the line discipline found in System V >on what these routines expect for arguments and what the expected results >are. I am quoting from "Unix(r) System V Release 3 Block and Character Interface (BCI) Driver Development Guide," (AT&T Select Code 307-191), page 7-4: "A line discipline contains functions for opening/closing/reading writing/ input/output control/data receive interrupts, data transmit interrupts/modem interrupts. Each of these activities is defined by individual members of the linesw (line switch) structure found in conf.h. The primary functions involved in writing a line discipline are: canon ttin ttout ttxput." This discussion continues for about 10-15 pages and has lots of pretty pictures and some useful info. This is the document AT&T offered for $4 before someone realized that there was a price error in their database and they changed the price to about $80(!). I ordered BEFORE the change, but they charged my AmEx account the higher price - I'll let 'em slug it out. Be warned, though. Jeff Bowles