[3511] in linux-net channel archive
Re: Using sockets with packets
daemon@ATHENA.MIT.EDU (Alan Cox)
Wed Jun 26 17:40:08 1996
From: Alan Cox <alan@cymru.net>
To: farleysc@cs.purdue.edu (Sean Christopher Farley)
Date: Wed, 26 Jun 1996 19:10:18 +0100 (BST)
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <Pine.SOL.3.91.960626114802.14616B-100000@lore.cs.purdue.edu> from "Sean Christopher Farley" at Jun 26, 96 12:03:29 pm
> /* 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_
No. You are asking for a raw protocol level socket, not an IPX protocol type
> 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. :)
Looks close to me. You will need to fiddle with the IPX routing daemon
to advertise you as the router for your tunnel.
Alan