[comp.os.xinu] Ethernet communication with Xinu7

casey-ge@cscosl.ncsu.edu (Granville Errol Casey) (02/26/90)

I'm attempting to communicate via ethernet by the low level read/write commands
under XINU7.  I have successfully communicated to other machines by
using the broadcast address (EBCAST) which is defined in ether.h.  But
the machines cannot communicate when I use direct address.  Below is
sample code to illustrate how I'm attempting to initialize the
destination address in a packet.  Any help will be appreciated.

#define LSI4	"\012\000\065\005\036\042"

blkcopy(packet->ep_hdr.e_dest, LSI4, EPADLEN);

packet is defined as struct epacket and is given a buffer from a defined
memory buffer pool.

Errol Casey
Computer Science Department
North Carolina State University
gec@cscosl.ncsu.edu

dls@mentor.cc.purdue.edu (David L Stevens) (02/26/90)

	That should work. There are other things to consider, however.
For instance, if you're sending an IP datagram and you don't set the IP
address correctly, the receiving machine will drop it. You also need to
set the frame type.
	The easiest way for you to find out what's happening is probably
to put some kprintf's in ethwrite() that print out a formatted (human
readable) version of the packet that's actually being written. If the
target machine is also running Xinu, you can do the same thing on the
read side to see what (if anything) arrived, but might have been dropped
at higher layers.
	And of course, recheck the target Ethernet address. :-)
-- 
					+-DLS  (dls@mentor.cc.purdue.edu)