Skip to main content

Programming the Network with Perl

Programming the Network with Perl

Paul Barry

ISBN: 978-0-470-84941-5

Jan 2003

394 pages



After providing an introduction to the Perl programming language, this helpful guide teaches computer networking using Perl. Topics discussed include ethernet network analysis, programming standard Internet protocols, and exploring mobile agent programming.
* Each chapter provides a general discussion of the technologies under consideration, the support for programming the technologies as provided by Perl, and implementations of working examples
* Covers Mobile Agent Technology, which is set to become one of the "next big things" on the Internet
* Further information is supplied, including a listing of Web and print resources, programming exercises, and tips to expand the reader's understanding of the material
1. Meet Perl
Perl's Default Behaviour
Using Variables in Perl
Controlling Flow
Boolean in Perl
Perl Operators
Perl I/O
Packages, Modules and Objects
More Perl
Where to From Here?
Print Resources
Web Resources
2. Snooping
Thank You, Tim Potter
Preparing to Snoop
Building Low-Level Snooping Tools
Snooping IP Datagrams
Transport Snoopers
The Network Debugger
Where to From Here?
Print Resources
Web Resources
3. Sockets
Clients and Servers
Transport Services
Introducing the Perl Socket API
Socket Support Subroutines
Simple UDP Clients and Servers
Genericity and Robustness
UDP is Unreliable
Sending and Receiving with UDP
Dealing with Deadlock
TCP Clients and Servers
A Common TCP Gotcha
More TCP Socket Communication
The Concurrent Syntax Checker
Object-Oriented Sockets
Where to From Here?
Print Resources
Web Resources
4. Protocols
Working with the Web
The World's Worst Web Browser
HTTP Status Codes
It's the Gisle and Graham Show!
The Library for WWW Access in Perl
The LWPwwwb Program
Doing More with LWPwwwb
Building a Custom Web Server
The libnet Library
Email Enabling simplehttpd
Other Networking Add-on Modules
Where to From Here?
Print Resources
Web Resources
5. Management
Simple Management with ICMP
Doing the Ping Thing
Doing the Net: Ping Thing
Tracing Routes
Not So Simple Management with SNMP
The SNMP Management Framework
Managed Data
The SNMP Protocol
The Net: SNMP Module
Working with Net: SNMP
What's Up?
Setting MIB-II Data
IP Router Mapping
Where to From Here?
Print Resources
Web Resources
6. Mobile Agents
What is a Mobile Agent?
Mobile-Agent Examples
Mobile-Agent Advantages/Disavantages
Perl Agents
The Module
Ooooh, Objects!
The Default Mobile Agent
A Launching Mobile-Agent Environment
A One-Shot Location
Relocating to Multiple Locations
The Mobile-Agent multiwho
The Mobile-Agent ipdetermine
The Cloning Mobile-Agent ipdetermine
Other Perl Agent Examples
Where to From Here?
Print Resources
Web Resources
"Clear writing and useful examples characterise this book". (, 21 May 2002)