lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Problems getting a basic example running


From: Fre Net
Subject: [lwip-users] Problems getting a basic example running
Date: Tue, 24 Jul 2012 18:35:14 -0700

Hi,
I just started looking at the lwip stack and was trying to build a simple console app that would create a udp socket and fire off some data.

I am using Ubuntu 10.04 on a desktop PC and want to use the sockets api (lwip 1.4.0 & contrib files 1.4.0). I felt that this would be the simplest way to start off. Eventually I would like to move over to our ARM board running Ubuntu.

I am getting errors when initially trying to create the udp socket. This is the code:

int sockfd;
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
 perror("socket?");
 exit(1);
}


This is the error message: 

lwip_socket(PF_INET, SOCK_DGRAM, 0) = -1 / ENOBUFS (could not create netconn)


I have also tried incorporating the socket_examples functions in the contrib package in a simple app and get the same error. I've enabled udp and tcip in my options file. Is there another option that I have overlooked? Does anyone have an example of a basic app that creates a udp socket and sends some data? If there is any other info that I can provide, let me know. 

Thanks,
Fred


reply via email to

[Prev in Thread] Current Thread [Next in Thread]