Date: Wed, 25 Oct 1995 17:11:34 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: julian@ref.tfs.com (Julian Elischer) Cc: msmith@atrad.adelaide.edu.au, hackers@freebsd.org Subject: Re: AF_UNSPEC/SOCK_RAW and such... Message-ID: <199510250741.RAA07498@genesis.atrad.adelaide.edu.au> In-Reply-To: <199510250549.WAA17927@ref.tfs.com> from "Julian Elischer" at Oct 24, 95 10:49:29 pm
next in thread | previous in thread | raw e-mail | index | archive | help
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! [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510250741.RAA07498>