Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!arktouros!dyer From: dyer@arktouros.MIT.EDU (Steve Dyer) Newsgroups: comp.unix.xenix Subject: Re: Need help with serial line device driver Keywords: How to get data to another Driver ? Message-ID: <7601@bloom-beacon.MIT.EDU> Date: 21 Oct 88 23:24:54 GMT References: <385@ftp.COM> <7581@bloom-beacon.MIT.EDU> <4886@b-tech.ann-arbor.mi.us> <477@tank.uchicago.edu> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: dyer@arktouros.MIT.EDU (Steve Dyer) Organization: MIT Project Athena, Cambridge MA 02139 Lines: 31 In article <477@tank.uchicago.edu> matt@oddjob.uchicago.edu (Matt Crawford) writes: >I think the answers I've seen are on the wrong track. I believe Bill >just needs to know how to have his driver put the received packet on the >input queue for the IP module. >...in 4.[23] ... look for macros or functions with names like IF_ENQUEUE >or schednetisr. Since Bill is using FTP's own IP support in the XENIX kernel, I'd assume he'd know how his IP input routine works. The problem stems from viewing serial ports as entities whose data necessarily originates and ends with a user process reading and writing /dev/ttyMN, which is a reasonable assumption for anyone who hasn't addressed this problem before. Line disciplines allow a kernel programmer to "splice" into the TTY read/write/start/input routines and change the normal serial line behavior, including, in the case of SLIP, wresting control from user-level reads/writes and giving the control to the IP input and output modules in the kernel. You can be sure that if they had been using the new AT&T-free Berkeley code, they'd already have the SLIP code which uses line disciplines under 4.x. End of problem, almost, except for differences between 4.x and Sys V tty drivers, which at the line discipline level aren't many, and a lot of 4.3-mbuf- specificity which wouldn't apply to code which doesn't use mbufs. OK, that's a lot for an "almost", granted, but by examining net/if_sl.c you should get a feel for what routines need to comprise the line discipline switch table entry for SLIP under any flavor of UNIX and with any implementation of IP. --- Steve Dyer dyer@arktouros.MIT.EDU dyer@spdcc.COM aka {harvard,husc6,ima,bbn,m2c,mipseast}!spdcc!dyer