~ubuntu-branches/ubuntu/raring/libnetpacket-perl/raring

« back to all changes in this revision

Viewing changes to README

  • Committer: Bazaar Package Importer
  • Author(s): Nicholas Bamber, Ansgar Burchardt, Nicholas Bamber
  • Date: 2011-03-18 01:35:17 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110318013517-sso22lex12eq1dvb
Tags: 1.1.1-1
[ Ansgar Burchardt ]
* Update my email address.

[ Nicholas Bamber ]
* New upstream release
  - Removed NetPacket::ICMPv6, NetPacket::IPv6 and NetPacket::PFLog
* Updated copyright
* Removed README as it duplicates the man page
* Refreshed spelling patch
* Shortened short description

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
NetPacket version 0.41.1
2
 
 
3
 
This is a whole bunch of
4
 
Perl modules which I have named NetPacket::*.  These modules do basic
5
 
disassembly of network packets of various Internet protocols.  NetPacket
6
 
0.01 contained hooks for assembly of packets which have been implemented in
7
 
version 0.04 by Stephanie Wehner <atrak@itsx.com>.
8
 
 
9
 
I've used these scripts for a variety of little jobs such as snooping
10
 
various TCP services, gathering network traffic statistics by
11
 
source/destination/protocol, and for unpacking the contents of IP
12
 
tunnels.  They're actually pretty useful.  I recommend fetching and
13
 
installing the Net::Pcap module to actually gather packet data, and
14
 
for writing small scripts based on packet capture, the Net::PcapUtils
15
 
module is also useful.
16
 
 
17
 
At present, decoding for the following protocols has been
18
 
implemented.  
19
 
 
20
 
        - Ethernet (802.3 and 802.2)
21
 
        - ARP
22
 
        - ICMP
23
 
        - IGMP
24
 
        - IP
25
 
        - UDP
26
 
        - TCP
27
 
 
28
 
It's pretty easy to add new protocols.  Just copy one of the existing
29
 
modules and figure out an unpack string which will unpack the
30
 
information in the packet and store the data into fields in the
31
 
namespace of the NetPacket::whatever object.  More information can be
32
 
found in the NetPacket(3) manpage, which is the base class module.
33
 
 
34
 
I'd be interested in receiving bug reports, comments or any
35
 
improvements (especially additional protocols) to the NetPacket
36
 
modules.
37
 
 
38
 
Tim Potter
39
 
30th July, 2001
40
 
tpot@samba.org
 
1
NAME
 
2
    NetPacket - assemble/disassemble network packets at the protocol level
 
3
 
 
4
VERSION
 
5
    version 1.1.1
 
6
 
 
7
SYNOPSIS
 
8
        # NetPacket is a base class only
 
9
 
 
10
DESCRIPTION
 
11
    "NetPacket" provides a base class for a cluster of modules related to
 
12
    decoding and encoding of network protocols. Each "NetPacket" descendent
 
13
    module knows how to encode and decode packets for the network protocol
 
14
    it implements. Consult the documentation for the module in question for
 
15
    protocol-specific implementation.
 
16
 
 
17
    Note that there is no inheritance in the "NetPacket::" cluster of
 
18
    modules other than each protocol module being a "NetPacket". This was
 
19
    seen to be too restrictive as imposing inheritance relationships (for
 
20
    example between the IP, UDP and TCP protocols) would make things like
 
21
    tunneling or other unusual situations difficult.
 
22
 
 
23
WRITING YOUR OWN "NetPacket::" MODULE
 
24
    You are encouraged to write additional "NetPacket::" modules as well as
 
25
    improve existing ones. Contact the maintainer of the module in question
 
26
    with your suggestions or changes.
 
27
 
 
28
    The following sections are a list of suggestions and conventions for
 
29
    writing a "NetPacket::" module.
 
30
 
 
31
  Naming Conventions
 
32
    When creating a module in the "NetPacket::" namespace, it is suggested
 
33
    that you stick to a couple of conventions when naming packet contents.
 
34
    This will hopefully lead to a consistent namespace making the
 
35
    "NetPacket::" easier to use.
 
36
 
 
37
    Content names are all lowercase, with underscores separating multiple
 
38
    words. The following abbreviations are recommended:
 
39
 
 
40
                Word                Abbreviation
 
41
                --------------------------------
 
42
                source              src
 
43
                destination         dest
 
44
                checksum            cksum
 
45
                identifier          id
 
46
                version             ver
 
47
                protocol            proto
 
48
 
 
49
  Required Methods
 
50
    encode(), decode(), strip()
 
51
 
 
52
  Required Fields
 
53
    Every NetPacket:: object should have the following fields.
 
54
 
 
55
    _parent
 
56
        A link to the parent "NetPacket::" object in which this
 
57
        "NetPacket::" object is encaulated. This field is undefined if there
 
58
        is no parent object.
 
59
 
 
60
    _frame
 
61
        A copy of the raw data of the packet.
 
62
 
 
63
    data
 
64
        This field should contain the data encapsulated in the packet (i.e
 
65
        any headers or trailers stripped off) or undef if the packet
 
66
        contains no data. Note that in this sense, "data" is taken to mean
 
67
        information not relevant to the particular protocol being decoded.
 
68
        For example, an ARP packet contains many header fields but no data.
 
69
        A UDP datagram, however contains header fields and a payload.
 
70
 
 
71
SEE ALSO
 
72
    Joel Knight has a patch for NetPacket for IPv6 support available at
 
73
    http://www.packetmischief.ca/code/netpacket/.
 
74
 
 
75
COPYRIGHT AND LICENSE
 
76
    Copyright (c) 2001 Tim Potter and Stephanie Wehner.
 
77
 
 
78
    Copyright (c) 1995,1996,1997,1998,1999 ANU and CSIRO on behalf of the
 
79
    participants in the CRC for Advanced Computational Systems ('ACSys').
 
80
 
 
81
    This module is free software. You can redistribute it and/or modify it
 
82
    under the terms of the Artistic License 2.0.
 
83
 
 
84
    This program is distributed in the hope that it will be useful, but
 
85
    without any warranty; without even the implied warranty of
 
86
    merchantability or fitness for a particular purpose.
 
87
 
 
88
AUTHORS
 
89
    Tim Potter <tpot@samba.org>
 
90
 
 
91
    Stephanie Wehner <atrak@itsx.com>
 
92
 
 
93
    Yanick Champoux <yanick@cpan.org>
 
94