Skip to content

Fix compile issues with LWIP_SINGLE_NETIF #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pico_w/bt/picow_bt_example_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void picow_bt_example_main(void) {
} else {
printf("Connected in %lus.\n", (to_ms_since_boot(get_absolute_time()) - start_ms) / 1000);
}
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_list)));
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_default)));
lwiperf_start_tcp_server_default(&iperf_report, NULL);
#endif
}
2 changes: 1 addition & 1 deletion pico_w/bt/standalone/server_with_wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int main() {

// setup iperf
cyw43_arch_lwip_begin();
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_list)));
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_default)));
lwiperf_start_tcp_server_default(&iperf_report, NULL);
cyw43_arch_lwip_end();

Expand Down
2 changes: 1 addition & 1 deletion pico_w/wifi/freertos/httpd/pico_freertos_httpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void main_task(__unused void *params) {
#endif
#endif

printf("\nReady, running httpd at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_list)));
printf("\nReady, running httpd at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_default)));
httpd_init();

http_set_cgi_handlers(cgi_handlers, LWIP_ARRAYSIZE(cgi_handlers));
Expand Down
2 changes: 1 addition & 1 deletion pico_w/wifi/freertos/iperf/picow_freertos_iperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void main_task(__unused void *params) {
ip4_addr_set_u32(&clientaddr, ipaddr_addr(xstr(IPERF_SERVER_IP)));
assert(lwiperf_start_tcp_client_default(&clientaddr, &iperf_report, NULL) != NULL);
#else
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_list)));
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_default)));
lwiperf_start_tcp_server_default(&iperf_report, NULL);
#endif
cyw43_arch_lwip_end();
Expand Down
2 changes: 1 addition & 1 deletion pico_w/wifi/httpd/pico_httpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ int main() {
} else {
printf("Connected.\n");
}
printf("\nReady, running httpd at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_list)));
printf("\nReady, running httpd at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_default)));

// start http server
wifi_connected_time = get_absolute_time();
Expand Down
2 changes: 1 addition & 1 deletion pico_w/wifi/iperf/picow_iperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int main() {
ip4_addr_set_u32(&clientaddr, ipaddr_addr(xstr(IPERF_SERVER_IP)));
assert(lwiperf_start_tcp_client_default(&clientaddr, &iperf_report, NULL) != NULL);
#else
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_list)));
printf("\nReady, running iperf server at %s\n", ip4addr_ntoa(netif_ip4_addr(netif_default)));
lwiperf_start_tcp_server_default(&iperf_report, NULL);
#endif
cyw43_arch_lwip_end();
Expand Down
1 change: 1 addition & 0 deletions pico_w/wifi/lwipopts_examples_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#define LWIP_NETIF_TX_SINGLE_PBUF 1
#define DHCP_DOES_ARP_CHECK 0
#define LWIP_DHCP_DOES_ACD_CHECK 0
#define LWIP_SINGLE_NETIF 1

#ifndef NDEBUG
#define LWIP_DEBUG 1
Expand Down
2 changes: 1 addition & 1 deletion pico_w/wifi/tcp_server/picow_tcp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static err_t tcp_server_accept(void *arg, struct tcp_pcb *client_pcb, err_t err)

static bool tcp_server_open(void *arg) {
TCP_SERVER_T *state = (TCP_SERVER_T*)arg;
DEBUG_printf("Starting server at %s on port %u\n", ip4addr_ntoa(netif_ip4_addr(netif_list)), TCP_PORT);
DEBUG_printf("Starting server at %s on port %u\n", ip4addr_ntoa(netif_ip4_addr(netif_default)), TCP_PORT);

struct tcp_pcb *pcb = tcp_new_ip_type(IPADDR_TYPE_ANY);
if (!pcb) {
Expand Down
Loading