From owner-freebsd-net@FreeBSD.ORG Tue Apr 6 01:15:45 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9689616A4CF for ; Tue, 6 Apr 2004 01:15:45 -0700 (PDT) Received: from smtp.noos.fr (nan-smtp-17.noos.net [212.198.2.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B51FB43D5E for ; Tue, 6 Apr 2004 01:15:44 -0700 (PDT) (envelope-from spe@selectbourse.net) Received: (qmail 7733 invoked by uid 0); 6 Apr 2004 08:15:21 -0000 Received: from unknown (HELO a91821794s3ti7g) ([81.64.25.123]) (envelope-sender ) by 212.198.2.117 (qmail-ldap-1.03) with SMTP ; 6 Apr 2004 08:15:21 -0000 Message-ID: <003001c41baf$5316dad0$6400a8c0@a91821794s3ti7g> From: "Sebastien Petit" To: <"JINMEI Tatuya/ $B?@L"@C#:"H".FreeBSD.ORG (B )> References: <003b01c41b0f$b1e4fc90$bc0a270a@bum.sub.fr.hsbc> Date: Tue, 6 Apr 2004 10:15:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-net@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: SOCK_RAW sockets and IPPROTO_AH X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2004 08:15:45 -0000 Unfortunatly, I can't use bpf/pcap solution because I must do some setsockopts (like IP_MULTICAST_IF, IP_MULTICAST_TTL, IP_MULTICAST_ADD_MEMBER etc.) and this can't be done on bpf/pcap. When I'm using IPPROTO_VRRP (ip proto 112), All work fine (and other ip proto type I think). What is the reason that SOCK_RAW don't work with IPPROTO_AH (ip proto 51). For me, it's an IP packet in two cases. Is there a good way for making a patch with SOCK_RAW, IPPROTO_AH ? I've found another strange thing in SOCK_RAW with IPPROTO_VRRP (112) and IP_HDRINCL setted on it. All received packet contains an IP Header with a bad ip_len. If the packet is 60 bytes long, the ip->ip_len contains 40 bytes. When the packet is 100 bytes long, the ip->ip_len contains 80 bytes. So there is a difference of 20 bytes. I think that the ip header size is substract from ip_len by error on the kernel. What are you think about it ? Regards, Sebastien. -- spetit@selectbourse.com spe@selectbourse.net FreeVRRPd project http://www.b0l.org/ ----- Original Message ----- From: )> To: "Sebastien Petit" Cc: Sent: Tuesday, April 06, 2004 4:38 AM Subject: Re: SOCK_RAW sockets and IPPROTO_AH > >>>>> On Mon, 5 Apr 2004 15:12:49 +0200, > >>>>> "Sebastien Petit" said: > > > Hi, > > Is there a way to receive AH packets in userland with a SOCK_RAW socket ? > > ie: socket(AF_INET, SOCK_RAW, IPPROTO_AH) ? > > I found that this socket call doesn't work under FreeBSD. On OpenBSD, it works but a recvfrom/read doesn't return any AH packets when it was received on an interface. > > > Is there another proper way to receive AH packets in Userland under FreeBSD ? (bpf/pcap is not a solution because I want to have a socket opened for multicast join) > > Unfortunately, bpf/pcap is the only solution. > > JINMEI, Tatuya > Communication Platform Lab. > Corporate R&D Center, Toshiba Corp. > jinmei@isl.rdc.toshiba.co.jp > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > >