[3508] in linux-net channel archive
Using sockets with packets
daemon@ATHENA.MIT.EDU (Sean Christopher Farley)
Wed Jun 26 14:00:31 1996
Date: Wed, 26 Jun 1996 12:03:29 -0500 (EST)
From: Sean Christopher Farley <farleysc@cs.purdue.edu>
To: linux-net@vger.rutgers.edu
I am interested in writing an IPX tunnel program (eventually maybe
fulfilling RFC1234). I have reviewed the ipxtunnel program by Andreas
Godzina but am still unsure of the best method for tunneling on a Linux
system.
This is what I am thinking:
struct sockaddr_pkt clientAddr;
/* Set local address */
clientAddr.spkt_family = AF_IPX;
clientAddr.spkt_protocol = PF_IPX;
strcpy(clientAddr.spkt_device, "eth0");
/* Allocate socket -- this line is from the ipxtunnel program
* mentioned above */
fd = socket(AF_INET, SOCK_PACKET, htons(ETH_P_IPX));
^--- Shouldn't this be
IPXPROTO or something
similar to IPPROTO_
bind(fd, (struct sockaddr *) &clientAddr, sizeof(struct sockaddr_pkt));
namelen = sizeof(struct sockaddr);
recvfrom(fd, buf, IPX_MTU, 0, (struct sockaddr *)&clientAddr,
&namelen);
Am I even close? "I don't think so Tim." keeps going through my head. :)
TIA,
Sean
P.S. I originally sent this to the linux-newbie list by accident; I
shouldn't try to send e-mail before I go to sleep.
------
Sean C. Farley
scf@cs.purdue.edu
PGP 2.6.2 key using finger or WWW
WWW Homepage is: http://www.cs.purdue.edu/people/farleysc