Помоему так:int on = 1;
> bzero((char *) &serv_addr, sizeof(serv_addr));
> serv_addr.sin_family = AF_INET;
> //serv_addr.sin_addr.s_addr = inet_addr("192.168.1.255");
serv_addr.sin_addr.s_addr = INADDR_ANY;
> serv_addr.sin_port = htons(SERV_UDP_PORT);
> strncpy(mesg, "123456789", 8);
setsockopt( ss, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on) );
> while(1)
> {
> sendto(ss, mesg, 9, 0, (struct sockaddr *) &serv_addr,izeof(serv_addr));
> cout << "client: send mesage for server #\t" << mesg
><< endl;
> sleep(5);
> }
И на сервере слушать адрес INADDR_ANY (т.е. любой)