HELP!! broadcasting using BSD datagram socket (WIN/TCP for VMS)

TAYBENGH%NUSDISCS.BITNET at cunyvm.cuny.edu TAYBENGH%NUSDISCS.BITNET at cunyvm.cuny.edu
Mon Mar 19 17:52:16 AEST 1990


        Recently I have a problem using BSD socket libary WIN/TCP for VMS
Release 3.2 when I tried to do broadcasting on ethernet. Below is the portion
of the code:

        setsockopt(id, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
        remote_sock.sin_addr = htonl(INADDR_BROADCAST);
        remote_sock.sin_family = AF_INET;
        remote_sock.sin_port = htons(port);
        size = sendto(id, buf, buflen, option,
                      (struct sockaddr *)&remote_sock, sizeof(remote_sock));
        if (size < 0)
           errmsg("bs_broadcast()", "sendto()");

        Anybody out there knows the solution, please help...
        Thanks.

-Beng Hang (taybengh at nusdiscs.bitnet)



More information about the Comp.unix.wizards mailing list