Code Monkey home page Code Monkey logo

lwip_port's Introduction

一、移植参考

lwip 官方有提供 linux 下的移植项目,代码路径为:lwip/contrib/ports/unix/

可直接在该目录下编译执行:

# 安装依赖
sudo apt install bridge-utils

cd lwip

# 在 Linux 上 lwip 默认使用 tap0 
sudo ./contrib/ports/unix/setup-tapif

cp ./contrib/examples/example_app/lwipcfg.h.example ./contrib/examples/example_app/lwipcfg.h

# 修改文件的配置
vim ./contrib/examples/example_app/lwipcfg.h
# 1. 第 19 行的 /* #define USE_DHCP    0 */
#define USE_DHCP 0
# 2. 第 20 行的 /* #define USE_AUTOIP  0 */
#define USE_AUTOIP 0
# 3. 第 58 行的 LWIP_PING_APP
#define LWIP_PING_APP                 1

# 修改文件的选项
vim ./contrib/examples/example_app/lwipopts.h
# 1. 第 40 行的 LWIP_IPV6
#define LWIP_IPV6                  0
# 2. 第 77 行定义一个宏 LWIP_DEBUG
#define LWIP_DEBUG

cd ./contrib/ports/unix/example_app

cmake -B build -DLWIP_DIR=../../../../
cmake --build build
sudo ./build/example_app

lwip_port's People

Contributors

zeepunt avatar

Stargazers

brenton avatar

Watchers

 avatar

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.