From owner-freebsd-net@FreeBSD.ORG Wed Jul 19 13:39:39 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 7474F16A4DA for ; Wed, 19 Jul 2006 13:39:39 +0000 (UTC) (envelope-from freebsd_nettest@yahoo.co.in) Received: from web7814.mail.in.yahoo.com (web7814.mail.in.yahoo.com [202.86.4.71]) by mx1.FreeBSD.org (Postfix) with SMTP id 5E60343D46 for ; Wed, 19 Jul 2006 13:39:38 +0000 (GMT) (envelope-from freebsd_nettest@yahoo.co.in) Received: (qmail 23168 invoked by uid 60001); 19 Jul 2006 13:39:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.in; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YnJLnFx28m6SjOXtAppgg6LN7/It3zGwNqQSo/hHk2IwG5rGAOXkvemglJTrHPJ6tIl++dcDUa9NMmHUSotzuyUPlYgmKoyxba3I8IIP7TgdzqZFnvEnqkIvBMaAk7exV8yJZ3qpdZVrrpIo52BitOKF0I3vEKUdSuCfq2cmSHM= ; Message-ID: <20060719133936.23166.qmail@web7814.mail.in.yahoo.com> Received: from [66.93.138.34] by web7814.mail.in.yahoo.com via HTTP; Wed, 19 Jul 2006 14:39:36 BST Date: Wed, 19 Jul 2006 14:39:36 +0100 (BST) From: freebsd nettest To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Testing of Multicast support on fxp and bge driver. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2006 13:39:39 -0000 Hi all, I was trying to test the Multicast support of bge and fxp driver using the following user level program. #include #include #include #include #include //#include #include //#include #include int main(int argc, char *argv[]) { struct ip_mreq mreqn; int s; struct in_addr ip; if (argc != 3) { fprintf(stderr, "usage: %s \n", argv[0]); exit(1); } if((s = socket(PF_INET, SOCK_DGRAM, 0)) < 0) { perror("socket"); exit(1); } memset(&mreqn, 0, sizeof(mreqn)); inet_aton(argv[1], &(mreqn.imr_interface)); /* mreqn.imr_interface = ip; */ if (inet_pton(AF_INET, argv[2], &mreqn.imr_multiaddr) <= 0) { fprintf(stderr, "%s: \"%s\" invalid group address\n", argv[0],argv[2]); exit(1); } if (setsockopt(s, 0, IP_ADD_MEMBERSHIP,&mreqn,sizeof mreqn) < 0) { perror("IP_ADD_MEMBERSHIP"); exit(1); } printf("joined group %s on %s (pausing...)\n", argv[2], argv[1]); fflush(stdout); pause(); } On test machine: [root@FBSD6-AMD]# ./a.out bge0 224.1.1.37 joined group 224.1.1.37 on bge0 (pausing...) On remote machine: -bash-3.00# ping -i xge2 224.1.1.37 no answer from 224.1.1.37 The ping is failing. I tried the same test on fxp (intel interface) also. The ping to the multicast IP is not working. am I doing the correct steps? Do I need to check any firewall setting that prevent the multicast packets?? Please advice, if I miss something in the testing. Thanks, --------------------------------- Find out what India is talking about on Yahoo! Answers India. Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!