LwIP

Started by tha, August 29, 2021, 09:15:30 AM

Previous topic - Next topic

tha

https://www.nongnu.org/lwip/2_1_x/index.html

Overview

INTRODUCTION

lwIP เป็น a small independent implementation ของ the TCP/IP protocol suite.

จุดเน้นอง the lwIP TCP/IP implementation คือลด the RAM usageในขณะที่ยังคงมี a full scale TCP. นี้ทำให้ lwIP เหมาะสมสำหรับใช้ใน embedded systems ที่มี tens of kilobytes of free RAM และที่ว่างสำหรับประมาณ 40 kilobytes of code ROM.

lwIP ถูกพัฒนาเริ่มแรกโดย Adam Dunkels ที่ the Computer and Networks Architectures (CNA) lab ที่ the Swedish Institute of Computer Science (SICS) และขณะนี้ถูกพัฒนาและดูแลโดย a worldwide network of developers.

FEATURES

  * IP (Internet Protocol, IPv4 and IPv6) including packet forwarding over
    multiple network interfaces
  * ICMP (Internet Control Message Protocol) for network maintenance and debugging
  * IGMP (Internet Group Management Protocol) for multicast traffic management
  * MLD (Multicast listener discovery for IPv6). Aims to be compliant with
    RFC 2710. No support for MLDv2
  * ND (Neighbor discovery and stateless address autoconfiguration for IPv6).
    Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862
    (Address autoconfiguration)
  * DHCP, AutoIP/APIPA (Zeroconf) and (stateless) DHCPv6
  * UDP (User Datagram Protocol) including experimental UDP-lite extensions
  * TCP (Transmission Control Protocol) with congestion control, RTT estimation
    fast recovery/fast retransmit and sending SACKs
  * raw/native API for enhanced performance
  * Optional Berkeley-like socket API
  * TLS: optional layered TCP ("altcp") for nearly transparent TLS for any
    TCP-based protocol (ported to mbedTLS) (see changelog for more info)
  * PPPoS and PPPoE (Point-to-point protocol over Serial/Ethernet)
  * DNS (Domain name resolver incl. mDNS)
  * 6LoWPAN (via IEEE 802.15.4, BLE or ZEP)


APPLICATIONS

  * HTTP server with SSI and CGI (HTTPS via altcp)
  * SNMPv2c agent with MIB compiler (Simple Network Management Protocol), v3 via altcp
  * SNTP (Simple network time protocol)
  * NetBIOS name service responder
  * MDNS (Multicast DNS) responder
  * iPerf server implementation
  * MQTT client (TLS support via altcp)

tha

LICENSE

lwIP มีให้ใช้เป็นประโยชน์ได้ฟรีภายใต้ a BSD license.

DEVELOPMENT

lwIP ได้เติบโตขึ้นเป็น an excellent TCP/IP stack สำหรับ embedded devices,
และ developers ที่ใช้ the stack มักจะส่ง bug fixes, improvements,
and additions ไปยัง the stack เพื่อเพิ่มการใช้ประโยชน์ของมันต่อไป.

Development of lwIP ถูกเป็นเจ้าภาพบน Savannah, a central point สำหรับ
software development, maintenance and distribution. ทุกๆคนสามารถ
ช่วยปรับปรุง lwIP โดยใช้ Savannah's interface, Git and the
mailing list. A core team of developers จะผูกมัดการเปลี่ยนแปลงไปยัง the
Git source tree.

The lwIP TCP/IP stack ถูกดูแลใน the 'lwip' Git module และ
การสนับสนุน (อย่างเช่น platform ports) อยู่ใน the 'contrib' Git module.

ดู doc/savannah.txt สำหรับรายละเอียดเกี่ยวกับ Git server เข้าถึงได้สำหรับ users และ
developers.

The current Git trees เป็น web-browsable:
http://git.savannah.gnu.org/cgit/lwip.git
http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git

ส่ง patches และ bugs โดยทาง the lwIP project page:
http://savannah.nongnu.org/projects/lwip/

Continuous integration builds (GCC, clang):
https://travis-ci.org/yarrick/lwip-merged

tha

DOCUMENTATION

Self documentation ของ the source code ถูกดึงออกเป็นประจำจาก the current
Git sources และมีให้ใช้เป็นประโยชน์จาก web page นี้:
http://www.nongnu.org/lwip/

ขณะนี้มีการเติบโตอย่างต่อเนื่อง wiki เกี่ยวกับ lwIP ที่
http://lwip.wikia.com/wiki/LwIP_Wiki

นอกจากนี้, มี mailing lists คุณสามารถสมัครได้ที่
http://savannah.nongnu.org/mail/?group=lwip
บวก searchable archives:
http://lists.nongnu.org/archive/html/lwip-users/
http://lists.nongnu.org/archive/html/lwip-devel/

lwIP เริ่มแรดถูกเขียนโดย Adam Dunkels:
http://dunkels.com/adam/

การอ่าน Adam's papers, the files ใน docs/, เรียกดู the source code
documentation และเรียกดู the mailing list archives เป็นวิธีที่ดีเพื่อ
กลายมาเป็นความคุ้นเคยกับ the design of lwIP.

Adam Dunkels <adam@sics.se>
Leon Woestenberg <leon.woestenberg@gmx.net>


tha

