Altera_Forum
Honored Contributor
20 years agoFirst time using lwIP
Hello, I´ve started using lwIP this week. I tried the Webserver example and it worked fine (I can access the webpage from my browser =).
Well... I read the code many times and couldn´t understand how it works. I didn´t find any good documentation about it either. I just want to create a simple app server to send and receive messages (from a telnet client, for example). I didn't find any API like "send" and "recv" of Socket's... Do someone have any example that could help me? Until now, my code is just it: main() { alt_avalon_lan91c111_if* dev_list_ptr = (alt_avalon_lan91c111_if*)alt_ethernet_device_list.next; lwip_init(); IP4_ADDR(&ipaddr, 192, 168, 0, 100); IP4_ADDR(&netmask, 255, 255, 255, 0); IP4_ADDR(&gw, 192, 168, 0, 1); netif_add(&netif, &ipaddr, &netmask, &gw, (void*)dev_list_ptr, lan91c111if_init, ip_input); netif_set_default(&netif); pcb = tcp_new(); tcp_bind(pcb, IP_ADDR_ANY, 80); pcb = tcp_listen(pcb); } Then I don't know how to go on (I don´t even know if I´m in the right way...) Can anybody help me? Thanks