[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: |
Fri, 27 Sep 2019 10:32:34 +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
-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 3.4.2 (Build 502)
Charset: utf-8
wsBVAwUBXY3lROPdlEjxNdWZAQg+qQf/dWN03xWEV4TGCFJhqT8Ry+clGkeqOoPH
tRO5i4JAVQto+gC2Xzv9llF+wTCgg5jjvFV8+cghwj59bJxW8lM1zHTYXCnOEevS
iba+AGjB2EWYDddK/ilMh++XYH64U2aUhqF94zAZKDdRvH8+saGGevgXo6H+oTn6
58dVpEuMCdi/OrBqy7sQSy1hvtkn4zuuUvw9hvmU6TZ6QmmiHc1yVnTRMzrKWASH
Wk8JKYwuVl+esrQgilQWJKCH1j0eerure0AZDZk7qyx+Y4m1AcmjiIdGopH4Zb0v
+/9gU0yVrP/8iux383P2U24Ay5E/PSWnH5oZEDllMyyj20HHub7uVA==
=0I/Y
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [lwip-users] listen to multiple ports,
steffen.storck <=