lwip | A Lightweight TCP/IP stack | Networking library

 by   russdill C Version: Current License: Non-SPDX

kandi X-RAY | lwip Summary

kandi X-RAY | lwip Summary

lwip is a C library typically used in Networking applications. lwip has no bugs, it has no vulnerabilities and it has low support. However lwip has a Non-SPDX License. You can download it from GitHub.

lwip is a small independent implementation of the tcp/ip protocol suite that has been developed by adam dunkels at the computer and networks architectures (cna) lab at the swedish institute of computer science (sics). the focus of the lwip tcp/ip implementation is to reduce the ram usage while still having a full scale tcp. this making lwip suitable for use in embedded systems with tens of kilobytes of free ram and room for around 40 kilobytes of code rom. lwip is freely available under a bsd license. lwip has grown into an excellent tcp/ip stack for embedded devices, and developers using the stack often submit bug fixes, improvements, and additions to the stack to further increase its usefulness. development of lwip is hosted on savannah, a central point for software development, maintenance and distribution. everyone can help improve lwip by use of savannah's interface, cvs and the mailing list. a core team of developers will commit changes to the cvs source tree. the lwip tcp/ip stack
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              lwip has a low active ecosystem.
              It has 94 star(s) with 24 fork(s). There are 16 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              lwip has no issues reported. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of lwip is current.

            kandi-Quality Quality

              lwip has 0 bugs and 0 code smells.

            kandi-Security Security

              lwip has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              lwip code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              lwip has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              lwip releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lwip
            Get all kandi verified functions for this library.

            lwip Key Features

            No Key Features are available at this moment for lwip.

            lwip Examples and Code Snippets

            No Code Snippets are available at this moment for lwip.

            Community Discussions

            QUESTION

            STM32 & lwIP - SHTML page not rendering - source code displayed instead
            Asked 2022-Jan-02 at 14:19

            I'm trying to get an SSI page running on my STM32 using lwIP. When I open a .html page all is displayed fine. But .shtml pages will not be rendered and only the source code becomes visible.

            This post leads me to look for the mimetype using wget:

            ...

            ANSWER

            Answered 2022-Jan-02 at 14:19

            Ok - I found it. The mimetype was set by the Perl script makefsdata. There was no rule for shtml file endings. So I added the rule to the header:

            Source https://stackoverflow.com/questions/70468042

            QUESTION

            MQTT Client application with lwip (MQTT_CONNECT_DISCONNECTED)
            Asked 2021-Dec-27 at 12:00

            I try implementation of MQTT client on ATSAME53N20A. I achieved wih succes tcp-ip server-client application with lwip bsd socket api before. But this time some things going wrong despite of I follow the lwip MQTT documentation. I use mosquitto mqtt broker on same network with pc.

            Firstly I did initialization like tcpip, ethernet_link etc. Later, I have a "mqtt_new" task.

            ...

            ANSWER

            Answered 2021-Dec-27 at 12:00

            I solved this problem. When I changed the following definition that was included in mqtt_connect task, the problem was solved.

            Source https://stackoverflow.com/questions/70461765

            QUESTION

            CMake and ESP-IDF: Creating custom components
            Asked 2021-Nov-18 at 11:27

            Framework:

            ESP-IDF v4.3.1 - Eclipse Plugin

            Project with 1 active component (my plan is to add ble scanning, mqtt messaging and wifi access)

            ...

            ANSWER

            Answered 2021-Nov-18 at 11:27

            You have a naming conflict. You're trying to create a custom component named mqtt which requires the system component named mqtt and you expect the build system to figure it out. That's just asking for trouble :)

            Name your component myproject-mqtt or something. Watch out for similar problems with your components wifi and ble.

            Source https://stackoverflow.com/questions/70011677

            QUESTION

            Why does DSB not flush the cache?
            Asked 2021-Oct-23 at 06:42

            I'm debugging an HTTP server on STM32H725VG using LWIP and HAL drivers, all initially generated by STM32CubeMX. The problem is that in some cases data sent via HAL_ETH_Transmit have some octets replaced by 0x00, and this corrupted content successfully gets to the client.

            I've checked that the data in the buffers passed as arguments into HAL_ETH_Transmit are intact both before and after the call to this function. So, apparently, the corruption occurs on transfer from the RAM to the MAC, because the checksum is calculated on the corrupted data. So I supposed that the problem may be due to interaction between cache and DMA. I've tried disabling D-cache, and then the corruption doesn't occur.

            Then I thought that I should just use __DSB() instruction that should write the cached data into the RAM. After enabling D-cache back, I added __DSB() right before the call to HAL_ETH_Transmit (which is inside low_level_output function generated by STM32CubeMX), and... nothing happened: the data are still corrupted.

            Then, after some experimentation I found that SCB_CleanDCache() call after (or instead of) __DSB() fixes the problem.

            This makes me wonder. The description of DSB instruction is as follows:

            Data Synchronization Barrier acts as a special kind of memory barrier. No instruction in program order after this instruction executes until this instruction completes. This instruction completes when:

            • All explicit memory accesses before this instruction complete.
            • All Cache, Branch predictor and TLB maintenance operations before this instruction complete.

            And the description of SCB_DisableDCache has the following note about SCB_CleanDCache:

            When disabling the data cache, you must clean (SCB_CleanDCache) the entire cache to ensure that any dirty data is flushed to external memory.

            Why doesn't the DSB flush the cache if it's supposed to be complete when "all explicit memory accesses" complete, which seems to include flushing of caches?

            ...

            ANSWER

            Answered 2021-Oct-22 at 12:20

            dsb ish works as a memory barrier for inter-thread memory order; it just orders the current CPU's access to coherent cache. You wouldn't expect dsb ish to flush any cache because that's not required for visibility within the same inner-shareable cache-coherency domain. Like it says in the manual you quoted, it finishes memory operations.

            Cacheable memory operations on write-back cache only update cache; waiting for them to finish doesn't imply flushing the cache.

            Your ARM system I think has multiple coherency domains for microcontroller vs. DSP? Does your __DSB intrinsic compile to a dsb sy instruction? Assuming that doesn't flush cache, what they mean is presumably that it orders memory / cache operations including explicit flushes, which are still necessary.

            Source https://stackoverflow.com/questions/69676614

            QUESTION

            Passing std::string as input to getopt()
            Asked 2021-Sep-23 at 22:27

            I have a program that basically looks like this:

            ...

            ANSWER

            Answered 2021-Sep-14 at 15:24

            Using wordsexp.h solved the issue by parsing the string correctly for getopt().

            Essentially:

            Source https://stackoverflow.com/questions/69178005

            QUESTION

            Not receiving data in LCP(PPPoS) phase over UART(ESP-32 -> Sim7600)
            Asked 2021-Sep-21 at 07:47

            On my ESP32 I am having trouble creating a working PPP interface to my ISP. I am using an ESP-32 Ethernet kit and have it hooked up to a Simcom EVB Kit with a Sim7600G chip. With this hardware I am using ESP-IDF in combination with LWIP to get the PPP connection going. At first I have to send all the corresponding AT commands to make sure it is actually ready for a PPP connection. These AT Commands are the following:

            ...

            ANSWER

            Answered 2021-Sep-21 at 07:47

            I have not found the solution to this problem with the mentioned frameworks. Instead I reverted to another dependency from the ESP-IDF: esp-modem. I managed to get a working solution by following the pppos-client and modem-console examples within my current software.

            Source https://stackoverflow.com/questions/69193573

            QUESTION

            CMakeLists - How to include a directory of source and header files?
            Asked 2021-Jul-09 at 16:35

            I feel like this question has been asked a bunch of times, but none of the answers I have found seem to be working for me. I'm extremely new to CMake and C/C++ as I come from the world of Java, and am struggling to understand cmake and how it works.

            Anyways, basically I have the folder structure below. This is an esp-idf project, so I don't know if that has anything to do with what I'm running into.

            ...

            ANSWER

            Answered 2021-Jul-09 at 13:46

            The ESP-IDF build system is built on top of CMake. This means you can use all the standard features of CMake in your files. However, the the ESP-IDF system predefines many functions, and makes many assumptions about the layout of your project, supposedly to make things "easier". Instead of reading CMake documentation, start by reading and understanding the ESP-IDF build system documentation:

            https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html

            It looks to me like there is a particular layout expected for subcomponents, including the format of the CMakeLists.txt file. Specifically, move Metriful under a new directory called components, or add Metriful to EXTRA_COMPONENT_DIRS near the top of your root CMakeLists.txt

            If Metriful is not written as an esp-idf component, this may not work. However, the document also describes how to link to "pure CMake" components, which will look something like this (at the end of your root CMakeLists.txt).

            Source https://stackoverflow.com/questions/68317455

            QUESTION

            Call C++ function from (C) header file gives linker error
            Asked 2021-May-14 at 14:15

            I am integrating a library (lwip) and I want to reroute the logging mechanism from printf to something I wrote myself (which logs directly to my uart).

            In some header file the following code exists

            ...

            ANSWER

            Answered 2021-May-14 at 14:15

            extern "C" void logLineToUart(const char * log, ...);

            You need to tell it to make the name C-linker compatible the first time it is seen.

            update

            The extern "C" is only when compiling as C++. It is not legal syntax in C. You can use extern by itself (it is implied if you leave it off).

            Editorial

            That's not very friendly... C++ accommodates sharing header files with C by accepting syntax that would not apply to C++, just to make it easy to use the same header file contents. In particular, using (void) for empty parameter lists (which is "an abomination") and allowing a comma in variadic function parameter lists ( (int x ...) is how C++ originally defined it; when the same feature got incorporated into ANSI C they used (int x, ...) with a superfluous comma that is not needed by the grammar.) C++ compilers accept both of these to make it easier to consume C headers...

            But, you have to add extern "C" around everything. This introduces conditional compilation anyway, even though C++ accepts the C syntax. Note that for a single declaration, extern int foo (int); the extern is allowed and implied if you leave it out. If the C compiler allowed the linkage specification even though only "C" is available, it would make life easier. Note that in most cases, the C and C++ implementation are the same compiler suite, and often one language supports some features of the other as extensions. It would be cool if gcc etc. supported extern "C++" in C mode, since that code base certainly does know how the name encodes the parameters.

            Source https://stackoverflow.com/questions/67522227

            QUESTION

            Sending image from node.js server to ESP32 using ESP-IDF
            Asked 2021-May-11 at 05:08

            I'm trying to send an image from a node.js server to ESP32 chip using WIFI and ESP-IDF. I believe this transfer happens over a TCP/IP connection. I'm able to send a regular text data using a http get request or the http_perform_as_stream_reader function shown below. But when it comes to transferring an image from the node.js server, I'm unable to do so. I seem to be receiving garbage on the client side. The ultimate goal is to save the image into a spiffs file on ESP32. Here's my code:

            Server side:

            ...

            ANSWER

            Answered 2021-May-11 at 05:08

            Application should not assume that esp_http_client_read reads same number of bytes specified in the length argument. Instead, application should check the return value of this API which indicates number of bytes read by corresponding call. If the return value is zero, it indicates that complete data is read.

            To work correctly, application should call esp_http_client_read in a while loop with a check for return value of esp_http_client_read.

            You can also use esp_http_client_read_response, which is a helper API for esp_http_client_read to internally handle the while loop and read complete data in one go.

            Please refer http_native_request example which uses esp_http_client_read_response() API.

            Source https://stackoverflow.com/questions/67159281

            QUESTION

            Invalid HTTP response from webserver through port forward on modem
            Asked 2021-May-03 at 14:50

            I'm currently building an embedded device that uses the open source light-weight IP package (lwIP) to host a static webserver to clients using html files and http requests. lwIP is somewhat different than a normal webserver because it is bare bones and configured to serve these files through a NOSYS declaration.

            In an extremely simple scenario, I'm trying to host this file (index.html):

            ...

            ANSWER

            Answered 2021-Apr-29 at 15:24

            What you have pasted are the request headers that your browser sends to the server. The problem is with the response headers that the embedded server sends back. In particular the Content-Type header isn't correct. It should look something like:

            Source https://stackoverflow.com/questions/67318906

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install lwip

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/russdill/lwip.git

          • CLI

            gh repo clone russdill/lwip

          • sshUrl

            git@github.com:russdill/lwip.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Networking Libraries

            Moya

            by Moya

            diaspora

            by diaspora

            kcptun

            by xtaci

            cilium

            by cilium

            kcp

            by skywind3000

            Try Top Libraries by russdill

            tunsocks

            by russdillC

            juniper-vpn-py

            by russdillPython

            pybis

            by russdillPython

            darter

            by russdillPython