From owner-freebsd-hackers Wed Oct 25 00:53:43 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id AAA02821 for hackers-outgoing; Wed, 25 Oct 1995 00:53:43 -0700 Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id AAA02671 for ; Wed, 25 Oct 1995 00:46:01 -0700 Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.9/8.6.9) id RAA07498; Wed, 25 Oct 1995 17:11:35 +0930 From: Michael Smith Message-Id: <199510250741.RAA07498@genesis.atrad.adelaide.edu.au> Subject: Re: AF_UNSPEC/SOCK_RAW and such... To: julian@ref.tfs.com (Julian Elischer) Date: Wed, 25 Oct 1995 17:11:34 +0930 (CST) Cc: msmith@atrad.adelaide.edu.au, hackers@freebsd.org In-Reply-To: <199510250549.WAA17927@ref.tfs.com> from "Julian Elischer" at Oct 24, 95 10:49:29 pm Content-Type: text Content-Length: 1967 Sender: owner-hackers@freebsd.org Precedence: bulk Julian Elischer stands accused of saying: > > What I'm wondering is whether AF_UNSPEC/SOCK_RAW will just hand my > > driver the packet as written, or whether it'll break something else. > > > > Obviously, suck it and see applies here, but some casual advice from those > > that have gone before would be muchly appreciated 8) > WARNING WARNING WARNING > it's been a few years.. > > what protocol are you wanting to run? PKT-1. It's an inhouse protocol we run over '485. It's light and stupid and designed with microcontrollers in mind. > will your driver only be handling your packets? No; I was hoping to support IP as well, just for genericity's sake. AFAICT, this is only an issue when it comes to handing a datagram upwards. > do you have your own protocol stack? Yes. The protocol is very simple, so it's implemented as a C library at the moment. (We currently talk to these devices under DOS, which is a total loser outside the workshop). > you can do this but it really depends on you writing it int eh right way > for it to work (duh!) Obviously 8) > coming up: > You have to make sure your driver calls the correct protocol with the correct > arguments Indeed. Which protocol to call for AF_UNSPEC? How does NETISR_RAW and schednetisr() come in to this? > going down: > You have to make sure your protocol knows how to decide which interface > to send it to.. Is this not what ifa_ifwithaf() (net/if.c) does? I can't find anything that calls it of course 8( I guess I could go AF_INET and invent SOCK_RAWRAW, but that sounds like just as much work 8( -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] My car has "demand start" -Terry Lambert UNIX: live FreeBSD or die! [[