From owner-freebsd-net Thu May 2 8:40:35 2002 Delivered-To: freebsd-net@freebsd.org Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by hub.freebsd.org (Postfix) with ESMTP id C8B6A37B425 for ; Thu, 2 May 2002 08:40:08 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020502154008.XOJI2627.rwcrmhc54.attbi.com@InterJet.elischer.org>; Thu, 2 May 2002 15:40:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id IAA77662; Thu, 2 May 2002 08:28:44 -0700 (PDT) Date: Thu, 2 May 2002 08:28:42 -0700 (PDT) From: Julian Elischer To: Matt Impett Cc: "'freebsd-net@FreeBSD.org'" Subject: Re: source MAC address In-Reply-To: <8C92E23A3E87FB479988285F9E22BE460236AE@ftmail> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org look at the following alternat ways to get data out of the kernel: 1/ ipfw + divert 2/ netgraph (can attach to sockets and interfaces and can provide sockets and interfaces.. mix-n-match) On Thu, 2 May 2002, Matt Impett wrote: > Hello all, > > I am implementing mobileIP in user space on freeBSD and was curious about > something. In order to do mobileIP IP address assignment, my process on > freeBSD has to be able to receive an IP packet and learn the source MAC > address that it came from (I am sure that the packet is only going one hop). > I have been able to do this using the BPF device, but am concerned about a > few things: > 1) When using the BPF device, the IP packet still goes to the IP stack, and > since I am no longer listening on the UDP port number, a ICMP port > unreachable is sent. I guess I could us ip_fw to fix this. > 2) When using the BPF device, I am bypassing the IP stack. Therefore, I am > losing things like reassembly, IPSEC, etc.. > > Is there another way to get this info up to an application without using > BPF? > > Likewise, I also want to be able to force IP packets out to a particular MAC > address, regardless of the IP destination address of the packet. Once > again, I know BPF can do this, but then I have similar concerns to the ones > above. For example, what do I set the IP ID field to?? If I accidentally > match an ID field that the kernel has used previously, then reassembly could > get confused on the end host. > > thanks a lot, > matt > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message