From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 12 10:31:17 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1432D1065679; Sat, 12 Feb 2011 10:31:17 +0000 (UTC) (envelope-from freebsd-hackers@herveybayaustralia.com.au) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) by mx1.freebsd.org (Postfix) with ESMTP id B151F8FC17; Sat, 12 Feb 2011 10:31:16 +0000 (UTC) Received: from laptop1.herveybayaustralia.com.au (laptop1.herveybayaustralia.com.au [192.168.0.186]) by mail.unitedinsong.com.au (Postfix) with ESMTP id 698D55C44; Sat, 12 Feb 2011 20:38:22 +1000 (EST) Message-ID: <4D5660D9.2040002@herveybayaustralia.com.au> Date: Sat, 12 Feb 2011 20:28:41 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16) Gecko/20110204 Thunderbird/3.0.11 ThunderBrowse/3.3.4 MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4D54E39D.1000505@herveybayaustralia.com.au> <4D54F0B0.7010503@freebsd.org> <4D550300.5090000@herveybayaustralia.com.au> <4D5565C7.1010809@freebsd.org> <4D55CE5A.8040902@herveybayaustralia.com.au> <4D55E015.3010709@freebsd.org> <20110212103923.3098f6b3@ernst.jennejohn.org> In-Reply-To: <20110212103923.3098f6b3@ernst.jennejohn.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, dudu@dudu.ro Subject: Re: [maybe spam] Re: linux PF_PACKET compatibility X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2011 10:31:17 -0000 On 02/12/11 19:39, Gary Jennejohn wrote: > On Fri, 11 Feb 2011 17:19:17 -0800 > Julian Elischer wrote: > > >> On 2/11/11 4:03 PM, Da Rock wrote: >> >>> Unfortunately this software uses this family instead of pcap or bpf. >>> So when built it errors. >>> >>> I guess if I am to use this app I will have to rewrite the way it >>> uses the network stack. >>> >> l2tp runs over UDP packets (port 1701 (like the starship enterprise)) >> I have no idea why they want raw packets. >> >> > Ther's a sendarp() routine which uses PF_PACKET to directly access the > network driver and bypass the stack. Lazy Linuxers who have no idea > or don't care that other operating systems exist. > > Indeed. Is it possible to leverage another compatible routine? I haven't had a look yet as I just read the message, but can I (after checking return values and arguments) just drop in another arp routine? Or are they simply incompatible across the board? From what I understand they should all be essentially doing the same thing, but I could be wrong on this. Alternatively would I have to basically rewrite the arp.c to be posix compatible (for portability)? Cheers