muts@fysaj.fys.ruu.nl (Peter Mutsaers/100000) (06/12/90)
I am trying to use broadcasts on a socket to transport large amounts of data to many computers on our ethernet the same time, but, it seems that there are only some computers that I can broadcast from. The other ones don't give errors, but the broadcasted data just never arrives. The problem is on the sender side. I use computers with the same OS (AIX 1.1), and some others (apollo etc.), it happens with all of them. Could I have forgotten something in the initialization I use? (see below), or can it have something to do with the configuration of the computers I use? sb= -1; if (sb<0) { sb=socket(AF_INET,SOCK_DGRAM,PF_UNSPEC); if (sb<0) { perror("opening datagram socket"); exit(1); } } if (setsockopt(sb,SOL_SOCKET,SO_BROADCAST,&on,sizeof(on))<0) { perror ("setsockopt"); exit (1); } bzero((char *)&name,sizeof(name)); name.sin_family=AF_INET; name.sin_addr.s_addr=htonl(0xd383ffffL); /* were on subnet 131.211.xx.xx */ name.sin_port=MYPORT; I thought this initialization should be enough to do a broadcast using: sendto(sb,buf,sizeof(buf),0,&name,sizeof(name)) I would be helped much with remarks on this. -- Peter Mutsaers email: muts@fysaj.fys.ruu.nl Rijksuniversiteit Utrecht nmutsaer@ruunsa.fys.ruu.nl Princetonplein 5 tel: (+31)-(0)30-534504 3584 CG Utrecht, Netherlands