Xref: utzoo comp.protocols.tcp-ip:7630 comp.unix.wizards:17177 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!csd4.milw.wisc.edu!leah!albanycs!crdgw1!uunet!zephyr!tektronix!tekcrl!terryl From: terryl@tekcrl.LABS.TEK.COM Newsgroups: comp.protocols.tcp-ip,comp.unix.wizards Subject: Re: help needed on ethernet packet access on BSD4.3unix Message-ID: <4268@tekcrl.LABS.TEK.COM> Date: 7 Jul 89 20:53:56 GMT References: <11530@orstcs.CS.ORST.EDU+ Reply-To: terryl@tekcrl.LABS.TEK.COM Followup-To: comp.protocols.tcp-ip Distribution: usa Organization: Tektronix, Inc., Beaverton, OR. Lines: 34 In article <11530@orstcs.CS.ORST.EDU+ anoop@guille.ece.orst.edu (Anoop R. Hegde) writes: + +( My apologies if this posting is not very relevant to this newsgroup, + but i am sure, some of you have worked on a new protocol implementation) + + + We have a MicroVax II running BSD4.3 UNIX. I am trying to + develope a new protocol parallel to IP, to be used in the + local ethernet environment. ( to be specific, i would like + to write programs that can receive an ethernet packet carrying + an experimental 'type' field, so that I can set up communication + between this machine and any other machine connected to the same + ethernet) Obviously, this can't be done using sockets, (even raw) + as, they don't allow access below IP level. I would be very much + thankful if someone can provide me with some more info. on this + matter, or atleast a pointer to pursue. + ( we have the kernel source code, and it would be of much + help if i know where is packet demultiplexing done and which files + to look into, etc. ) Having done this exact thing quite a few years back for 4.2, the place you need to look at is the device driver level. Specifically, you need to look at two separate places: the output routine for the driver for packets going out on the ethernet, and the input interrupt routine for packets coming in from the ethernet. In the output routine, you key on the sa_family member of a struct sockaddr; suffice it to say you'll have to examine the code closely to see what I mean. In the input interrupt routine, you key on the actual ethernet type field in the packet itself. Again, examine the code. For VAX stuff, look in vaxif/if_il.c (for an Interlan driver) at the routines iloutput and ilrint for the output and input interrupt routines, respectively.