lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] listen to multiple ports


From: steffen.storck
Subject: Re: [lwip-users] listen to multiple ports
Date: Tue, 1 Oct 2019 06:16:42 +0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


I'm sorry, but maybe case is a little exotic.

I need to listen to more than one port but only have one local interface. So I 
tried to add more pcbs to the list of pcbs with this

struct udp_pcb* upcb = udp_new();
    if (upcb)
    {
      udp_bind(upcb, IP_ADDR_ANY, ports[i]);
       udp_recv(upcb, udp_server_receive_callback, pInst);
    }


But after 4 pcbs, the memory allocation fails. How/where can I increase the 
size so that 8 pcbs cann be allocated?

Regards and have a nice weekend,
Steffen



- -----Ursprüngliche Nachricht-----
Von: lwip-users <lwip-users-bounces+steffen.storck=address@hidden> Im Auftrag 
von address@hidden
Gesendet: Dienstag, 9. Juli 2019 20:44
An: Mailing list for lwIP users <address@hidden>
Betreff: Re: [lwip-users] listen to multiple ports

Am 05.07.2019 um 16:37 schrieb steffen_storck:
> Hello everybody,
>
> i managed to add mutliple netifs, each with a individual IP adress.
> Unfortunately all these netifs only listen to one port. (i can trance the
> input through ethernet.c, ip4.c to udp.c where  - of course - the local port
> is not the dest-port and the telegram gets dismissed.

I don't get it. Netifs don't listen to ports, pcbs do.

>
> is there a way to have all netifs listen to more than one port? (for
> example, 30000, 32000 and 42000).

Bind to local port with ADDR_ANY?

Regards,
Simon

>
> i could simply edit the udp.c and add an array of pcbs, but that feels
> wrong.
>
> i looked into the bridgeif.c file but i am not sure if this is what i want.
> i don't want to forward the telegram, i only need the udp_callback_fn to be
> called.
>
> Danke,
> Steffen
>
>
>
> --
> Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

________________________________


SEW-EURODRIVE GmbH & Co KG
Kommanditgesellschaft, Sitz: Bruchsal, RG Mannheim HRA 230970
Komplementärin: SEW-EURODRIVE Verwaltungs-GmbH, Sitz: Bruchsal, RG Mannheim HRB 
230207

Gesellschafter: Jürgen Blickle, Rainer Blickle
Geschäftsführung: Jürgen Blickle (Vorsitzender), Udo Aull, Dr. Jörg Hermes, Dr. 
Hans Krattenmacher, Johann Soder, Dr. Jürgen Zanghellini

* Storck, Steffen <address@hidden>
* 0xF135D599(L)

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

________________________________


SEW-EURODRIVE GmbH & Co KG
Kommanditgesellschaft, Sitz: Bruchsal, RG Mannheim HRA 230970
Komplementärin: SEW-EURODRIVE Verwaltungs-GmbH, Sitz: Bruchsal, RG Mannheim HRB 
230207

Gesellschafter: Jürgen Blickle, Rainer Blickle
Geschäftsführung: Jürgen Blickle (Vorsitzender), Udo Aull, Dr. Jörg Hermes, Dr. 
Hans Krattenmacher, Johann Soder, Dr. Jürgen Zanghellini

-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 3.4.2 (Build 502)
Charset: utf-8

wsBVAwUBXZLvS+PdlEjxNdWZAQjevgf/UXC3WnrVTbKeo9019D8CTLU8JP4vvBeJ
khDEXBnDlFsSUkHzgtFLBDp3iHPkULbiW5iPjWI58hamHwqkk68+hahuXehD2ujV
LYf1i82mKakQeMP7JID+4GDZ38xLIS6QarM6I4zXnr3xJepqnJly2JDoFluKHvte
fjxaOGKOwRoB02IKy6uUmw5ntxLY1S1RI87PqY3SPmBImAfj79MNtu/JA7LzWA2q
pA2EBD21c7MQPpwzhYmRAsa8WgspI4eLGod9WKjT3uFP1QnsQ2/8RGZr678BIqGP
/XDn9RZjGiW1RahkWRJKoXiBg7ywK3qbqwPqChGysfcqiZFWHcDQiw==
=gjxU
-----END PGP SIGNATURE-----



reply via email to

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