ข้าม Upgrading กับ Changelog ไปก่อนนะ ยังไม่รู้เรื่องเลย ยาก ยังไม่ได้ใช้ด้วย เอาเรื่องอื่นก่อน

https://www.nongnu.org/lwip/2_1_x/contrib.html

How to contribute to lwIP

1 Introduction

เอกสารนี้อธิบายแนวทางบางประการสำหรับผู้ที่เข้าร่วม
ใน lwIP development.

2 How to contribute to lwIP

นี่คือรายการคำแนะนำสั้น ๆ สำหรับทุกคนที่ทำงานกับ lwIP และ
พยายามมีส่วนร่วมใน bug reports, fixes, enhancements, platform ports etc.
ก่อนอื่นอย่างที่คุณรู้อยู่แล้วว่า lwIP เป็น a volunteer project ดังนั้นข้อเสนอแนะ
การแก้ไขหรือคำถามมักจะมาช้า. หวังว่า the bug and patch tracking
features ของ Savannah ช่วยให้เราไม่สูญเสีย users' input.

tha

2.1 Source code style:

1. ห้ามใช้ tabs.
2. การเยื้องคือสองช่องว่างต่อระดับ (เช่นต่อ tab).
3. สิ้นสุด debug messages ด้วย a trailing newline (\n).
4. หนึ่งช่องว่างระหว่างคำหลักและวงเล็บเปิด
5. ไม่มีช่องว่างระหว่างฟังก์ชันและวงเล็บเปิด
6. หนึ่งช่องว่างและไม่มีการขึ้นบรรทัดใหม่ก่อนเปิดวงเล็บปีกกาของบล็อก
7. ปิดเครื่องหมายปีกกาโค้งบนเส้นเดียว
8. ช่องว่างโดยรอบการมอบหมายและการเปรียบเทียบ
9. อย่าเริ่มต้น static และ/หรือ global variables เป็นศูนย์, the compiler จะดูแลสิ่งนั้น.
10. ใช้ current source code style เป็นตัวอ้างอิงต่อไป.

tha

2.2 Source code documentation style:

1. สอดคล้องกับ JavaDoc และเข้ากันได้กับ Doxygen
2. Function documentation อยู่บน functions ใน .c files, ไม่ใช่ .h files.
   (สิ่งนี้บังคับให้คุณซิงโครไนซ์ documentation และ implementation.)
3. ใช้ current documentation style เป็นตัวอ้างอิงต่อไป.

tha

2.3 Bug reports and patches:

1. ทำให้แน่ใจว่าคุณกำลังรายงาน bugs หรือส่ง patches ตรงกับ the latest
   sources. (จาก the latest release และ/หรือ the current Git sources.)
2. หากคุณคิดว่าคุณพบ a bug ทำให้แน่ใจว่ามันยังไม่ได้ใส่ไฟล์แล้วใน the
   bugtracker ที่ Savannah.
3. ถ้าคุณมีการโปรแกรมแก้ไขให้ใส่ the patch บน Savannah. ถ้ามันเป็น a patch ที่ส่งผลกระทบ
   ทั้ง core และ arch ระบุ stuff โปรดแยกพวกมันเพื่อว่า the core สามารถ
   ถูกใช้งานแยกได้ในขณะที่ปล่อยให้ the other patch 'open'. วิธีที่ต้องการ
   คือ NOT แตะต้อง archs คุณไม่สามารถตรวจสอบและปล่อยให้ maintainers ดูแลรับผิดชอบพวกมัน.
   นี้เป็นวิธีที่ดีเพื่อดูถ้าพวกมันถูกใช้หรือไม่ - เช่นเดียวกันกับสำหรับ unix
   netifs ยกเว้น tapif.
4. อย่าส่ง a bug และโพสต์ a fix ถึงมันไปยัง the patch area. อย่างใดอย่างหนึ่ง a bug report
   หรือ a patch จะเพียงพอ.
ถ้าคุณทำให้ถูกต้อง an existing bug ให้แนบ the patch ไปยัง the bug แทนที่จะสร้าง a new entry ใน the patch area.
5. Patches ควรถูกระบุเป็น a single change หรือเป็น related changes. อย่าผสม bugfixes ด้วย spelling และ
   trivial fixes อื่นๆยกเว้น the bugfix เล็กน้อยเช่นกัน. อย่าจัดระเบียบใหม่ code และเปลี่ยนชื่อ identifiers ใน the same patch ที่คุณ
   เปลี่ยนพฤติกรรมถ้าไม่จำเป็น. A patch ง่ายต่อการอ่านและเข้าใจกว่าถ้ามันตรงประเด็นและส้นกว่า
   ถ้ามันไม่ตรงประเด็นและยาว :) ดังนั้นโอกาศสำหรับมันถูกนำไปใช้จึงมีมากขึ้น.

tha

2.4 Platform porters:

1. ถ้าคุณพอร์ต lwIP ไปยัง a platform (an OS, a uC/processor หรือการรวมกันของพวกมัน) และ
   คุณคิดว่ามันเป็นประโยชน์ต่อคนอื่น[1] คุณอาจต้องการพูดคุยเรื่องนี้บน the mailing list. คุณ
   ยังสามารถขอสำหรับ Git access เพื่อส่งและดูแลพอร์ตของคุณใน the contrib Git module.