Re: [lwip-users] Acknowledge Problem

2016-04-23 Thread Dirk Ziegelmeier
tcpip_priv.h - they should be moved to tcpip.h. Note you need a good mutex implementation for that (priority inversion safe). Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Fri, Apr 22, 2016 at 6:23 PM, Sergio R. Caprile wrote: > RAW API functions must be called

Re: [lwip-users] How to add varbinds to SNMP traps?

2016-06-11 Thread Dirk Ziegelmeier
Hello Marco, this got lost during the rewrite of the SNMP stack. Since we do not use traps in our product, they did not get much attention. If you can provide a patch, I'd be happy to apply it. Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Fri, Jun 10, 20

Re: [lwip-users] How to add varbinds to SNMP traps?

2016-06-17 Thread Dirk Ziegelmeier
.​ Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Fri, Jun 17, 2016 at 2:22 PM, Marco Veeneman wrote: > Hi Dirk, > > > Thanks for pointing this out. I will try to provide a patch to introduce > varbinds to snmp traps again. > > >

[lwip-users] lwIP 2.0.0 documentation

2016-06-26 Thread Dirk Ziegelmeier
Hello all, the lwIP documentation on the web was finally updated to 2.0.0: http://www.nongnu.org/lwip/ Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Custom Memory Pool in lwip

2016-06-30 Thread Dirk Ziegelmeier
Hello Sushain, Is it really required to declare the pools in lwipopts.h? memp_std.h contains pools used by lwIP itself. Private pools are only useful in your own sources, which can include a different header (so no need to declare them in lwipopts.h). Check the HTTP server (src/apps/httpd/httpd.c)

Re: [lwip-users] Custom Memory Pool in lwip

2016-07-08 Thread Dirk Ziegelmeier
,desc)#include "lwip/priv/memp_std.h" ​Don't forget the https://en.wikipedia.org/wiki/Include_guard​ in your private headers. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Fri, Jul 8, 2016 at 2:24 PM, Sushain Razdan wrote: > > On 7/7/

[lwip-users] lwIP documentation update

2016-08-08 Thread Dirk Ziegelmeier
Hello all, the lwIP documentation at http://www.nongnu.org/lwip/2_0_0/index.html was greatly improved. Have a look, and please tell me if you have any comments, corrections or improvements! Dirk ___ lwip-users mailing list lwip-users@nongnu.org https:

Re: [lwip-users] lwIP ports for RTEMS, POSIX based RTOS and FreeRTOS, TMS570 a LPC17/40xx drivers

2016-08-17 Thread Dirk Ziegelmeier
, just for completeness, there is no 1.5.0 version of lwIP. You can always ask for help about netconn API on the appropriate list, we read them and may also answer to your questions. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Tue, Aug 16, 2016 at 9:09 PM,

Re: [lwip-users] lwIP ports for RTEMS, POSIX based RTOS and FreeRTOS, TMS570 a LPC17/40xx drivers

2016-08-18 Thread Dirk Ziegelmeier
Hello Pavel, can you provide a public link to your FreeRTOS and RTEMs port(s) for lwIP 2.0.0 RC? I think I'll create a documentation page "Example ports" with links to these ports. Maybe this helps others or starts some kind of coordinated effort. Dirk -- Dirk Ziegelmeier * d...@

Re: [lwip-users] LLDP Implementation for lwIP

2016-08-23 Thread Dirk Ziegelmeier
Hi Amit, you can now use ethernet_output() in lwIP git head to send your packets. There is also an LWIP_HOOK_UNKNOWN_ETH_PROTOCOL now to receive ethernet protocols that are unknown to lwIP. Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Fri, Aug 19, 2016 at 4

Re: [lwip-users] LW IP - TCP instantaneous data transmission

2016-08-31 Thread Dirk Ziegelmeier
Check out tcp_sent() callback, it is called after data was successfully sent to remote station. http://www.nongnu.org/lwip/2_0_0/group__tcp__raw.html# ga1596332b93bb6249179f3b89f24bd808 Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Wed, Aug 31, 2016 at

Re: [lwip-users] SNMPv2 failed SetRequest response

2016-09-12 Thread Dirk Ziegelmeier
Hello Marco, I cannot check this at the moment, and the guy who actually wrote the code at my company is on vacation for more than one week... Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Thu, Sep 8, 2016 at 4:17 PM, Marco Veeneman wrote: >

Re: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)

2016-09-26 Thread Dirk Ziegelmeier
​Hello Joseph,​ I've got a few questions about IPv6 support. > > First, I've decided to try to use 2.0.0 RC2 for IPv6 support (is this > wise?). > ​Definitely: YES​ > Second, I've got a few questions about how to properly initialize an > interface for IPv6. I have experience working with lwip 1

