Hi
Is anyone aware of any issues regarding the use of the lwip api within Starterware?
I have added in some example code (from Design and Implementation of the lwip TCP/IP stack) into a working example project (enetlwip using CCS v5).
I get build errors - first with LWIP_NETCONN not appearing to be set correctly - corrected this, now a whole lot of code appears to throw up errors. Must an api library be built first?
Regards
Chris
Code as follows:
conn = netconn_new(NETCONN_UDP);
// setup the IP address of remote host ipAddress.
addr = htonl(0xC0A80101);
// connect to the remote host on port number 7000
netconn_connect(conn, &ipAddress, 7000);
// create new netbuf
buf = netbuf_new();
data = netbuf_alloc(buf, 10);
// create some data
for(i = 0; i < 10; i++)
data[i] = i;
// send the data
netconn_send(conn, buf);
// reference the text into the netbuf
netbuf_ref(buf, text, sizeof(text));
// send the text
netconn_send(conn, buf);
// clean up
netconn_delete(conn);
netbuf_delete(buf);