Re: Testing of Multicast support on fxp and bge driver.



try sysctl net.inet.icmp.bmcastecho=1

Baldur

On Wed, Jul 19, 2006 at 02:39:36PM +0100, freebsd nettest wrote:
Hi all,

I was trying to test the Multicast support of bge and fxp driver using the following user level program.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
//#include <net/if.h>
#include <netinet/in.h>
//#include <sys/types.h>
#include <sys/socket.h>
int
main(int argc, char *argv[])
{
struct ip_mreq mreqn;
int s;
struct in_addr ip;
if (argc != 3) {
fprintf(stderr, "usage: %s <dev> <group>\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!
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"


_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Testing of Multicast support on fxp and bge driver.
    ... I was trying to test the Multicast support of bge and fxp driver using the following user level program. ... struct ip_mreq mreqn; ...
    (freebsd-net)
  • multicast join group error : No such device
    ... One of my multicast program dies on a specific set of machines with error No ... int main ...
    (comp.os.linux.networking)
  • write() and send() or sendto() ?
    ... int WRITE ... else if (cnt) { ... this is a piece of code of MTP-2, a reliable multicast framework. ... Translating it to sendto() seems hard, ...
    (comp.unix.programmer)
  • FreeBSD Multicast
    ... which are based on Mobile node multicast address so that Access Point can ... buffer multicast packet to be pass to mobile node if the mobile node roam ... Try the all-new Yahoo! ...
    (freebsd-questions)