Re: [lwip-users] Add new header & tail

2018-09-12 Thread goldsi...@gmx.de
On 12.09.2018 16:17, Sergio R. Caprile wrote: [..] "ESP" (whatever it is) I guess ESP is Espressif, the vendor of ESP32? But I'm lost on the rest. Again, please clarify your scenario. Right, I can't help with the information provided, either. Simon

Re: [lwip-users] icmp6

2018-08-14 Thread goldsi...@gmx.de
On 14.08.2018 14:49, Amena El Homsi wrote: When we receive an echo request using IPv6, LwIP copies the request to new pbuf to send the reply. Why LwIP doesn't use the echo request pbuf, instead of allocating a new one (as what LwIP does when replying to IPv4 echo requests)? Ehrm, I don't know

Re: [lwip-users] Enable/Disable ICMP replies at the runtime

2018-08-08 Thread goldsi...@gmx.de
On 08.08.2018 12:05, Johnny23 wrote: Hello everybody, Is it possible to enable/disable the ICMP replies at the runtime of the system without any change in the LWIP source code? It's required for the security on my project. I saw that the constant LWIP_ICMP can be used but it has to be set before

Re: [lwip-users] Socket support

2018-08-08 Thread goldsi...@gmx.de
On 08.08.2018 11:51, Amena El Homsi wrote: Hi, Can we support sockets using RAW API without Socket API? Sockets are provided by socket API, so no, you can't use sockets without the socket API. RAW API can work without socket API, but it uses pcbs, not sockets. Simon

Re: [lwip-users] Request for ALTCP example etc.

2018-08-06 Thread goldsi...@gmx.de
On 05.08.2018 02:09, Richard Man wrote: OK, I believe I found the source of the bug If you found a bug in our mbedtls adaption, could you please send a patch? It's not really clear from your mail what should be changed. Aside from that, it worked for me, so this is somewhat strange...

Re: [lwip-users] Request for ALTCP example etc.

2018-08-03 Thread goldsi...@gmx.de
On 03.08.2018 09:36, Richard Man wrote: Hi Simon or others, I am attempting to build 2.1.0 RC1 with ALTCP, specifically with the mbedTLS 2.12.0. Looks like I need to map the function pointers in altcp_tcp.h to the mbedTLS functions, but if there is a working example that I can leverage, I

Re: [lwip-users] Bug with 2.02 MQTT connect

