help needed on ethernet packet access on BSD4.3unix

terryl at tekcrl.LABS.TEK.COM terryl at tekcrl.LABS.TEK.COM
Sat Jul 8 06:53:56 AEST 1989


In article <11530 at orstcs.CS.ORST.EDU+ anoop at 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.



More information about the Comp.unix.wizards mailing list