From: hackbard Date: Thu, 17 Oct 2002 15:57:16 +0000 (+0000) Subject: added SO_BROADCAST support X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=3cc99313fc75043c07720bf64e5ac76496057864;p=my-code%2Fivac.git added SO_BROADCAST support --- diff --git a/datagram.c b/datagram.c index 5f47a45..83c4bc8 100644 --- a/datagram.c +++ b/datagram.c @@ -41,6 +41,8 @@ int main(int argc, char *argv[]) { printf("can't open socket.\n"); exit(1); } + + // setsockopt(send_fd,SOL_SOCKET,SO_BROADCAST, memset(&local_addr,0,sizeof(local_addr)); local_addr.sin_family=AF_INET;