From owner-freebsd-net@freebsd.org Mon Nov 16 09:24:03 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B023AA30DB9 for ; Mon, 16 Nov 2015 09:24:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77DDB1621 for ; Mon, 16 Nov 2015 09:24:03 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 759B21FE023 for ; Mon, 16 Nov 2015 10:24:00 +0100 (CET) To: "freebsd-net@freebsd.org" From: Hans Petter Selasky Subject: Question about multicast groups in FreeBSD Message-ID: <5649A117.7060504@selasky.org> Date: Mon, 16 Nov 2015 10:25:43 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Nov 2015 09:24:03 -0000 Hi, Does FreeBSD have any IGMP APIs similar to Linux's "include/linux/igmp.h" ? To join a multicast group, you would in Linux do: > + struct netdev *in_dev; > + if (join) > + ip_mc_inc_group(in_dev, > + *(__be32 *)(mgid->raw+12)); > + else > + ip_mc_dec_group(in_dev, > + *(__be32 *)(mgid->raw+12)); Is there any equivalent to this in FreeBSD? Thank you! --HPS