Date: Sun, 10 Apr 2016 21:35:25 +0300 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Wafa Hamzah <wafah@mellanox.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Cc: Meny Yossefi <menyy@mellanox.com>, Yuval Bason <yuvalba@mellanox.com> Subject: Re: Create socket to send and receive arp packets - Freebsd Message-ID: <570A9CED.5060806@yandex.ru> In-Reply-To: <HE1PR05MB167607CA9428AC5AEF0E8501DC930@HE1PR05MB1676.eurprd05.prod.outlook.com> References: <HE1PR05MB167607CA9428AC5AEF0E8501DC930@HE1PR05MB1676.eurprd05.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i5fAVlFTxXtjsvcKGSrq0UbksVLK6f7he Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10.04.16 11:00, Wafa Hamzah wrote: > We are trying to send arp requests from user space using a RAW > socket. Our Linux reference suggest the following flags when creating > the socket: s =3D socket (PF_PACKET, SOCK_PACKET, htons(ETH_P_ARP))). = > For FreeBSD support, we replaced PF_PACKET with PF_ARP , SOCK_PACKET > with SOCK_RAW and htons(ETH_P_ARP) with ETHERTYPE_ARP Which resulted > in a failure to create the socket (the return code was -1). Hi, AFAIR, you can't send ARP packets via RAW sockets in FreeBSD. You need to use bpf(4) or some libraries like libpcap. --=20 WBR, Andrey V. Elsukov --i5fAVlFTxXtjsvcKGSrq0UbksVLK6f7he Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXCpzuAAoJEAHF6gQQyKF6bOIIAIw7DtErIblsO4ePhINFxvIW F4LSvkFq7XlVc4iJjGtwqqle03P5zDWUZEhEMfQzH3LFmiKQa1b+i9XrFyJ5P+BW uUN2oUaY827e/P/avvaatNOvpNs0ZpdtbMxvgouq6Sl+WbNFdDr5aEPOayej107g P/+KFDWSLT/SHLrxixxF3NxToJdftSH9zx/U1DRfF8Gu4Dwpx8m28xkfMjNnrqcR IVqRx8wiKr1MTEawAvj7xfj6l5tkWBpxKzGbGjY8mRnyoEU6HZxHQDYHOxDkWtO3 FtxwTwpuVVFy2sviJcjGAMD1MKDtgtNWb0/YQWp3zyAyzreU315luO4xIlaA5Nk= =g7hE -----END PGP SIGNATURE----- --i5fAVlFTxXtjsvcKGSrq0UbksVLK6f7he--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?570A9CED.5060806>