没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
An Introduction to TCP/IP
For Embedded System Designers
019-0074 • 020701-G
ii
An Introduction to TCP/IP
019-0074 • 020701–G • Printed in U.S.A.
©2001 Z-World Inc. • All rights reserved.
Z-World reserves the right to make changes and
improvements to its products without providing notice.
Trademarks
Dynamic C is a registered trademark of Z-World Inc.
Windows® is a registered trademark of Microsoft Corporation
Z-World, Inc.
2900 Spafford Street
Davis, California 95616-6800
USA
Telephone: 530.757.3737
Fax: 530.757.3792 or 530.753.5141
www.zworld.com
An Introduction to TCP/IP iii
Table of Contents
1. Introduction.................................................................................................................1
2. Ethernet Basics ...........................................................................................................3
2.1 Ethernet Address .........................................................................................................................3
2.2 Physical Connections ..................................................................................................................3
2.2.1 Cables.........................................................................................................................4
2.3 Frames.........................................................................................................................................4
2.3.1 Collisions ..................................................................................................................5
3. Networks.....................................................................................................................7
3.1 LAN.............................................................................................................................................7
3.1.1 Repeaters and Bridges ...............................................................................................7
3.2 WAN............................................................................................................................................8
3.2.1 Packet Switches .........................................................................................................8
3.2.2 Forwarding a Packet ..................................................................................................8
3.3 VPN.............................................................................................................................................9
3.4 Network Devices.........................................................................................................................9
3.4.1 Routers.......................................................................................................................9
3.4.2 Firewalls.....................................................................................................................9
3.4.3 Gateways..................................................................................................................10
3.5 Network Architecture................................................................................................................10
3.5.1 Client/Server Networks............................................................................................10
3.5.1.1 Port Numbers ........................................................................................11
4. Network Protocol Layers..........................................................................................13
4.1 Layering Models .......................................................................................................................13
4.2 TCP/IP Protocol Stack ..............................................................................................................14
5. TCP/IP Protocols ......................................................................................................15
5.1 IP ...............................................................................................................................................16
5.1.1 IP Address................................................................................................................16
5.1.2 IP Address Classes...................................................................................................16
5.1.3 Netmasks..................................................................................................................16
5.1.4 Subnet Address ........................................................................................................17
5.1.5 Directed Broadcast Address.....................................................................................17
5.1.6 Limited Broadcast Address......................................................................................17
5.2 IP Routing .................................................................................................................................17
5.3 ARP...........................................................................................................................................18
5.4 The Transport Layer..................................................................................................................18
5.4.1 UDP .........................................................................................................................18
5.4.2 TCP..........................................................................................................................18
5.4.2.1 TCP Connection/Socket .......................................................................19
5.4.2.2 TCP Header ..........................................................................................19
5.4.3 ICMP........................................................................................................................21
5.5 The Application Layer ..............................................................................................................21
5.5.1 DNS .........................................................................................................................21
5.5.1.1 DCRTCP.LIB Implementation of DNS ...............................................22
iv An Introduction to TCP/IP
6. Dynamic C TCP/IP Implementation.........................................................................23
6.1 TCP/IP Configuration Macros.................................................................................................. 23
6.1.1 IP Addresses Set Manually ..................................................................................... 23
6.1.2 IP Addresses Set Dynamically................................................................................ 24
6.1.3 Default Buffer Size.................................................................................................. 24
6.1.4 Delay a Connection................................................................................................. 24
6.1.5 Runtime Configuration............................................................................................ 25
6.2 Skeleton Program...................................................................................................................... 25
6.3 TCP Socket............................................................................................................................... 26
6.3.1 Passive Open ........................................................................................................... 26
6.3.1.1 Example of Passive Open ....................................................................27
6.3.2 Active Open............................................................................................................. 28
6.3.3 TCP Socket Functions............................................................................................. 29
6.3.3.1 Control Functions ................................................................................ 29
6.3.3.2 Status Functions ................................................................................... 30
6.3.3.3 I/O Functions ....................................................................................... 31
6.4 UDP Interface........................................................................................................................... 31
6.4.1 Opening and Closing............................................................................................... 32
6.4.2 Writing..................................................................................................................... 32
6.4.3 Reading....................................................................................................................32
6.4.4 Checksums .............................................................................................................. 32
6.5 Program Design........................................................................................................................ 33
6.5.1 State-Based Program Design................................................................................... 33
6.5.2 Blocking vs. Non-Blocking..................................................................................... 33
6.5.3 Blocking Macros .....................................................................................................34
6.6 Multitasking and TCP/IP.......................................................................................................... 34
7. References.................................................................................................................35
Notice to Users .........................................................................................................37
An Introduction to TCP/IP 1
1. Introduction
This manual is intended for embedded systems engineers and support professionals who are not
familiar with basic networking concepts. An overview of an Ethernet network and the TCP/IP
suite of protocols used to communicate across the network will be given.
The implementation details that are discussed in this manual pertain to versions of Dynamic C
prior to 7.05. Improvements and additions to the TCP/IP suite of protocols are fully documented
in the Dynamic C TCP/IP User’s Manual.
剩余41页未读,继续阅读
资源评论
一叶知秋yyds
- 粉丝: 699
- 资源: 45
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功