没有合适的资源?快使用搜索试试~ 我知道了~
Design and Inplementation of LwIP TCP-IP Stack
需积分: 9 12 下载量 80 浏览量
2014-01-07
12:40:08
上传
评论
收藏 220KB PDF 举报
温馨提示
试读
46页
这个资源是英文版的。 中文版可以在后面这个链接下载 http://download.csdn.net/detail/u011654551/6804533
资源推荐
资源详情
资源评论
Design and Implementation of the lwIP
TCP/IP Stack
Swedish Institute of Computer Science
February 20, 2001
Adam Dunkels
adam@sics.se
Abstract
lwIP is an implementation of the TCP/IP protocol stack. The focus of the lwIP stack is to
reduce memory usage and code size, making lwIP suitable for use in small clients with very
limited resources such as embedded systems. In order to reduce processing and memory demands,
lwIP uses a tailor made API that does not require any data copying.
This report describes the design and implementation of lwIP. The algorithms and data struc-
tures used both in the protocol implementations and in the sub systems such as the memory and
buffer management systems are described. Also included in this report is a reference manual for
the lwIP API and some code examples of using lwIP.
Contents
1 Introduction 1
2 Protocol layering 1
3 Overview 2
4 Process model 2
5 The operating system emulation layer 3
6 Buffer and memory management 3
6.1 Packet buffers — pbufs .................................. 3
6.2 Memory management .................................. 5
7 Network interfaces 5
8 IP processing 7
8.1 Receiving packets ..................................... 7
8.2 Sending packets ...................................... 7
8.3 Forwarding packets .................................... 8
8.4 ICMP processing ..................................... 8
9 UDP processing 8
10 TCP processing 9
10.1 Overview ......................................... 9
10.2 Data structures ...................................... 10
10.3 Sequence number calculations .............................. 12
10.4 Queuing and transmitting data ............................. 12
10.4.1 Silly window avoidance ............................. 13
10.5 Receiving segments .................................... 13
10.5.1 Demultiplexing .................................. 13
10.5.2 Receiving data .................................. 14
10.6 Accepting new connections ............................... 14
10.7 Fast retransmit ...................................... 14
10.8 Timers ........................................... 14
10.9 Round-trip time estimation ............................... 15
10.10Congestion control .................................... 15
11 Interfacing the stack 15
12 Application Program Interface 16
12.1 Basic concepts ...................................... 16
12.2 Implementation of the API ............................... 17
13 Statistical code analysis 17
13.1 Lines of code ....................................... 18
13.2 Object code size ..................................... 19
14 Performance analysis 20
15 API reference 21
15.1 Data types ........................................ 21
15.1.1 Netbufs ...................................... 21
15.2 Buffer functions ...................................... 21
15.2.1 netbuf
new() ................................... 21
15.2.2 netbuf
delete() .................................. 21
15.2.3 netbuf
alloc() ................................... 22
15.2.4 netbuf
free() ................................... 22
15.2.5 netbuf
ref() .................................... 22
15.2.6 netbuf
len() .................................... 23
15.2.7 netbuf
data() ................................... 23
15.2.8 netbuf
next() ................................... 23
15.2.9 netbuf
first() ................................... 24
15.2.10 netbuf
copy() ................................... 24
15.2.11 netbuf
chain() .................................. 24
15.2.12 netbuf
fromaddr() ................................ 24
15.2.13 netbuf
fromport() ................................ 25
16 Network connection functions 25
16.0.14 netconn
new() .................................. 25
16.0.15 netconn
delete() ................................. 25
16.0.16 netconn
type() .................................. 25
16.0.17 netconn
peer() .................................. 25
16.0.18 netconn
addr() .................................. 26
16.0.19 netconn
bind() .................................. 26
16.0.20 netconn
connect() ................................ 26
16.0.21 netconn
listen() .................................. 26
16.0.22 netconn
accept() ................................. 26
16.0.23 netconn
recv() .................................. 27
16.0.24 netconn
write() .................................. 28
16.0.25 netconn
send() .................................. 29
16.0.26 netconn
close() .................................. 30
17 BSD socket library 30
17.1 The representation of a socket .............................. 30
17.2 Allocating a socket .................................... 30
17.2.1 The socket() call ................................ 30
17.3 Connection setup ..................................... 31
17.3.1 The bind() call ................................. 31
17.3.2 The connect() call ............................... 31
17.3.3 The listen() call ................................ 32
17.3.4 The accept() call ................................ 32
17.4 Sending and receiving data ............................... 33
17.4.1 The send() call ................................. 33
17.4.2 The sendto() and sendmsg() calls ....................... 34
17.4.3 The write() call ................................. 34
17.4.4 The recv() and read() calls .......................... 35
17.4.5 The recvfrom() and recvmsg() calls ..................... 36
18 Code examples 36
18.1 Using the API ...................................... 36
18.2 Directly interfacing the stack .............................. 39
Bibliography 41
剩余45页未读,继续阅读
资源评论
xieheng84
- 粉丝: 6
- 资源: 53
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
- C语言实现直接插入排序、希尔排序、选择排序、冒泡排序、堆排序、快速排序、归并排序、计数排序,并带图详解.zip
- 常用工具集参考用于图像等数据处理
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功