Coder Social home page Coder Social logo

lwip-linux's Introduction

lwip-linux

This is a version of lwip running on Ubuntu

1. Ubuntu Setup

Install libpcap-dev

sudo apt-get install libpcap-dev

2. Compile

Go to the folder ./Debug, then run:

make clean; make

3. Run tests

Must be run under root user

3.1 Echo server test

Under the header file ./lwip-2.0.2/test/linux/lwip.h, set TEST_ID to ECHO_SERVER

    #define TEST_ID 	ECHO_SERVER

Then, re-compile the source code, and run the lwip-linux app. Use puty to connect to server at port 6677.

3.2 TCP client test

Under the header file ./lwip-2.0.2/test/linux/lwip.h, set TEST_ID to TCP_CLIENT

    #define TEST_ID 	TCP_CLIENT

Then, re-compile the source code, and run the lwip-linux app.

Notes:

  • The remote server address is being hard code at "192.168.2.12", we can modify this address via macro TCP_REMOTE_SERVER_ADDR under ./lwip-2.0.2/test/linux/lwip.h.
  • Remote server port is 6677, it can be changed via macro TCP_REMOTE_SERVER_PORT.

4. Other notes

  • lwip-linux only supports 32 local server ports from 6677 to 6709. When we create a tcp server, please use the server port in this range.
  • For local client ports, the lwip-linux supports to allocate port in range from 49152 to 49184.

lwip-linux's People

Contributors

f0provn avatar haohd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lwip-linux's Issues

Too many duplicate ACK with ECHO_SERVER example

My environment is Multipass Ubuntu 22.04, on macOS Monterey. Echo server example seems to work just fine over telnet, but I am seeing lots of duplicate ACKs on Wireshark capture. Just sending one message "hello", there are about 4000 lines of duplicate ACKs. Please see screenshot attached:

Screen Shot 2023-10-08 at 10 36 49 PM

consistancy in client server

hi,
I am using these lwip code and creating a client and server code.When i am sending and receiving continuously (in loop) data its not able to send . i have got these error ,
1) "Assertion "tcp_receive: valid queue length" failed at line 1191 in ../lwip-2.0.2/src/core/tcp_in.c
Aborted (core dumped)"
2)Assertion "unsent_oversize mismatch (pcb->unsent is NULL)" failed at line 549 in ../lwip-2.0.2/src/core/tcp_out.c
Segmentation fault (core dumped)

if i am providing sleep at the time of sending a data then its working fine but i don't want to use sleep i want send data continuously.
please suggest me ,how can i resolve these issue .
Thanks Team.

Compilation Error

Hello,
I got redefinition errors like:

../lwip-2.0.2/src/include/lwip/inet.h:58:8: error: redefinition of ‘struct in_addr’
   58 | struct in_addr {
      |        ^~~~~~~
In file included from /usr/include/netdb.h:27,
                 from /usr/include/pcap/socket.h:59,
                 from /usr/include/pcap/pcap.h:130,
                 from /usr/include/pcap.h:43,
                 from ../lwip-2.0.2/src/arch/netif.c:29:
/usr/include/netinet/in.h:31:8: note: originally defined here
   31 | struct in_addr
      |        ^~~~~~~
In file included from ../lwip-2.0.2/test/linux/lwip.h:15,
                 from ../lwip-2.0.2/src/arch/netif.c:30:

Can you help me please?

Regards,

Does this port work in Raspberry ?

As Raspberry uses linux (kind of) I wonder if this can be used on Raspberry Pi. I'm not sure if this port is specific of computer hardware.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.