#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
|
int | main (int argc, char *argv[]) |
|
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
46 sd = socket(AF_INET, SOCK_DGRAM, 0);
49 perror(
"Opening datagram socket error");
53 printf(
"Opening the datagram socket...OK.\n");
59 groupSock.sin_addr.s_addr = inet_addr(
"225.1.1.1");
82 perror(
"Setting local interface error");
87 printf(
"Setting the local interface...OK\n");
98 perror(
"Sending datagram message error");
101 printf(
"Sending datagram message...OK\n");
124 }
struct sockaddr_in groupSock
Definition: mcastserver.c:38
int i
Definition: rw_test.cpp:37
int sd
Definition: mcastserver.c:39
struct in_addr localInterface
Definition: mcastserver.c:37
char databuf[1024]
Definition: mcastserver.c:40
int datalen
Definition: mcastserver.c:41
struct in_addr localInterface |
struct sockaddr_in groupSock |