I'm trying to create a BSD socket with RTEMS 5 in order to implement an UDP communication. I have the following function:
#include <sys/socket.h>
void Network_Initialization(void)
{
int fd;
fd = socket(AF_INET, SOCK_DGRAM, 0);
if(fd < 0 )
{
locked_printf("Cannot create a socket: %s \n", strerror(errno));
}
}
During execution the following error is returned:
Address family not supported by protocol family (106)
This code corresponds with EAFNOSUPPORT. I found this error for another funtions like bind()
, but not for socket()
. I supposed that is something related wiht RTEMS configuration... but what?
Thanks in advance