[comp.protocols.tcp-ip] help needed on ethernet packet access on BSD4.3unix

anoop@guille.ece.orst.edu (Anoop R. Hegde) (07/08/89)

( 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. )

--------------------------------------------------------------------------
Anoop R. Hegde			   internet: anoop@guille.ece.orst.edu
Dept. of ECE,			      UUCP :  tektronix!orstcs!hegdea
Oregon State University			or :  hplabs!hp-pcd!orstcs!hegdea
--------------------------------------------------------------------------

terryl@tekcrl.LABS.TEK.COM (07/08/89)

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.