Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Apr 2004 10:15:29 +0200
From:      "Sebastien Petit" <spe@selectbourse.net>
To:        <"JINMEI Tatuya/ $B?@L"@C#:"H".FreeBSD.ORG (B <jinmei@isl.rdc.toshiba.co.jp>)>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: SOCK_RAW sockets and IPPROTO_AH
Message-ID:  <003001c41baf$5316dad0$6400a8c0@a91821794s3ti7g>
References:  <003b01c41b0f$b1e4fc90$bc0a270a@bum.sub.fr.hsbc> <y7v8yh9al0x.wl@ocean.jinmei.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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: <JINMEI Tatuya / $B?@L@C#:H (B <jinmei@isl.rdc.toshiba.co.jp>)>
To: "Sebastien Petit" <spetit@selectbourse.com>
Cc: <freebsd-net@freebsd.org>
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" <spetit@selectbourse.com> 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"
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003001c41baf$5316dad0$6400a8c0>