Re: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)

2016-09-26 Thread Dirk Ziegelmeier
Sorry, I did not answer clearly in my last mail. ​"No need to override the output functions" means you do not have to set them in your application startup. But you have to set them in your netif_init() function. Use ethip6_output() for output_ip6.​ ___ lw

Re: [lwip-users] blocked udp

2016-09-28 Thread Dirk Ziegelmeier
Whenever your application wants to send, use tcpip_callback() macro to get a function called in tcpip thread and do the sending work there. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Wed, Sep 28, 2016 at 12:52 PM, Noam Weissman wrote: > Hi Si

Re: [lwip-users] blocked udp

2016-09-28 Thread Dirk Ziegelmeier
> > A second way to do it, not so preferred by some peoples but worked for me, > is to add critical > > Sections in code that call’s LwIP functions. Adding a critical section > means that you block other > > Tasks for a short time. Especially the TCP task from running. It means > that if you alloca

Re: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)

2016-09-29 Thread Dirk Ziegelmeier
Just saw one more thing: netif_create_ip6_linklocal_address() only works AFTER copying the MAC to netif->hwaddr. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Thu, Sep 29, 2016 at 8:35 PM, josephjah wrote: > Dirk, thank you. This was a big he

Re: [lwip-users] Failed lwip_getpeername() call appears to prevent future socket calls

2016-10-01 Thread Dirk Ziegelmeier
One more side effect which will be fixed by task #13922: Remove fatal error handling err is set to ERR_CONN which is a fatal error. lwip_netconn_do_bind() checks last_err and bails out immediately. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Fri, Sep 30

Re: [lwip-users] No more variables left in this MIB View (It is past the end of the MIB tree)