2018-08-03 Thread goldsi...@gmx.de
On 03.08.2018 09:08, Richard Man wrote: Wow! Amazingly enough, sandwiching mbedTLS between MQTT and TCP is EXACTLY what I need to do next! I have mbedTLS ported working with lwIP and my RTOS (REXIS). This should save time a bit of time. Thanks! I just noticed I cannot find an example :-( 

Re: [lwip-users] Bug with 2.02 MQTT connect

2018-08-03 Thread goldsi...@gmx.de
On 03.08.2018 08:55, Richard Man wrote: I meant lwIP 2.0.3, but yes you are correct, 2.1.0 RC1 does have a fix, as well as using "altcp_" instead of "tcp_" function names. Must be something new Those "altcp_" functions allow layering SSL between MQTT and TCP. There sghould be an example

Re: [lwip-users] Bug with 2.02 MQTT connect

2018-08-03 Thread goldsi...@gmx.de
On 02.08.2018 22:16, Richard Man wrote: The MQTT connect function is missing code to check for optional username/passwd and add the info to the header. The fix is trivial, and I will see if I can send it to the official people when I have the chance. Version 2.0.2 is rather old. I think what

Re: [lwip-users] netif setup for IPv6 traffic (static /128 address assignment)

2018-07-25 Thread goldsi...@gmx.de
On 25.07.2018 08:01, josephjah wrote: Hello, I'm trying to assign a static /128 address to a netif but I think I'm doing something wrong. I'm using 2.0.3 (also tested latest mater). I can see packets are being correctly received but when ethip6_output() is called it can't seem to find the proper

Re: [lwip-users] Extracting data from lwIP TCP/IP flow on microcontroller

2018-07-25 Thread goldsi...@gmx.de
On 25.07.2018 12:10, Zsolt Nagy wrote: Hello Everyone, I'm using a Texas Instruments RM57L843 microcontroller and I would like to communicate with it from the PC. I managed to set up communication with static IP, and successfully pinged the controller. I'm using the drivers provided by TI.

[lwip-users] 2.1.0-rc1

2018-07-12 Thread goldsi...@gmx.de
The 1st release candidate version for lwIP 2.1.0 is now available via git (using the STABLE-2_1_0_RC1 tags in both repositories) or via these gitweb links: core:http://git.savannah.nongnu.org/cgit/lwip.git/snapshot/lwip-STABLE-2_1_0_RC1.tar.gz

Re: [lwip-users] LwIP RAW - Simultaneous (full-duplex) communication

2018-07-05 Thread goldsi...@gmx.de
On 05.07.2018 16:18, Nenad Pekez wrote: [..] I don't think any calls to lwIP are made from an ISR. Yes, that looks good so far from what you wrote. I'm afraid I don't have any more ideas now. You'll have to try and debug it yourself. E.g. set a breakpoint at when the stats underflow happens.

Re: [lwip-users] LwIP RAW - Simultaneous (full-duplex) communication

2018-07-04 Thread goldsi...@gmx.de
On 04.07.2018 16:41, Nenad Pekez wrote: quick update: iperf client on PC was trying to connect on the same 5001 port, thus the mentioned error was reported. I don't understand. But it seems irrelevant? Now, there is a full-duplex communication, however, the one which is first achieved is

Re: [lwip-users] PBUF_RAM allocation

2018-06-28 Thread goldsi...@gmx.de
On 28.06.2018 15:10, Amena El Homsi wrote: I went over LwIP code and the only memory error I saw is that when p->payload ptr < pbuf ptr. Since our data memory addresses are always less than the frame memory addresses we will not face this issue because p->payload ptr will always be greater

Re: [lwip-users] How to limit the UDP Rx packet size to avoid big RAM allocations

2018-06-27 Thread goldsi...@gmx.de
On 27.06.2018 16:12, R. Diez wrote: I must admit that I am always in a rush. Did I miss some place in the documentation where this is explained? Hmm dunno, I haven't read the docs lately ;-) If there's somthing missing in the docs you discover here on the list, please don't hesitate to send a

Re: [lwip-users] How to limit the UDP Rx packet size to avoid big RAM allocations

2018-06-27 Thread goldsi...@gmx.de
On 27.06.2018 13:31, R. Diez wrote: It does. Input pbufs are PBUF_POOL pbufs which consume a constant memory size. I'm no expert, Yet you try to sound like one ;-) but that sounds wrong. If the remote computer decides to send very small chunks, lwIP is going to waste memory fast. No. On

Re: [lwip-users] How to limit the UDP Rx packet size to avoid big RAM allocations

2018-06-26 Thread goldsi...@gmx.de
On 26.06.2018 15:15, R. Diez wrote: [..] However, if we now consider IP reassembly, a single reassembled packet can already get over that 32 KiB memory limit, right? I believe that a single UDP packet can be up to roughly 64 KiB long. An attacker can exhaust the whole lwIP memory with just 1 or

Re: [lwip-users] lwIP RAW - Low throughput during first few seconds

2018-06-26 Thread goldsi...@gmx.de
On 26.06.2018 16:55, Nenad Pekez wrote: [..] we have been measuring throughput between PC Windows 7 and Zynq device using iperf applications. [..] In attachments I provide: * iperf_throughput.png - screenshot of iperf measurements, * lwipopts.h - our lwIP configuration file and *

Re: [lwip-users] STM32F4+lwIP: TCP MSS sets to 536 bytes on its own

2018-06-22 Thread goldsi...@gmx.de
On 21.06.2018 17:52, Jagdish wrote: Hi, Am using lwIP stack with STM32F4 series micro-controller in one of project board. Trying to connect this board to pc based application. I observed, When host sends packet of size 1088 bytes, the packet gets divided into 2. Please refer the packet where

Re: [lwip-users] lwIP iPerf client implementation

2018-06-21 Thread goldsi...@gmx.de
On 21.06.2018 09:42, Patrick van Broeckhuijsen wrote: Many thanks for already pushing this early version of the client implementation! Actually, the client now works for me. You can't pass in all the options, yet (e.g. only 10 second test, local server port is 5001 for dual/tradeoff), but

Re: [lwip-users] WG: How to limit the UDP Rx packet size to avoid big RAM allocations

2018-06-21 Thread goldsi...@gmx.de
On 20.06.2018 09:49, R. Diez wrote: My TCP/IP and lwIP expertise are limited. Please help me understand the situation by correcting my assumptions: - The Ethernet driver has a fixed, limited number of DMA slots, so it already limits the amount of data at that level. - An Ethernet frame is

Re: [lwip-users] How to limit the UDP Rx packet size to avoid big RAM allocations

2018-06-19 Thread goldsi...@gmx.de
On 19.06.2018 18:11, Sergio R. Caprile wrote: UDP datagrams are carried by Ethernet frames. It is not lwIP but your driver who allocates memory to hold those frames before handling them to lwIP, which in turn will deliver to your application. The only way to stop allocation is there. Someone

Re: [lwip-users] lwIP iPerf client implementation

2018-06-15 Thread goldsi...@gmx.de
On 15.06.2018 20:24, Patrick van Broeckhuijsen wrote: Any thoughts about the client implementation for lwIP of iperf? I'Ve just pushed a patch that starts implementing client mode in lwiperf. I've had this lying around for a while now, but it's only the tx side for now (no dual or tradeoff

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

2018-06-15 Thread goldsi...@gmx.de
On 15.06.2018 15:34, Yigal Hochberg wrote: Hi Dirk, Somewhat related, I like and use the lwip-contrib/ports/win32 Specifically mingw/Makefile. I was surprised to see it was gone (unified). It is very convenient to build a test app using mingw/Makefile. Dirk has started to create cmake files

Re: [lwip-users] two logical ethernet interfaces on the same, physical port?

2018-06-15 Thread goldsi...@gmx.de
On 15.06.2018 09:45, Kamil Khoury wrote: Hi, I was able to find something on the internet which allows to implement layer 2 protocols in a socket using the SOCK_RAW. Unfortunately, this is a linux library which is described here: http://man7.org/linux/man-pages/man7/packet.7.html Packet

Re: [lwip-users] two logical ethernet interfaces on the same, physical port?

2018-06-14 Thread goldsi...@gmx.de
On 14.06.2018 16:13, Kamil Khoury wrote: I can distinguish the two logical Ethernet ports I created by netif_add() by giving them two different MAC addresses but the problem is that the destination MAC of all received messages is a MULTICAST address which means, the two logical interfaces

Re: [lwip-users] [lwip-devel] two logical ethernet interfaces on the same physical port?

2018-06-14 Thread goldsi...@gmx.de
As Sergio suggested, let's continue this on lwip-users. On 14.06.2018 14:58, goldsi...@gmx.de wrote: On 14.06.2018 14:51, Kamil Khoury wrote: Hi, My application requires having two logical Ethernet interfaces on the same physical port (as shown in the image). [.. embedded image, see http

Re: [lwip-users] tcp_write

2018-06-14 Thread goldsi...@gmx.de
On 14.06.2018 08:46, Amena El Homsi wrote: In tcp_write() function, why we don't allocate segments bigger than half the maximum window we ever received? Is this a LwIP requirement or TCP protocol requirement? This is to achieve decent throughput with remote hosts implementing delayed ack.

Re: [lwip-users] LwIP with SSH

2018-06-13 Thread goldsi...@gmx.de
On 13.06.2018 16:20, Elinux wrote: You say that we can implement an SSH server on our embraqué system using sockets, I did not understand too much and how to proceed! do you have any leads, or concrete examples with other protocols other than SSH that you know, No sorry, I do lwIP stuff, not

Re: [lwip-users] pbuf as a separate library.

2018-06-11 Thread goldsi...@gmx.de
On 07.06.2018 13:38, Wolcendorf, Marcin wrote: Did you consider making pbuf a separate library? No, not yet. But it's an interesting idea... I would like to use it in a project, that has 2 builds – one with LwIP, one without. ATM I would have to link LwIP in each case, which to me does not

Re: [lwip-users] TCP keep-alive not working on half-closed connections

2018-06-06 Thread goldsi...@gmx.de
On 06.06.2018 16:23, Joel Cunningham wrote: On 06/06/2018 07:45 AM, goldsi...@gmx.de wrote: On 06.06.2018 11:42, R. Diez wrote: [..] The trouble is, this changes the connection state (pcb->state) from ESTABLISHED to FIN_WAIT_1, which then turns quickly into FIN_WAIT_2. Afterwards, TCP k

Re: [lwip-users] TCP keep-alive not working on half-closed connections

2018-06-06 Thread goldsi...@gmx.de
On 06.06.2018 11:42, R. Diez wrote: [..] The trouble is, this changes the connection state (pcb->state) from ESTABLISHED to FIN_WAIT_1, which then turns quickly into FIN_WAIT_2. Afterwards, TCP keep-alive does not work anymore, because of this logic in tcp_slowtmr(): /* Check if KEEPALIVE

Re: [lwip-users] Getting Raw ARP Packets

2018-05-22 Thread goldsi...@gmx.de
On 22.05.2018 11:16, Jan Menzel wrote: Hi Dave! What you described looks like a bridge to me. If you don't have to process tcp/udp packets (send an receive data from your local device) you don't need lwip. +1 from me. This looks like hacking a proprietary way. The only answer I'll

Re: [lwip-users] IEEE 802.1x Support by LwIP

2018-05-22 Thread goldsi...@gmx.de
On 21.05.2018 22:49, yac...@dds-security.com wrote: Does LwIP support IEEE 802.1x? As Sergio wrote (and although this is an interesting protocol), this is out of scope for lwIP. We (mainly) handle IPv4 and IPv6 and upper protocols. 802.1X is on a lower level. Simon

Re: [lwip-users] Decode HTTP URI

2018-05-22 Thread goldsi...@gmx.de
On 22.05.2018 11:11, Giuseppe Modugno wrote: I'm not sure. Is there a decoding function for URI? I mean, a function that converts %20 and similar escape codes in the corresponding ASCII char. Our httpd does not (yet?) support this. If you really need spaces in URLs on your server, you need

Re: [lwip-users] Patch #40502 / Task #14270

2018-05-15 Thread goldsi...@gmx.de
On 15.05.2018 18:18, Claude Robitaille wrote: Hi Simon, I am not sure if this is the correct way (contacting you directly) Actually, it's not. Please write to the list instead. There may be more people looking for the same thing and writing to the list ensures everyone can read it and find

Re: [lwip-users] LwIP PPPoS source to use

2018-05-15 Thread goldsi...@gmx.de
On 15.05.2018 08:15, sarp wrote: What is the difference between LwIP PPPoS libraries? Which one should I use, that the STM32CubeMX gives or that the examples based on? If you ask here, the answer is: use the official lwIP sources, latest version. Use git master currently if possible. The next

Re: [lwip-users] Problem re-opening listening pbc

2018-05-14 Thread goldsi...@gmx.de
On 14.05.2018 18:27, Keith Rubow wrote: [..] I would like to have additional connection attempts to be refused. I can achieve this behavior only by closing the listening pcb once I reach the max number of connections, but then I can't re-open the listening pcb until ALL open connections are

Re: [lwip-users] How to send ARP package?

2018-05-01 Thread goldsi...@gmx.de
On 28.04.2018 16:54, Sebastian Gniazdowski wrote: I would want to send ARP package manually and then check how arp_table changed. How to accomplish this, should I use ethernet_output()? You could use 'etharp_request()'. But that should also be clear from reading the docs at

Re: [lwip-users] lwip + FreeRTOS socket sharing error

2018-04-26 Thread goldsi...@gmx.de
On 26.04.2018 19:49, alweib wrote: I'm having an issue sharing a TCP socket between two tasks in FreeRTOS (v. 7.0) and LWIP(v. 1.40). The versions of both lwIP and FreeRTOS you are using are pretty old. At least lwIP has numerous bugs fixed since then. [..] It should be noted that i read

Re: [lwip-users] Packets stop sending after a while when MEMP_OVERFLOW_CHECK isn't 2

2018-04-25 Thread goldsi...@gmx.de
On 25.04.2018 20:41, Sebastian Gniazdowski wrote: [..] However, now I've discovered that if I change the *_CHECK define to 0 or 1, then ca. 13000 packets are correctly sent, and after that the only packets sent are frequent (in each second) ARP queries (discovery of gate's MAC), as captured

Re: [lwip-users] Re-Transmission from PC is ignored due to sequence number

2018-04-23 Thread goldsi...@gmx.de
On 23.04.2018 17:08, Sergio R. Caprile wrote: Take a look at frame #22, my Wireshark says "previous segment info not captured" and its SEQ is 216. Previous device frame in capture is #19 with SEQ 178 and len 21, which is consistent with the PC ACKing 199 in frames #20/21. There is a missing

Re: [lwip-users] Re-Transmission from PC is ignored due to sequence number

2018-04-23 Thread goldsi...@gmx.de
On 23.04.2018 17:18, Patrick Klos wrote: [..] Thinking about the retransmission from PC side: Shouldn't lwip also do a retransmission of the lost frame? You know, these bytes never get acknowledged by PC. Yes, the LwIP side should have retransmitted the packet.  Packet 21 of the trace file

Re: [lwip-users] Help debugging IPv6 SLAAC

2018-04-19 Thread goldsi...@gmx.de
On 19.04.2018 14:45, thomasfogh wrote: I've changed my IPv4 only application to be IPv6 only. Right now it doesn't do anything but try to get an IPv6 address. What's your setting for LWIP_IPV6_MLD? I think I remember that you must explicitly join the "allnodes" group for this to work

Re: [lwip-users] DOXYGEN usage

2018-04-12 Thread goldsi...@gmx.de
On 12.04.2018 14:57, cookies_do wrote: Thank you for your answer. Yes, I have looked at it. So you might have noticed that someone has used Doxygen to generate the documentation? ;-) As I said, I am new with Doxygen and lwIP. Thats why I ask this question. Call 'doc/doxygen/generate.sh'

Re: [lwip-users] TCP Dup ACKs and TCP Window full

2018-04-10 Thread goldsi...@gmx.de
On 10.04.2018 22:04, Adrian Figueroa wrote: Ok, I do not usually take captures, so I did not know I can shorten them. I will try next time. You can. Check the options you have in "File" --> "export special packets..." (translated from my german GUI). Simon

Re: [lwip-users] TCP Dup ACKs and TCP Window full

2018-04-10 Thread goldsi...@gmx.de
On 10.04.2018 16:53, Adrian Figueroa wrote: [..] I had to upload them here, because they were rejected as an attachment due to size. That's not really true. You had to upload the files because noone wants to load ~300 kByte into their mail inbox just because you're too lazy to strip down

Re: [lwip-users] TCP Dup ACKs and TCP Window full

2018-04-10 Thread goldsi...@gmx.de
On 10.04.2018 16:53, Adrian Figueroa wrote: [..]I think, this problem is not caused by Lwip itself but probably a configuration error or some buffer that runs full. Maybe even a speed issue of the processor. I think it's a processor speed issue. Lost packets could be an lwIP configuration

Re: [lwip-users] TCP Dup ACKs and TCP Window full

2018-04-06 Thread goldsi...@gmx.de
On 06.04.2018 15:30, Adrian Figueroa wrote: I am writing a bootloader application that receives data over ethernet for flashing the processor it runs on. This is implemented on an STM32F746 running the ChibiOS-RTOS and the HAL drivers that come with it. Consequently, the netconn-api is used. I

Re: [lwip-users] Guide/example on moving from IPv4 to IPv6?

2018-04-06 Thread goldsi...@gmx.de
On 06.04.2018 11:56, thomasfogh wrote: I'm currently running an IPv4-only socket application with DHCP on my STM32F407 board and need to switch to IPv6 only with SLAAC. I can't find any example code for an IPv6-only socket application. Can anyone point me in the right direction on how to

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

2018-04-06 Thread goldsi...@gmx.de
On 05.04.2018 20:29, Keith Rubow wrote: I am trying to use lwip on ARM cortex M4. My development software is Atollic Truestudio on Win10. So far I have gotten lwip 1.4.1 to work using raw api and a simple multitasking OS. Now I am trying to change over to lwip 2.0.3, and am having trouble with

Re: [lwip-users] help with mDNS sending a DNS_RRTYPE_SRV query

2018-04-05 Thread goldsi...@gmx.de
On 05.04.2018 16:24, antonio wrote: I have a small application using MDNS, and I use the loopback interface. At the beginning the Thread1 starts the MDNS process, Wait, why are you talking about threads? You are using the callback API of lwIP, right? There should not be more than one thread

Re: [lwip-users] TCP break down with concurrent client accept

2018-04-01 Thread goldsi...@gmx.de
On 01.04.2018 01:26, Oldrich Kepka wrote: we run lwip-1.4.0 on PPC440 and experience rare random hanging of TCP Two things that I think are worth noting: a) 1.4.0 is really old. There have been numerous fixes since that. Can you reproduce the issue with current git master? b) 1.4.0 does not

Re: [lwip-users] FW: Problem with renewing DHCP after link down/up with the new LWIP V2.0.2

2018-03-30 Thread goldsi...@gmx.de
On 30.03.2018 13:01, simeon.trifo...@amk-drives.bg wrote: I replaced the function dhcp_renew() with dhcp_network_changed(). After power on, the dhcp works fine again (the complete log is attached). The first strange thing for me is the ARPs that follow. The devices askes who has IP address

Re: [lwip-users] FW: Problem with renewing DHCP after link down/up with the new LWIP V2.0.2

2018-03-30 Thread goldsi...@gmx.de
On 30.03.2018 10:40, simeon.trifo...@amk-drives.bg wrote: [..] Now I'm trying to reconnect the Ethernet cable to another network (different address area). The device sends a DHCP request which is a broadcast, but the source is the IP address of the device from the former network and probably as

Re: [lwip-users] using lwIP in commercial product

2018-03-29 Thread goldsi...@gmx.de
On 29.03.2018 18:27, santosh wrote: I apologize for digging into an old thred. Is there a page which had been built to show which commercial products/OEMs have used LWIP in them? None that I know of. Unfortunately, people don't come here to tell which version of lwIP they released in a

Re: [lwip-users] AUTOIP and DHCP operating at the same time.

2018-03-29 Thread goldsi...@gmx.de
On 29.03.2018 19:51, Roger Cover wrote: Is there an example of how to use AUTOIP and DHCP at the same time? Yes, have a look at the win32 port in contrib. I have had DHCP in my application for some time, but a customer now requires that I add AUTOIP as well. I am having difficulty making

Re: [lwip-users] Out of memory errors under load

2018-03-26 Thread goldsi...@gmx.de
On 27.03.2018 00:37, JM wrote: [..] Looking into ethernet_input(), p->ref is sometimes 1 and p->tot_len = 63 after ip_input(p, netif) (in my situation anyway) BUT p->tot_len was 107 before ip_input(p, netif); was called! This seems odd to me as I thought the pbuf is completely consumed and

Re: [lwip-users] Slow HTTP put request

2018-03-24 Thread goldsi...@gmx.de
On 24.03.2018 07:26, joc...@strohbeck.net wrote: [..] Attached is the pcap file. All I can tell is that the header and payload is split into 2 packets and using curl and labview the 2nd packet is received after a huge delay. I tested --no-delay and --no-buffer and added manually keep-alive to

Re: [lwip-users] Slow HTTP put request

2018-03-23 Thread goldsi...@gmx.de
On 23.03.2018 20:50, Jochen Strohbeck wrote: [..] I am able to reproduce the same problem using curl on windows and found out that even a PUT request with only a single byte payload takes about a second! If I do the same request with python it takes some milliseconds. Why? I guess the problem

Re: [lwip-users] Lwip 1.4.1 initialization

2018-03-21 Thread goldsi...@gmx.de
On 17.03.2018 00:08, Keith Rubow wrote: I am trying to use LwIP for the first time, and am having trouble figuring out what I need to do to properly initialize it. I am trying to run LwIP version 1.4.1 Hell, 1.4.1 is more than five years old. If you start something new, use *at least* 2.0.3!

Re: [lwip-users] MEM_SIZE

2018-03-14 Thread goldsi...@gmx.de
On 14.03.2018 16:42, Giuseppe Modugno wrote: I was experimenting with lwip memory allocator. I defined: #define MEM_LIBC_MALLOC  0 #define MEM_USE_POOLS  0 #define MEM_SIZE  (32 * 1024) #define LWIP_RAM_HEAP_POINTER  ( (void *)0x2007C000 ) I'm using LPC1768 that has a 32kB SRAM block

Re: [lwip-users] Problems when setting MEMP_MEM_MALLOC

2018-03-14 Thread goldsi...@gmx.de
On 14.03.2018 17:09, Giuseppe Modugno wrote: #define MEM_LIBC_MALLOC   1 If I try to set MEMP_MEM_MALLOC, I have some strange problems. I suspect threading issues. I checked on win32 and it seems to work fine. In the end, there's not really much lwIP does here, everything is delegated to

Re: [lwip-users] Delay grows after consecutive sends

2018-03-13 Thread goldsi...@gmx.de
On 12.03.2018 22:27, Brian dina wrote: Hello, I am using a Xilinx board with a Microblaze processor to run the echo_server example code.  I noticed that if I send 8 bytes at one second intervals that the delay from packets sent and packets received begins to grow.  I don't feel like its a

Re: [lwip-users] Set IP address as none

2018-03-13 Thread goldsi...@gmx.de
On 13.03.2018 16:21, Giuseppe Modugno wrote: I have ip4_addr_t and I want to set it to a "null"/invalid value. Is it better to use IPADDR_NONE or IPADDR_ANY? ANY! NONE is all ones and is only used in parsing functions returning "this is not a valid IP address". This is derived from

Re: [lwip-users] upgrade from 1.4.1 to 2.0.3

2018-03-07 Thread goldsi...@gmx.de
On 07.03.2018 17:40, Mattia Settin wrote: [..] The question is: It is now mandatory define/use sys_now() ? You can do without, but a number of features new to 2.0.x (or improved there) require it. Right now, the list is: - timeouts for NO_SYS==1 - LWIP_SO_SNDTIMEO - LWIP_SO_LINGER - lwiperf

Re: [lwip-users] tcp communication problem with server and client on different subnets

2018-03-06 Thread goldsi...@gmx.de
On 06.03.2018 04:24, lukasz139 wrote: [..] Is there any smart way to investigate that? Checking if any firewall on my way blocks? The best thing you can do when developing ethernet devices is to get yourself a TAP to see what your device sends and receives. If buying one is too expensive,

Re: [lwip-users] static get_socket

2018-03-05 Thread goldsi...@gmx.de
On 05.03.2018 14:41, Mattia Settin wrote: Dear All, I need to know the remote ip (remote_ip) of a speficif socket. Now i call the get_socket (removing the static attribute) and then point to the remote_ip: psock = get_socket(index); psock->conn->pcb.tcp->remote_ip.addr; The bad thing is that

Re: [lwip-users] Can serve only short webpages

2018-03-04 Thread goldsi...@gmx.de
On 03.03.2018 23:30, JM wrote: So now the only entry into lwIP is through low_level_input(). I've spent a good deal of time trying to debug this and where I got stuck was in  tcp_receive() where it calls pbuf_clen(), which returns MEMP_NUM_PBUF and that's where the underflow originates. If I

Re: [lwip-users] Can serve only short webpages

2018-03-03 Thread goldsi...@gmx.de
On 03.03.2018 16:26, JM wrote: Hi thanks for the reply. My main loop consists of while(1); only. Only the stack is running on the microcontroller and all interrupts going into lwIP (Ethernet Rx and periodic timer) So are you sure you enter lwIP functions only from one interrupt priority? With

Re: [lwip-users] Trying to work out DHCP issue

2018-02-27 Thread goldsi...@gmx.de
. no PHY or hardware issue), try wireshark to see what's wrong. Simon On Tue, Feb 27, 2018 at 11:39 AM, goldsimon <goldsi...@gmx.de <mailto:goldsi...@gmx.de>> wrote: Chris Seto wrote: >I have a custom board with an STM32F4, and a TLK110 running LwIP 2.0.3. >Th

Re: [lwip-users] TCP Configuration: Minimum received bytes for callback

2018-02-27 Thread goldsi...@gmx.de
On 27.02.2018 16:32, Yacob Hassidim wrote: Hello, I want to wait till at least 3 bytes were received by TCP. How the TCP minimum received bytes for callback is configured? That's not supported. You'll have to queue the rx pbufs yourself in your recv callback. Simon

Re: [lwip-users] Dealloc in fs_close_custom()?

2018-02-26 Thread goldsi...@gmx.de
On 26.02.2018 16:51, Giuseppe Modugno wrote: I read the examples in lwip-contrib, mainly genfiles_example.c. The dynamic memory allocated for the file content is freed in fs_close_custom(). However I couldn't explain why. Indeed, mostly if the content is small, it is completely sent in

Re: [lwip-users] LwIP configuration for directing LWIP_DEBUGF to user function

2018-02-25 Thread goldsi...@gmx.de
On 25.02.2018 16:28, Yacob Hassidim wrote: Helo Simon, Thank you for referring me to lwip-contrib. I downloaded the version contrib-2.0.1. I found that LWIP_DEBUG is defined as compilation parameters of project layer. Exactly. I didn’t find mention of LWIP_PLATFORM_DIAG. I use LwIP

Re: [lwip-users] dns: remember multiple IP addresses patch

2018-02-21 Thread goldsi...@gmx.de
On 21.02.2018 20:22, Jan Menzel wrote: If you want your client application to load-balance although the locally cached DNS entry has expired, I think a better approach would be to actually return all available IPs to the client and let it chose one (i.e. implement the random algorithm in your

Re: [lwip-users] dns: remember multiple IP addresses patch

2018-02-21 Thread goldsi...@gmx.de
On 21.02.2018 17:18, Jan Menzel wrote: Hi all! I'd like to share a small patch with you that allows the dns subsystem to remember and handle more then one IP address from response messages. It basically parses out all IP address and stores them in an array. It then returns a random

Re: [lwip-users] Multiple netifs: UDP broadcasts on a certain netif showing up on udps connected to a different netif

2018-02-21 Thread goldsi...@gmx.de
On 21.02.2018 14:39, Steinberg Michael wrote: seemingly the udp_input code is serving UDP broadcasts originating from a certain netif to UDP sockets/pcbs bound to the correct port on a different netif. I'm not aware of that, could you file a bug until this is sorted out? Patching udp.c:255

Re: [lwip-users] [OT] Minimize .html, .js and .css files

2018-02-20 Thread goldsi...@gmx.de
On 20.02.2018 16:35, Giuseppe Modugno wrote: Another OT. In order to reduce Flash space for the filesystem used by httpd, I'm thinking to reduce the size of .html, .css and .js files. This means removing comments, spaces (when not needed) and maybe changing variable names (from

Re: [lwip-users] [OT] httpd: download static files from an external HTTP server

2018-02-20 Thread goldsi...@gmx.de
On 20.02.2018 11:01, Giuseppe Modugno wrote: Il 20/02/2018 08:51, goldsi...@gmx.de ha scritto: On 20.02.2018 08:15, Giuseppe Modugno wrote: I think this isn't strictly related to lwip, but it's a request typical on electronic devices where lwip runs, i.e. devices with limited and restricted

Re: [lwip-users] httpd: how to redirect to a new address

2018-02-20 Thread goldsi...@gmx.de
On 19.02.2018 23:18, Jan Menzel wrote: Hi all! In our application we wont to allow the user to change the ip address of the server using a webpage. I wonder what would be the best way of doing that. At present we use a very basic webserver that servers a different page (with HTTP

Re: [lwip-users] Transmission stall after ARP broadcast

2018-02-19 Thread goldsi...@gmx.de
On 20.02.2018 08:33, Stephan Hilchenbach wrote: Hello, this problem was not caused by the LwIP stack, but by the Ethernet driver. It was solved with the help of the Ti support: https://e2e.ti.com/support/arm/sitara_arm/f/791/t/663155 The address lookup engine (ALE) processes all received

Re: [lwip-users] [OT] httpd: download static files from an external HTTP server

2018-02-19 Thread goldsi...@gmx.de
On 20.02.2018 08:15, Giuseppe Modugno wrote: I think this isn't strictly related to lwip, but it's a request typical on electronic devices where lwip runs, i.e. devices with limited and restricted resources. It is somewhat related to lwIP as you have to know how to create dynamic content.

Re: [lwip-users] Queueing up UDP packets in RAW api

2018-02-15 Thread goldsi...@gmx.de
Why don't you use pbuf_cat()? This uses the next pointer of the last pbuf in a chain. Simon On 15.02.2018 18:55, Michael Steinberg wrote: Hey, right, it was silly to even ask really ;) Would I cause considerable harm to the RAM-pool if I allocated the necessary storage for queueing

Re: [lwip-users] Transmission stall after ARP broadcast

2018-02-15 Thread goldsi...@gmx.de
On 15.02.2018 16:05, Stephan Hilchenbach wrote: Hello Experts, I have a problem with my Ethernet driver connecting a Ti AM335x CPSW switch to the LwIP stack v1.4.1. 1.4.1 is rather old. There have been numerous bugs fixed since then. The port stops transmitting after some minutes or

Re: [lwip-users] NETIF_FLAG_DHCP flag removed

2018-02-12 Thread goldsi...@gmx.de
On 12.02.2018 10:57, Mattia Settin wrote: Dear all I upgrading my system from lwip 1.4.1 to 2.0.3. I note that the NETIF_FLAG_DHCP flag was removed. Unfortunately I can find any note in the change log. Do you have idea how maintain the flags (i.e. previus compatibily) ? No, that flag got

Re: [lwip-users] missing definition for mem_perf_init()

2018-02-07 Thread goldsi...@gmx.de
On 07.02.2018 17:48, vinay s wrote: My clone is a week old, I tried enabling MEM_PERF (unix port) and realized there is no def for mem_perf_init(). Not sure if I saw something to the effect in wiki either. Any ideas? My idea would be that that's orphaned code. There's no such thing as

Re: [lwip-users] Tcp retransmission with pppos using lwip 2.0.3

2018-02-01 Thread goldsi...@gmx.de
Are you running over pppos or not? Why did your remove "pppos" from the 2nd mail? On 01.02.2018 12:49, Kiran wrote: Hi, I'm using lwip 2.0.3 with freertos. I'm running tcp server in my Linux pc and tcp client on atmel microcontroller with lwip 2.0.3. I got succeeded in establishing a

Re: [lwip-users] Best way for determining if a TCP connection is dead?

2018-01-24 Thread goldsi...@gmx.de
On 24.01.2018 18:16, Joel Cunningham wrote: On 01/24/2018 10:35 AM, Chris Seto wrote: I have some code which works great, based on the echo client example. I'm working on hardening it, and I'm wondering with how best to deal with a dead TCP connection as a result of the network link being

Re: [lwip-users] LWIP never tries to send a packet?

2018-01-18 Thread goldsi...@gmx.de
On 18.01.2018 17:46, Chris Seto wrote: Hi, I'm using LwIP 2.0 running on an STM32F4 with a TI TLK110 ethernet PHY. I've written the driver for the PHY and corrected the definitions within the STM32 HAL such that the PHY is initialized correctly. When low_level_init() returns, the link is

Re: [lwip-users] LWIP never tries to send a packet?

2018-01-18 Thread goldsi...@gmx.de
On 18.01.2018 18:31, Noam Weissman wrote: Hi Chris, I am not working with ST HAL, rather with the older SPL (standard peripheral library). I do not know why you needed to change the PHY driver as all the standard PHY’s that are IEEE compatible will work the same. Noam, that's simply

Re: [lwip-users] Memory alignment and DMA controllers

2018-01-15 Thread goldsi...@gmx.de
On 12.01.2018 13:20, Will Wykeham wrote: [..] The possible ways of fixing it that I have come up with are: (1) Change the argument in pbuf_alloc where it passes the pointer to pbuf_init_alloced_pbuf from: LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)) To:

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

2017-12-05 Thread goldsi...@gmx.de
Jochen Strohbeck wrote: [..] For productive system I'm afraid that I have to claim on 1.4.1 for now. Please be warned again, especially for productive systems: if you have any focus on security (and for a device with an ethernet connection, you should), don't use 1.4.1 but use at least 2.0.3

Re: [lwip-users] Router log not showing IPV6 hostname and ip generated in stm32

2017-11-28 Thread goldsi...@gmx.de
Meera wrote: I have established communication between tcp client and server via IPv6 , for that ipv6 ip generated in stm32 board. That is working alright , but the problem is, IPv6 ip is not there in router's log, ipv4 ip i there. see below screenshots.

Re: [lwip-users] How to use LWIP_HTTPD_FS_ASYNC_READ

2017-11-27 Thread goldsi...@gmx.de
Giuseppe Modugno wrote: [..] Why the server should close the connection when the Content Length header is not send? Because the client cannot reuse this connection to send more requests as it doesn't know when the server is finished. HTTP is defined to either get the content length from the

Re: [lwip-users] TCP_WRITE_FLAG_MORE, tcp_write(), tcp_output() and real output TCP segment

2017-11-23 Thread goldsi...@gmx.de
Giuseppe Modugno wrote: For example, httpd usually calls tcp_output() after http_send(), except when http_send() is called from http_recv(). From what you write, it's better to call tcp_output() even in http_recv(). You got that wrong. It's not better. What I meant is it doesn't harm (other

Re: [lwip-users] Problem with TCP Connect.

2017-11-23 Thread goldsi...@gmx.de
antonio wrote: [..] (*Bellow I provide Wireshark traces*) When sharing wireshark traces, please create a pcap that includes only the necessary excerpt and attach it here. Wireshark screenshots or packet summary logs don't really help much. Thanks, Simon

Re: [lwip-users] TCP_WRITE_FLAG_MORE, tcp_write(), tcp_output() and real output TCP segment

2017-11-22 Thread goldsi...@gmx.de
Giuseppe Modugno wrote: I'm sorry for the second email. I noticed in tcp_output(): /**/* First, check if we are invoked by the TCP input processing// // code. If so, we do not output anything. Instead, we rely on the// // input processing code to call us when input

Re: [lwip-users] TCP_WRITE_FLAG_MORE, tcp_write(), tcp_output() and real output TCP segment

2017-11-22 Thread goldsi...@gmx.de
Giuseppe Modugno wrote: I'm trying to understand the mechanisms under TCP_WRITE_FLAG_MORE, tcp_write() and tcp_output(). I'm using raw API. First of all, I couldn't understand if tcp_output() is useful or not. Why do you think all the world would call tcp_output() if it's not useful? I

Re: [lwip-users] TCP retransmission

2017-11-22 Thread goldsi...@gmx.de
Nikolas Karakotas wrote: True for not providing enough information. Deducing wireshark information I can say: 1. Remote host send a Modbus request 2. For whichever reason we don't respond to it as it may have been lost because of network or Ethernet driver 3. The remote host then re sends the

<    1   2   3   4   5   6   7   8   9   10   >