From owner-freebsd-hackers Sat May 4 22:36:50 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id WAA29454 for hackers-outgoing; Sat, 4 May 1996 22:36:50 -0700 (PDT) Received: from doorstep.unety.net (root@usi-00-10.Naperville.unety.net [204.70.107.30]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id WAA29425 for ; Sat, 4 May 1996 22:36:47 -0700 (PDT) Received: from webster.unety.net (webster.unety.net [206.31.202.8]) by doorstep.unety.net (8.6.9/8.6.9) with SMTP id AAA08329; Sun, 5 May 1996 00:30:22 -0500 Received: by webster.unety.net with Microsoft Mail id <01BB3A1A.8DE55BC0@webster.unety.net>; Sun, 5 May 1996 00:34:00 -0500 Message-ID: <01BB3A1A.8DE55BC0@webster.unety.net> From: Jim Fleming To: "'Darren Reed'" , Jim Fleming Cc: "FreeBSD-hackers@freebsd.org" Subject: RE: IPv8 Tutorial #1: Minimal IPv8 hack Date: Sun, 5 May 1996 00:33:59 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sunday, May 05, 1996 10:25 AM, Darren Reed[SMTP:avalon@coombs.anu.edu.au] wrote: @ In some mail from Jim Fleming, sie said: @ > @ > @ > IPv8 Tutorial #1: Minimal IPv8 Hack @ > --------------------------------------------------- @ > @ > A few people have asked for a minimal hack for FreeBSD @ > to process IPv8 packets in case they arrive at your interface. @ [...] @ > < /* Detect and fix IPv8 packets */ @ > < if(ip->ip_v & 8){ @ > < if(ip->ip_v & 4){ @ [...] @ > < /* The IPv8 packet is now IPv4 compatible */ @ > < @ > @ > This hack can be placed near line #184. @ [...] @ @ Will someone please tell me what IPv8 is ? @ @ I do know that there is an IPv6... @ @ btw, I'd do the above as @ @ if (ip->ip_v == IPVERSION6) { @ if (ip->ip_v == IPVERSION) { @ ... @ There is an IPv8 header file referenced at... http://comm.unety.net/US/IL/Naperville/Unir There are macros to test the version and options bits... You have to use "&" and not "==" to make sure you are testing just one bit at a time. Only the high bit of the IPv4 version field (ip->ip_v) is used for version. -- Jim Fleming UNETY Systems, Inc. Naperville, IL e-mail: JimFleming@unety.net