2016-10-05 Thread Dirk Ziegelmeier
Hi Igor, SNMPv1 and SNMPv2 have different error codes. There is no "End of MIB" at SNMPv1, so it seems the message is what snmpWalk prints in case of SNMPv1 error code "NoSuchName". In this case the client is requesting the next MIB object, and since it was the last one, v1 returns "NoSuchName" (

Re: [lwip-users] Switching to dual stack LwIP

2016-10-06 Thread Dirk Ziegelmeier
yes, see examples in lwip-contrib apps! On Thu, Oct 6, 2016 at 2:33 PM, Aditya Prakash wrote: > > Hi, > > Two years back I made a web server based on LwIP that uses two sockets, > one for IPv4 and one for IPv6. > > However recently I have seen that there have been a quite a lot of changes > rega

Re: [lwip-users] lwIP 2.0.0 IPV6 Thread Awareness

2016-10-06 Thread Dirk Ziegelmeier
Try to use lwIP 2.0.0 core locking feature instead, it does what you try to do with your own mutexes: http://www.nongnu.org/lwip/2_0_0/group__lwip__opts__lock.html#ga8e46232794349c209e8ed4e9e7e4f011 http://www.nongnu.org/lwip/2_0_0/pitfalls.html Ciao Dirk -- Dirk Ziegelmeier * d

Re: [lwip-users] Avoiding sys_thread_new

2016-10-08 Thread Dirk Ziegelmeier
There may be other parts of the code that create threads, depending on how you use them - e.g. SNMP supports netconn mode which creates a thread. But you don't need to avoid sys_thread_new - just implement this function so it uses your own class to create a thread. Dirk On Sun, Oct 9, 2016 at 7:

Re: [lwip-users] 'Avoiding sys_thread_new' and 'RTOS Integration'

2016-10-09 Thread Dirk Ziegelmeier
> > > I still don't understand the statement I quoted from the documentation. > For example how would one allocate on the stack for sys_mbox_new()? > ​You can't. All you can do in such cases is count how many mboxes/semaphores/threads etc. you need and allocate their storage statically. A call to

Re: [lwip-users] 'Avoiding sys_thread_new' and 'RTOS Integration'

2016-10-10 Thread Dirk Ziegelmeier
You are right, this will also work. Even in lwIP 1.4.1 the prototype for these functions was: > err_t sys_sem_new(sys_sem_t *sem, u8_t count); > err_t sys_mbox_new(sys_mbox_t *mbox, int size); > > These functions clearly don't return anything else other than error and > the buffer for semaphore/m

Re: [lwip-users] Switching to dual stack LwIP

2016-10-18 Thread Dirk Ziegelmeier
I guess dual-stack is not well tested with socket API :-( I did most of the dual-stack stuff, but since I don't use IPv6 and socket API at work, I have no real-life tests for it. Dirk On Mon, Oct 17, 2016 at 12:42 PM, Aditya Prakash < aditya.prakash...@gmail.com> wrote: > Hi, > > I am able to i

Re: [lwip-users] Switching to dual stack LwIP

2016-10-19 Thread Dirk Ziegelmeier
there are no plans at the momet. Please file a task for it. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Wed, Oct 19, 2016 at 5:17 AM, Aditya Prakash wrote: > Hi Dirk, > > > I guess dual-stack is not well tested with socket API :-( I did m

Re: [lwip-users] LLDP Implementation for 1.4.1

2016-10-23 Thread Dirk Ziegelmeier
Just post it as a patch at savannah, we'll see what to do then. Hope this is OK for you. Dirk On Sat, Oct 22, 2016 at 3:56 AM, Amit Ashara wrote: > Hello All > > The LLDP base implementation for lwIP 1.4.1 is ready and will be released > on or before Oct 28, 2016. I wanted to check back with th

Re: [lwip-users] LLDP Implementation for 1.4.1

2016-11-12 Thread Dirk Ziegelmeier
way more work than just sending LLDP frames. So IMHO, your LLDP implementation is not that useful - or am I wrong with my assumption about LLDP reception? Are there use cases where sending LLDP frames is enough? Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net O

Re: [lwip-users] LWIP_VERSION in lwIP 2.0.0

2016-11-20 Thread Dirk Ziegelmeier
LWIP_VERSION_RC has changed from 2 (RC2) to 255 (RELEASE) So your macro should be OK. Is there something else that may be wrong? Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Sun, Nov 20, 2016 at 3:19 PM, bernard wrote: > Hi, > I have just port

Re: [lwip-users] Issue in arch.h for lwIP 2.0.0

2016-11-29 Thread Dirk Ziegelmeier
I added it, thanks for reporting! ​ http://git.savannah.gnu.org/cgit/lwip.git/commit/?id=182d7c138a5b845c74b7d364ee07af6105d8e786 Dirk On Tue, Nov 29, 2016 at 10:19 PM, Amit Ashara wrote: > Hello All, > > I am using the ARM Compiler from Code Composer Studio and while updating > lwIP from 1.4.

Re: [lwip-users] Issue in arch.h for lwIP 2.0.0

2016-11-30 Thread Dirk Ziegelmeier
Since it was already included in several lwIP .c/.h files, I simply decided to move it to a central place: arch.h. So my change should not break anything or make lwIP less portable as it was before. Dirk On Wed, Nov 30, 2016 at 11:07 AM, Simon Goldschmidt wrote: > Freddie Chopin wrote: > > It

Re: [lwip-users] Issue in err.c for lwIP 2.0.0

2016-11-30 Thread Dirk Ziegelmeier
No, the solution is in errno.h: Choose one of: - #define LWIP_PROVIDE_ERRNO 1 - #define LWIP_ERRNO_INCLUDE "path/my_header_file_containing_errno.h" HTH Dirk On Wed, Nov 30, 2016 at 7:45 PM, Amit Ashara wrote: > Hello All, > > When integrating FreeRTOS with lwIP 2.0.0 the following gives an e

Re: [lwip-users] Upgrading lwip 1.4.1 to 2.0.0 pbuf (or other) issue?

2016-12-05 Thread Dirk Ziegelmeier
The "udp_send: No route to 192.168.101.10" sounds like there is an explicit netif_set_up() is missing. Also check whether netif_set_link_up()/netif_set_link_down() is called somewhere. Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.

Re: [lwip-users] UDP bind error due to address and port reuse

2016-12-07 Thread Dirk Ziegelmeier
Use one UDP PCB, bind it to IPADDR_ANY and port x. Use udp_sendto() to send to any IP/port combination. http://www.nongnu.org/lwip/2_0_0/group__udp__raw.html You get the src address/port of any request in your receive callback: void my_udp_recv_fn (void *arg, struct udp_pcb

Re: [lwip-users] UDP bind error due to address and port reuse

2016-12-08 Thread Dirk Ziegelmeier
Why don't you simply try out to program the 5 lines of code that I recommended you? Then you would already know whether it works or (if it does not work) provide a better description what the problem is. ​D​ irk ___ lwip-users mailing list lwip-users@non

Re: [lwip-users] UDP bind error due to address and port reuse

2016-12-13 Thread Dirk Ziegelmeier
is how it works, i.e., how the port parameter in the > function is > the port sending the reply. Could you plz. explain. Thank You. > > Regards, > Surya > > On Wed, 7 Dec 2016 11:43:59 +0100, Dirk Ziegelmeier wrote > > Use one UDP PCB, bind it to IPADDR_ANY and port x. &g

Re: [lwip-users] UDP bind error due to address and port reuse

2016-12-15 Thread Dirk Ziegelmeier
nding few times, i.e., the > packets are > not reaching the destination. The error message says "Error on udp_send: -1 > pack dropped, no space" . Why does this happen? > > Regards, > Surya > > > On Tue, 13 Dec 2016 12:49:25 +0100, Dirk Ziegelmeier wrote > &g

Re: [lwip-users] LWIP : Get rid of warnings when LWIP_NOASSERT is on

2016-12-19 Thread Dirk Ziegelmeier
Thank you for reporting. I found three more places in IPv6 code to fix. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Mon, Dec 19, 2016 at 9:48 AM, Nirav Desai wrote: > ​Hello, > > I use LWIP in professional capacity. > > Here I face a

Re: [lwip-users] LWIP : Get rid of warnings when LWIP_NOASSERT is on

2016-12-19 Thread Dirk Ziegelmeier
ition? Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Mon, Dec 19, 2016 at 9:00 AM, adityapr wrote: > Hi Dirk, > > Since we are already at this issue, there are a couple of warnings that I > would also like to report. > In tcp.h: > - #defin

Re: [lwip-users] FreeRTOs port

2016-12-19 Thread Dirk Ziegelmeier
http://lwip.100.n7.nabble.com/lwIP-ports-for-RTEMS-POSIX-based-RTOS-and-FreeRTOS-TMS570-a-LPC17-40xx-drivers-td27134.html Ciao Dirk On Mon, Dec 19, 2016 at 12:16 PM, Nirav Desai wrote: > Hello All, > > Please find attached a patch which has FreeRTOS port for LWIP. > > Many IoT based products u

Re: [lwip-users] TFTP init

2016-12-20 Thread Dirk Ziegelmeier
The unix simhost has a working example in contrib http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git/tree/ports/unix/unixsim/simhost.c Dirk On Tue, Dec 20, 2016 at 8:09 PM, Nicholas Richard wrote: > > Hello, > > I’m looking to get the TFTP server up and running, but I’m having a hard > tim

Re: [lwip-users] MEMP_POOL_256 undeclared when enabling custom pools

2017-01-05 Thread Dirk Ziegelmeier
Can you please post more detail of the error message? e.g. which file is being compiled. ​I use custom mempool in my application, and ​I don't see this error message. Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/m

Re: [lwip-users] Using in a single thread with NO_SYS = 1

2017-01-08 Thread Dirk Ziegelmeier
Yes, but read and apply these: http://www.nongnu.org/lwip/2_0_0/pitfalls.html http://www.nongnu.org/lwip/2_0_0/group__lwip__nosys.html Pay especially attention to your netif driver, it must not call netif->input() from IRQ context! See example code on the page of the second link above. Also note

Re: [lwip-users] Assertions when using DHCP when using LWIP 2.0

2017-01-23 Thread Dirk Ziegelmeier
And read this: http://www.nongnu.org/lwip/2_0_0/pitfalls.html Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] lwip_sendto hanging with lwip 2.0

2017-01-24 Thread Dirk Ziegelmeier
Calling sys_timeout() results in send_actual_pkt being called back from TCPIP thread. You must not call sequencial style functions from TCPIP thread. http://www.nongnu.org/lwip/2_0_0/group__sequential__api.html says: "More overhead, but can be called from any thread except TCPIP thread."​ Dirk __

Re: [lwip-users] sporadic PCB corruption

2017-01-30 Thread Dirk Ziegelmeier
That call stack does not mean the corruption happens in this call stack. For debugging, can you simply call memp_free on the tcp PCB from your application thread? If the sanity check already hits you there, then it is most probably your application's problem. If you are on a platform with HW brea

Re: [lwip-users] Lwip with router

2017-02-16 Thread Dirk Ziegelmeier
Did you check this? http://www.nongnu.org/lwip/2_0_0/upgrading.html Especially the netif_set_up() part? Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Upgrading from 1.4.x to 2.0.2

2017-03-14 Thread Dirk Ziegelmeier
I'd recommend to use the Filelists.mk if you use make as a build system, then you don't have to worry about added/removed files in the future. Ciao Dirk Also, note that 2.0.0 has added/removed/moved files, so you need to adjust your build process/project. > > Simon > > >

Re: [lwip-users] lwip 1.4.1 -> 2.0.1: problem with dhcp

2017-03-14 Thread Dirk Ziegelmeier
Maybe this is missing: http://www.nongnu.org/lwip/2_0_x/upgrading.html * Changed netif "up" flag handling to be an administrative flag (as opposed to the previous meaning of "ip4-address-valid", a netif will now not be used for transmission if not up) -> even a DHCP netif has to be set "

Re: [lwip-users] lwip 1.4.1 -> 2.0.1: problem with dhcp

2017-03-15 Thread Dirk Ziegelmeier
no, you just need to enable the interface during system startup by calling netif_set_up(). NO_SYS example: http://www.nongnu.org/lwip/2_0_x/group__lwip__nosys.html Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Wed, Mar 15, 2017 at 8:35 AM, wrote: >

Re: [lwip-users] Question regarding mdns responder

2017-03-21 Thread Dirk Ziegelmeier
The problem is that you have two hosts with the same name "BGW" (= "BGW.local" MDNS name) in the same network. They should have different names. Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Question regarding mdns responder

2017-03-21 Thread Dirk Ziegelmeier
from mdns.c: * Things left to implement: * - * * - Probing/conflict resolution [...] Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Connect two machines running LWIP applications via WLAN

2017-04-01 Thread Dirk Ziegelmeier
http://serverfault.com/questions/152363/bridging-wlan0-to-eth0 Ciao Dirk > > https://lists.nongnu.org/mailman/listinfo/lwip-users > ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Connect two machines running LWIP applications via WLAN

2017-04-04 Thread Dirk Ziegelmeier
I sent this link because of the first answer: It is not possible to bridge between wireless (client a.k.a. station mode) and wired interfaces according to this thread on linux-ath5k-devel

Re: [lwip-users] SNTP example?

2017-04-29 Thread Dirk Ziegelmeier
Look AG lwip contrib repository, Unix port, simhost.c. There is an example in there. Dirk On Apr 29, 2017 23:17, "Mike Rosing" wrote: Hello, I have ported 2.0.2 to the TI C6748 and finally got DHCP to get an address. The next thing I'd like to do is use sntp. What do I do after calling sntp_

Re: [lwip-users] DHCP fails ?

2017-05-09 Thread Dirk Ziegelmeier
> After checking/debugging I found that if I add a call to function > netif_set_link_down(netif); just before I check for link and > > netif_set_link_up(netif); … DHCP task will work fine > > > ​Sounds correct - from the UPGRADING document ( https://git.savannah.gnu.org/cgit/lwip.git/tree/UPGRADING

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-10 Thread Dirk Ziegelmeier
Sounds like you are calling lwIP functions from another thread than the lwIP thread, in your case the CAN thread. See http://www.nongnu.org/lwip/2_0_x/pitfalls.html Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Dirk Ziegelmeier
in the tcpip thread? > > > > > > *Von:* lwip-users [mailto:lwip-users-bounces+motz=smart-e-tech.de@nongnu. > org] *Im Auftrag von *Dirk Ziegelmeier > *Gesendet:* Mittwoch, 10. Mai 2017 19:04 > *An:* Mailing list for lwIP users > *Betreff:* Re: [lwip-users] lwip 2.0.2 +

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Dirk Ziegelmeier
Use socket API and you can use threads without problems. Possible alternative: http://www.nongnu.org/lwip/2_0_x/group__tcp__raw.html#gafba47015098ed7ce523dcf7bdf70f7e5 Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailm

Re: [lwip-users] lwip 2.0.2 + freertos + ARM7

2017-05-11 Thread Dirk Ziegelmeier
The two APIs can coexist. regarding your code: Sorry, this code is so horribly wrong :-( I am sorry for being rude - you also need a LOT of education in C code. And, if your compiler compiles this, the warning settings are way too relaxed or you really should read and fix all compiler warnings. ​

Re: [lwip-users] Example of changes needed to switch from 1.4.1 to 2.0.1

2017-05-23 Thread Dirk Ziegelmeier
TiVaWare = TI Vapor Ware? ;-) Am 23.05.2017 10:27 nachm. schrieb "goldsi...@gmx.de" : > Wow, this is so horrible! I really don't know why people come up with this > idea of including C files in other C files. > > Funny enough, it seems to work on the lwIP sources without problems, does > it? > >

Re: [lwip-users] DHCP status with lwIP version 2

2017-06-07 Thread Dirk Ziegelmeier
Try netif_dhcp_data() (not sure about the name, can't check at the moment). See dhcp.h near the bottom. Am 07.06.2017 10:06 schrieb "R. Diez" : Hi all: I am upgrading to lwIP version 2 and I saw the following in the change log: netif.h, dhcp.c: Removed unused netif flag for DHCP. The preferred

Re: [lwip-users] seting up ip address after initialization

2017-07-06 Thread Dirk Ziegelmeier
http://www.nongnu.org/lwip/2_0_x/group__netifapi__netif.html ​HTH Dirk On Thu, Jul 6, 2017 at 12:16 PM, massimiliano cialdi < massimiliano.cia...@powersoft.it> wrote: > I have to set the ip address after initialization. > > I guess I have to pass 0.0.0.0 as ip address, netmask and gw to call to

Re: [lwip-users] how to set the link up

2017-07-06 Thread Dirk Ziegelmeier
Seriously, Max, if I send you a link to the lwIP docs, the I can at least expect you ​ READ AND try HARD to UNDERSTAND the docs.​ You really can answer that question by yourself.​ Read the page that I sent you, and several other pages in the docs, there are many questions answered in there (especi

Re: [lwip-users] IPv6 multicast support by Socket API?

2017-08-09 Thread Dirk Ziegelmeier
Andrey, can you try my patch and tell me if it works? If not, please try to debug it, I was not able to test it at home. TODO: Correctly unregister at socket close, try to fix code duplication with IGMP. Ciao Dirk diff --git a/src/api/sockets.c b/src/api/sockets.c index a50faf5..21f6481 100644 -

Re: [lwip-users] IPv6 multicast support by Socket API?

2017-08-10 Thread Dirk Ziegelmeier
"We have task #14394 (Improve socket options) for this" does not mean that somebody is or will be working on it - it is just there so the issue is not forgotten. Have you been able to test my patch? Dirk ___ lwip-users mailing list lwip-users@nongnu.or

Re: [lwip-users] udp_send / udp_recv thread safefy

2017-09-08 Thread Dirk Ziegelmeier
No, its not OK to call raw API functions from another thread. See http://www.nongnu.org/lwip/2_0_x/pitfalls.html Dirk On Fri, Sep 8, 2017 at 12:04 PM, Ricardo Martins wrote: > Hi, > > I'm doing some work with LWIP 2.0.2 using the raw API to send and receive > UDP datagrams and I have a doubt r

Re: [lwip-users] Correct way to use SNTP safely

2017-09-21 Thread Dirk Ziegelmeier
Read: http://www.nongnu.org/lwip/2_0_x/index.html and http://www.nongnu.org/lwip/2_0_x/pitfalls.html Check the "Modules" section, the APIs are separated in "Callback-style" (tcpipthread only) and "Sequential-style" (to be used from other threads) Ciao Dirk On Fri, Sep 22, 2017 at 8:51 AM, Wayne

Re: [lwip-users] 2 packets received in tcp and passed as only 1 with doubled size

2017-09-22 Thread Dirk Ziegelmeier
Are you aware TCP is a STREAM protocol, NOT a PACKET based protocol like UDP? The behavior sounds perfectly fine. Dirk On Fri, Sep 22, 2017 at 5:24 PM, gussabina wrote: > Hello: > > I'm using lwIP 1.4.1 with FreeRTOS 7.30 running on Atmel ATSAM4E, with an > application creating a tcp (mqtt) con

Re: [lwip-users] ip_addr_copy alignment issue

2017-09-24 Thread Dirk Ziegelmeier
Packed structs imply two things: No padding inside the struct AND the struct's location may be unaligned in memory. So when this u32 access fails at runtime your compiler did not generate correct code for your platform. When copying an u32 to/from a packed struct, something like memcpy needs to be

Re: [lwip-users] ip_addr_copy alignment issue

2017-09-24 Thread Dirk Ziegelmeier
Can't help you with IAR, but maybe you can tell your processor to handle unaligned access. Depending on your CPU type (following example is Cortex-A9, Altera Cyclone V) your startup code may look like this (gcc asm): Reset_Handler: MRC p15, 0, r0, c1, c0, 0 /* ; Read CP15 System

Re: [lwip-users] Problem by sending of UDP broadcast frame

2017-10-04 Thread Dirk Ziegelmeier
set a default netif using netif_set_default() Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] FW: Problem by sending of UDP broadcast frame

2017-10-04 Thread Dirk Ziegelmeier
http://www.nongnu.org/lwip/2_0_x/upgrading.html (2.0.0) ++ Application changes: * Changed netif "up" flag handling to be an administrative flag (as opposed to the previous meaning of "ip4-address-valid", a netif will now not be used for transmission if not up) -> even a DHCP netif ha

Re: [lwip-users] Memory Pool relocation

2017-10-15 Thread Dirk Ziegelmeier
​ extern u8_t attribute((section(".onchip_mem"))) memp_memory_PBUF_POOL_base[]; The documentation is wrong. I'll fix it. Ciao Dirk Hi > > > I eventually got round to testing this – but I am not sure the docs are > correct. Here is the note in the docs: > > > > extern u8_t attribute((section("

Re: [lwip-users] lwipopts: TX_SINGLE_PBUF

2017-10-20 Thread Dirk Ziegelmeier
Simon tried to explain you this: https://git.savannah.gnu.org/cgit/lwip.git/tree/src/include/lwip/opt.h#n1593 Dirk On Fri, Oct 20, 2017 at 2:57 PM, David Gauchard wrote: > On ven., oct. 20, 2017 at 09:32:14 -0300, Sergio R. Caprile wrote: > > I can comment on the ESP8266 side. > > It does not

Re: [lwip-users] 2 Devices

2017-11-07 Thread Dirk Ziegelmeier
Try SO_BINDTODEVICE socket option Ciao Dirk On Tue, Nov 7, 2017 at 3:55 PM, Fabian Cenedese wrote: > At 15:20 07.11.2017, you wrote: > >Hi, > > > >I am doing similar thing. I think I will use one thread to collect data > from multiple devices and feed them to corresponding netif->input. > >Do

Re: [lwip-users] 2 Devices

2017-11-07 Thread Dirk Ziegelmeier
It's in git head Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Lwip tcp-stack reliability issue when using non-reliable network?

2017-11-07 Thread Dirk Ziegelmeier
Try implementing it as DisableInterrupts() / EnableInterrupts() Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Externally allocated memory pool for pbufs

2017-11-07 Thread Dirk Ziegelmeier
RX is OK, updated example: http://www.nongnu.org/lwip/2_0_x/group__pbuf.html Moving PBUFs: http://www.nongnu.org/lwip/2_0_x/group__mempool.html#ga5b1fb3ce7942432d87cc948b1c5ed6cb Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.

Re: [lwip-users] Lwip tcp-stack reliability issue when using non-reliable network?

2017-11-07 Thread Dirk Ziegelmeier
Sorry for the DisableInterrupts() / EnableInterrupts() confusion, I forgot you are running on Android in a process. Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Tue, Nov 7, 2017 at 9:07 PM, Dirk Ziegelmeier wrote: > Try implementing it

Re: [lwip-users] netconn send broadcast

2017-11-07 Thread Dirk Ziegelmeier
Yes, that's correct. Be aware this is not thread-safe, you should not change that option during runtime. You should do it before binding the PCB. Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-u

Re: [lwip-users] 2 Devices

2017-11-10 Thread Dirk Ziegelmeier
you need both calls (bind, sockopt), your code should work like this, I think. If not, please debug and tell us why :-) Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Problem running lwip on cortex M7 with D cache enabled

2017-11-30 Thread Dirk Ziegelmeier
> We still have a task open to work on fully supporting zero copy tx/rx. > To clarify: 2.0.3 supports zero-copy RX: http://www.nongnu.org/lwip/2_0_x/group__pbuf.html Section "Detailed Description" but NOT TX! Maybe RX is "good enough" for you. ​Dirk ​ __

Re: [lwip-users] SNMP MIB CREATE

2017-12-11 Thread Dirk Ziegelmeier
That's simply because the number in the first tree node after the MIB OID is ignored. The macro practically reads "SNMP_CREATE_TREE_NODE(, private_nodes);" - but again, only for the FIRST tree node after a MIB node! ​To avoid confusion, that "don't care number" should be the same as the last numb

Re: [lwip-users] mDNS

2017-12-16 Thread Dirk Ziegelmeier
Did you configure your netif to receive broadcasts? Do you call mdns_resp_netif_settings_changed() when your link state / IP changes? This will trigger a broadcast. http://www.nongnu.org/lwip/2_0_x/group__mdns.html Ciao Dirk ___ lwip-users mailing li

Re: [lwip-users] mDNS

2017-12-18 Thread Dirk Ziegelmeier
This is not an lwIP issue, but a configuration issue of your ethernet driver. Contact Xilinx for support on that driver. Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Double VLAN tagging

2018-01-10 Thread Dirk Ziegelmeier
No, lwIP doesn't support it. But it should be easy to add in src/netif/ethernet.c. Ciao Dirk On Wed, Jan 10, 2018 at 9:41 AM, Amena El Homsi wrote: > Hello, > > In the eth_type enum, I didn't see the ETHTYPE 0x88a8 referring to the > TPID of service-provider outer S-TAG used when the Ethernet f

Re: [lwip-users] Double VLAN tagging

2018-01-10 Thread Dirk Ziegelmeier
yes, it discards them Ciao Dirk On Wed, Jan 10, 2018 at 10:08 AM, Amena El Homsi wrote: > So the LwIP discards such frames, right? > > Thanks > Amena > > On Wed, Jan 10, 2018 at 10:56 AM, Dirk Ziegelmeier > wrote: > >> No, lwIP doesn't support it. But it sh

Re: [lwip-users] How to solve netif is not up issue

2018-01-10 Thread Dirk Ziegelmeier
Read http://www.nongnu.org/lwip/2_0_x/upgrading.html Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Set DNS servers IPs manually

2018-02-13 Thread Dirk Ziegelmeier
DNS_MAX_SERVERS must be greater than LWIP_DHCP_MAX_DNS_SERVERS and http://www.nongnu.org/lwip/2_0_x/group__dns.html HTH Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Tue, Feb 13, 2018 at 10:49 AM, cookies_do wrote: > Hello everyone. > > I am u

Re: [lwip-users] Initialization problem upgrading from 1.4.1 to 2.0.3

2018-04-05 Thread Dirk Ziegelmeier
try to add #include "lwip/ip_addr.h" and read http://www.nongnu.org/lwip/2_0_x/upgrading.html especially "Changed netif "up" flag handling to be an administrative flag [...]" -> don't forget to call netif_set_up() Ciao Dirk -- Dirk Zie

Re: [lwip-users] DOXYGEN usage

2018-04-12 Thread Dirk Ziegelmeier
??? Did you ever look at the code on lwIPs homepage? http://git.savannah.gnu.org/cgit/lwip.git/tree/doc/doxygen Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Thu, Apr 12, 2018 at 2:31 PM, cookies_do wrote: > Hello! > > I am new with Doxygen

Re: [lwip-users] DOXYGEN usage

2018-04-12 Thread Dirk Ziegelmeier
So, then what is your question? There is even a batch file to generate the docs in the directory I sent you. Did you try it??? Ciao Dirk -- Dirk Ziegelmeier * d...@ziegelmeier.net * http://www.ziegelmeier.net On Thu, Apr 12, 2018 at 2:57 PM, cookies_do wrote: > Thank you for your answer.

[lwip-users] Transition to CMake?

2018-04-27 Thread Dirk Ziegelmeier
Hello all, those who watch the lwIP commits have noticed I started working on a CMake based build system. My question is: Is there an interest in the old Makefile-based system? I'm currently tempted to throw it away :-) I'd just keep the Filelists.mk files for people with Makefile build systems.

Re: [lwip-users] Defining a function call via a macro in lwipopts.h

2018-05-15 Thread Dirk Ziegelmeier
See LWIP_HOOK_FILENAME ​ http://www.nongnu.org/lwip/2_0_x/group__lwip__opts__hooks.html#ga11ac9d637cb6afc0a32e8da7f51d0c0d Ciao Dirk ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] lwIP 2.1 cleanup - remove UNIX test apps

2018-06-15 Thread Dirk Ziegelmeier
Hello all, in order to clean up for lwIP 2.1, I'd like to remove the UNIX port test applications - lib - minimal - unixsim The only remaining test/debug app would be the new "example_app" that shares most of the code with the windows port. We would then have only one common app shared between wi

Re: [lwip-users] [lwip-devel] lwIP 2.1 cleanup - remove UNIX test apps

2018-06-15 Thread Dirk Ziegelmeier
ll these netifs be deleted, too? Does anyone out there use them? Ciao Dirk On Fri, Jun 15, 2018 at 11:39 AM Simon Goldschmidt wrote: > Dirk Ziegelmeier wrote: > > Hello all, > > > > in order to clean up for lwIP 2.1, I'd like to remove the UNIX port test > app

Re: [lwip-users] lwIP 2.1 cleanup - remove UNIX test apps

2018-06-15 Thread Dirk Ziegelmeier
Hi Sergio, you "*started long ago* using 'minimal' for development and teaching" - does that mean you still use it today? Do you want me to keep it? The TAP (not TUN) interface will remain, since the example_app uses it. Do you need the TUN interface? If I got you right, lib, simhost, simnode an

Re: [lwip-users] lwIP 2.1 cleanup - remove UNIX test apps

2018-06-15 Thread Dirk Ziegelmeier
Hi Yigal, I removed it because you can generate easily a Makefile-based build (and many others) using cmake. - cd into example_app dir - mkdir build - cd build - cmake .. -G "MinGW Makefiles" - make ​The msvc_netif_init contains no platform specific code. I just forgot to rename it. Just pushed

Re: [lwip-users] lwIP 2.1 cleanup - remove UNIX test apps

2018-06-16 Thread Dirk Ziegelmeier
for cmake (will need to install cmake). > If it is simple and reliable maybe it is a godo improvement. > > Thanks > Yigal > > > > > > > > > On Fri, Jun 15, 2018 at 3:28 PM, Dirk Ziegelmeier > wrote: > >> Hi Yigal, >> >> I removed it becaus

  1   2   >