The Complete Handbook of The Internet
The Complete Handbook of The Internet
INTERNET
The Complete Handbook of
the Internet
by
W.J. Buchanan
Napier University
Preface xix
Al Introduction 1
AU Introduction
A1.2 History
A1.3 System classification 4
Al.4 System definitions 7
A1.5 Computer architecture 9
A1.6 Bits, bytes and words 12
Al.7 Data representation 16
A2 Distributed elements 21
A2.1 Introduction 21
A2.2 Conversion to digital 23
A2.3 Communications model 24
A2.4 Cables 25
A2.5 Peer-to-peer and client/server 29
A3 Operating systems 33
A3.1 Introduction 33
A3.2 Multitasking and threading 41
A3.3 Example operating system components (Microsoft Windows) 45
A3.4 Interrupts (on PC systems) 50
A3.5 Example operating systems 55
A4 Processes and scheduling 61
A4.1 Introduction 61
A4.2 Scheduling 62
A4.3 Higher-level primitives 68
A4.4 Signals, pipes and task switching (UNIX) 69
A4.5 Messages 70
A4.6 Microsoft Windows scheduling 71
A4.7 UNIX process control 71
A4.8 Microsoft Windows task manager 75
A4.9 Finite-state machines 75
AS Distributed processing 79
A5.1 Introduction 79
A5.2 Interprocess communication 81
A5.3 Flags and semaphores 82
A5.4 RPC 90
A5.5 Multi-processor systems 97
A6 Distributed file systems 107
A6.1 Introduction 107
A6.2 NFS 110
A6.3 Other distributed file systems 121
A7 Agents 123
A7.1 Introduction 123
A7.2 Agent types 125
A7.3 Why Java for mobile agents? 131
A7.4 Agents and security 133
A7.5 Monitoring software quality 134
A7.6 Mobile agents and network management 134
A7.7 User agents 135
A7.8 Agent development tool 136
A7.9 Practical agent implementation 137
A7.10 Mobile agent development tool 142
A7.11 Tracy 143
B1 Data communications 147
Bl.l Introduction 147
Blo2 History 147
Blo3 Background 151
Bl.4 Data transfer 153
Blo5 Data transfer rates 154
Blo6 Electrical signals 155
Blo7 Bandwidth 156
Blo8 Bandwidth requirements 157
Blo9 Noise and signal distortion 158
Bl.lO Capacity 159
Bl.ll Modulation 161
Bl.l2 Digital modulation 163
Bl.l3 Multiplexing 165
Bl.l4 Frequency carrier 167
BU5 Routing of data 169
B2 Real-time data and compression 173
B2.1 Introduction 173
B2.2 Conversion to digital 176
B2.3 Sampling theory 177
B2.4 Quantization 178
B2.5 Compression methods 179
B2.6 Entropy encoding 181
B2.7 Source compression 187
B2.8 Fax transmission 201
B2.9 Video signals 203
B2.10 GIF coding 215
B2.11 TIFF coding 224
B3 Error coding 227
B3.1 Error coding principles 227
B3.2 Error correction 237
B3.3 Error (Detection) 244
B4 RS-232 259
B4.1 Introduction 259
B4.2 Electrical characteristics 259
Table of contents ix
D1.l6 ICMP 521
Dl.17 Additional material 524
DU8 Class A subnet masks 530
02 TCP/UOP 531
D2.1 Introduction 531
D2.2 Functions of the transport layer 533
D2.3 TCP lIP model 536
D2.4 Transmission control protocol 537
D2.5 UDP 540
D2.6 TCP specification 541
D2.7 Connection states 543
D2.8 Opening and closing a connection 546
D2.9 TCP user commands 547
D2.10 TCP/IP services reference 549
03 SPX/IPX 551
D3.1 Introduction 551
D3.2 NetWare architecture 553
D3.3 NetWare protocols 555
D3.4 Novel NetWare set-up 564
04 NetBEUI and NetBIOS 567
D4.1 Introduction 567
D4.2 NetBIOS 568
D4.3 NetBIOS over TCP/IP (NetBT) 570
D4.4 NWLink IPX/SPX/NetBIOS Compatible Transport Protocol 571
05 PPP, SLIP and VPN's 575
D5.1 Introduction 575
D5.2 Frame format 578
D5.3 Point -to- Point Protocol over Ethernet (PPPoE) 580
D5.4 PPP operation 580
D5.5 Remote scripts 584
D5.6 PPP programming for routers 592
D5.7 Securing a PPP connection 593
06 TCP/IP Commands 595
D6.1 Introduction 595
D6.2 ping 597
D6.3 ftp (file transfer protocol) 598
D6.4 traceroute 598
D6.5 nslookup 600
D6.6 Windows programs 601
07 Socket programming 605
D7.1 Introduction 605
D7.2 WinSock using C++ 605
D7.3 Visual Basic socket implementation 614
D7.4 Client! server VB program 620
D7.5 Server connecting to multiple clients 626
D7.6 Java sockets 629
D7.7 Java networking methods 634
Table of contents xi
E5.ll Private-key 747
E5.12 Letter probability program 756
E5.13 Occurrences of English letters, digrams, trigrams and words 757
E6 Public-key encryption 759
E6.1 Introduction 759
E6.2 Authentication 771
E6.3 Internet security 779
E6.4 VB RSA program 788
Fl Electronic mail 793
Fl.l Introduction 793
Fl.2 Shared-file approach versus client! server approach 794
Fl.3 Using an e-mail client 795
Fl.4 Electronic mail overview 796
Fl.5 SMTP 797
Fl.6 MIME 803
Fl.7 Post Office Protocol (POP) 811
Fl.8 Smilies and acronyms 812
F2 WWWandHTTP 815
F2.1 Introduction 815
F2.2 Advantages and disadvantages of the WWW 817
F2.3 Client! server architecture 818
F2.4 Web browsers 818
F2.5 Universal resource locators (URLs) 819
F2.6 Web browser design 823
F2.7 HTTP 824
F2.8 HTTP reference 832
F2.9 Example conversation 838
F3 SNMP, Wins, Bootp, DNS and DHCP 841
F3.1 Introduction 841
F3.2 SNMP 842
F3.3 SNMP for Windows 851
F3.4 RMON (Remote Monitoring) 851
F3.5 EASE (Embedded Advanced Sampling Environment) 852
F3.6 Bootp protocol 852
F3.7 DHCP 854
F3.8 Domain name server 858
F3.9 WINS 860
F4 FTP/HTTP/Telnet set up and programming 863
F4.1 FTP 863
F4.2 Telnet 864
F4.3 FTP programming 868
F4.4 HTTP programming 873
Gl Networking Operating Systems 875
Gl.l Introduction 875
G1.2 Microsoft Windows 875
G1.3 Active Directories 886
G1.4 Internet connection sharing 887
Table of contents xv
H15 WAP 1301
H15.1 Introduction l301
Hl5.2 WML reference l304
Hl5.3 Input Elements l309
Hl5.4 ASP/PHP interfaces with WML l311
Hl5.5 References l315
11 Multimedia 1317
11.1 Introduction l317
11.2 Multimedia development 1320
11.3 Content design and delivery l322
11.4 CD-ROMs l326
11.5 Audio components for multimedia l330
12 Databases and data storage 1333
12.1 Introduction l333
12.2 Database creation steps 1335
12.3 Relationships 1336
12.4 SQLquery l337
12.5 Data Protection 1340
12.6 Personalization and Data Mining 1341
12.7 Examples l346
12.8 SQL reference 1347
12.9 Database Management Systems (DBMS) l350
13 Design Tips (Part 1) 1351
13.1 Introduction l351
13.2 Paint strokes 1351
13.3 Focal point graphics 1351
13.4 Xmas, and seasonal graphics l351
I3.5 Producing sharp graphics l353
I3.6 Distorting graphics and transparency l354
I3.7 Mouse-over events and layers l356
13.8 Enhancing metafiles 1356
I3.9 Bullets l357
13.10 Graphic file formats l357
13.11 Adding opacity to a background image 1358
I3.12 Column corners l359
13.l3 Transparent backgrounds l360
I3.14 Lines in tables l361
13.15 Animating objects l363
13.16 Creating pop-up message boxes l363
13.17 Drawing lines in diagrams l366
13.18 Scaling graphics for text 1368
13.19 Designing for easy configuration l371
13.20 Creating icons for program files l372
13.21 Pencil first, package later l374
13.22 From sketch to graphic 1376
14 Design Tips (Part 2) 1379
14.1 From photo to graphic l379
Index 1611
The appendices include reference material on related subjects, such as server configuration,
and reference guides for important commands. Along with the book, the associated CD-
ROM contains a fully searchable version of the book. It also contains the associated source
code, and RFC documents.
Help is provided by the author from the e-mail address of:
[email protected]
or from the associated WWW site at:
http://www.soc.napier.ac.uk/-bill/hand_int.html
or
http://buchananweb.co.uk/hand_int.html
Dr William Buchanan,
Senior Lecturer,
School of Computing,
Napier University,
Edinburgh. UK.