I tried to create an RDM socket in this manner :
Code:
if ((sockfd = socket(AF_INET, SOCK_RDM, 0)) == -1) {
perror("socket");
exit(1);
}
But, i got the following error message :
Code:
socket: Socket type not supported
If I replace SOCK_RDM with SOCK_DGRAM, the program runs as expected.
These are the included header files :
Code:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
Do i have to include any other file to create an RDM socket?