r7022 - in /trunk/libnet-arp-perl/blib: ./ arch/ arch/auto/ arch/auto/Net/ arch/auto/Net/ARP/ bin/ lib/ lib/Net/ lib/auto/ lib/auto/Net/ lib/auto/Net/ARP/ man1/ man3/ script/

jeremiah-guest at users.alioth.debian.org jeremiah-guest at users.alioth.debian.org
Mon Aug 20 15:33:01 UTC 2007


Author: jeremiah-guest
Date: Mon Aug 20 15:33:00 2007
New Revision: 7022

URL: http://svn.debian.org/wsvn/?sc=1&rev=7022
Log:
added blib dir, which hopefully will help with the lintian errors. Not
sure how I missed this previously.

Added:
    trunk/libnet-arp-perl/blib/
    trunk/libnet-arp-perl/blib/arch/
    trunk/libnet-arp-perl/blib/arch/.exists
    trunk/libnet-arp-perl/blib/arch/auto/
    trunk/libnet-arp-perl/blib/arch/auto/Net/
    trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/
    trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/.exists
    trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.bs
    trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.so   (with props)
    trunk/libnet-arp-perl/blib/bin/
    trunk/libnet-arp-perl/blib/bin/.exists
    trunk/libnet-arp-perl/blib/lib/
    trunk/libnet-arp-perl/blib/lib/Net/
    trunk/libnet-arp-perl/blib/lib/Net/.exists
    trunk/libnet-arp-perl/blib/lib/Net/ARP.pm
    trunk/libnet-arp-perl/blib/lib/auto/
    trunk/libnet-arp-perl/blib/lib/auto/Net/
    trunk/libnet-arp-perl/blib/lib/auto/Net/ARP/
    trunk/libnet-arp-perl/blib/lib/auto/Net/ARP/.exists
    trunk/libnet-arp-perl/blib/man1/
    trunk/libnet-arp-perl/blib/man1/.exists
    trunk/libnet-arp-perl/blib/man3/
    trunk/libnet-arp-perl/blib/man3/.exists
    trunk/libnet-arp-perl/blib/man3/Net::ARP.3pm
    trunk/libnet-arp-perl/blib/script/
    trunk/libnet-arp-perl/blib/script/.exists

Added: trunk/libnet-arp-perl/blib/arch/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/arch/.exists?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/.exists?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.bs
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.bs?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.so
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.so?rev=7022&op=file
==============================================================================
Binary file - no diff available.

Propchange: trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.so
------------------------------------------------------------------------------
    svn:executable = *

Propchange: trunk/libnet-arp-perl/blib/arch/auto/Net/ARP/ARP.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: trunk/libnet-arp-perl/blib/bin/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/bin/.exists?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/lib/Net/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/lib/Net/.exists?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/lib/Net/ARP.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/lib/Net/ARP.pm?rev=7022&op=file
==============================================================================
--- trunk/libnet-arp-perl/blib/lib/Net/ARP.pm (added)
+++ trunk/libnet-arp-perl/blib/lib/Net/ARP.pm Mon Aug 20 15:33:00 2007
@@ -1,0 +1,148 @@
+#
+# Perl ARP Extension
+#
+# Programmed by Bastian Ballmann
+# Last update: 31.01.2007
+#
+# This program is free software; you can redistribute 
+# it and/or modify it under the terms of the 
+# GNU General Public License version 2 as published 
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will 
+# be useful, but WITHOUT ANY WARRANTY; without even 
+# the implied warranty of MERCHANTABILITY or FITNESS 
+# FOR A PARTICULAR PURPOSE. 
+# See the GNU General Public License for more details. 
+
+package Net::ARP;
+
+use strict;
+use warnings;
+
+require Exporter;
+
+our @ISA = qw(Exporter);
+
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+
+# This allows declaration	use ARP ':all';
+# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
+# will save memory.
+our %EXPORT_TAGS = ( 'all' => [ qw(
+	
+) ] );
+
+our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
+
+our @EXPORT = qw(
+	
+);
+
+our $VERSION = '1.0';
+
+require XSLoader;
+XSLoader::load('Net::ARP', $VERSION);
+
+# Preloaded methods go here.
+
+1;
+__END__
+
+=head1 NAME
+
+ARP - Perl extension for creating ARP packets
+
+=head1 SYNOPSIS
+
+  use Net::ARP;
+  Net::ARP::send_packet('lo',                 # Device
+                        '127.0.0.1',          # Source IP
+	                '127.0.0.1',          # Destination IP
+		        'aa:bb:cc:aa:bb:cc',  # Source MAC
+	                'aa:bb:cc:aa:bb:cc',  # Destinaton MAC
+	                'reply');             # ARP operation
+
+$mac = Net::ARP::get_mac("eth0");
+
+print "$mac\n";
+
+$mac = Net::ARP::arp_lookup($dev,"192.168.1.1");
+
+print "192.168.1.1 has got mac $mac\n";
+
+
+=head2 IMPORTANT
+
+Version 1.0 will break with the API of PRE-1.0 versions, 
+because the return value of arp_lookup() and get_mac()
+will no longer be passed as parameter, but returned!
+I hope this decision is ok as long as we get a cleaner and more perlish API.
+
+
+=head2 DESCRIPTION
+
+This module can be used to create and send ARP packets and to
+get the mac address of an ethernet interface or ip address.
+
+=over 4
+
+=item B<send_packet()>
+
+  Net::ARP::send_packet('lo',                 # Device
+                        '127.0.0.1',          # Source IP
+	                '127.0.0.1',          # Destination IP
+		        'aa:bb:cc:aa:bb:cc',  # Source MAC
+	                'aa:bb:cc:aa:bb:cc',  # Destinaton MAC
+	                'reply');             # ARP operation
+
+  I think this is self documentating.
+  ARP operation can be one of the following values:
+  request, reply, revrequest, revreply, invrequest, invreply.
+  The default ARP operation is reply.
+
+=item B<get_mac()>
+
+  $mac = Net::ARP::get_mac("eth0");
+
+  This gets the MAC address of the eth0 interface and stores 
+  it in the variable $mac. The return value is "unknown" if
+  the mac cannot be looked up.
+
+=item B<arp_lookup()>
+
+  $mac = Net::ARP::arp_lookup($dev,"192.168.1.1");
+
+  This looks up the MAC address for the ip address 192.168.1.1
+  and stores it in the variable $mac. The return value is 
+  "unknown" if the mac cannot be looked up.
+
+=back
+
+Please note that this module uses a C idiom that is not common in Perl:
+It expects the return value to be passed as one of the arguments. This
+means that both of the lookup functions (C<get_mac()> and C<arp_lookup>)
+should get a scalar variable as their last argument (C<$mac>). The
+scalar's value will be modified with the function's result.
+
+=head1 SEE ALSO
+
+ man -a arp
+
+=head1 AUTHOR
+
+ Bastian Ballmann [ Balle at chaostal.de ]
+ http://www.datenterrorist.de
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2004-2007 by Bastian Ballmann
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.8.1 or,
+at your option, any later version of Perl 5 you may have available.
+
+
+=cut

Added: trunk/libnet-arp-perl/blib/lib/auto/Net/ARP/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/lib/auto/Net/ARP/.exists?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/man1/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/man1/.exists?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/man3/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/man3/.exists?rev=7022&op=file
==============================================================================
    (empty)

Added: trunk/libnet-arp-perl/blib/man3/Net::ARP.3pm
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/man3/Net%3A%3AARP.3pm?rev=7022&op=file
==============================================================================
--- trunk/libnet-arp-perl/blib/man3/Net::ARP.3pm (added)
+++ trunk/libnet-arp-perl/blib/man3/Net::ARP.3pm Mon Aug 20 15:33:00 2007
@@ -1,0 +1,226 @@
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "ARP 3"
+.TH ARP 3 "2007-08-08" "perl v5.8.8" "User Contributed Perl Documentation"
+.SH "NAME"
+ARP \- Perl extension for creating ARP packets
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 7
+\&  use Net::ARP;
+\&  Net::ARP::send_packet('lo',                 # Device
+\&                        '127.0.0.1',          # Source IP
+\&                        '127.0.0.1',          # Destination IP
+\&                        'aa:bb:cc:aa:bb:cc',  # Source MAC
+\&                        'aa:bb:cc:aa:bb:cc',  # Destinaton MAC
+\&                        'reply');             # ARP operation
+.Ve
+.PP
+$mac = Net::ARP::get_mac(\*(L"eth0\*(R");
+.PP
+print \*(L"$mac\en\*(R";
+.PP
+$mac = Net::ARP::arp_lookup($dev,\*(L"192.168.1.1\*(R");
+.PP
+print \*(L"192.168.1.1 has got mac \f(CW$mac\fR\en\*(R";
+.Sh "\s-1IMPORTANT\s0"
+.IX Subsection "IMPORTANT"
+Version 1.0 will break with the \s-1API\s0 of \s-1PRE\-1\s0.0 versions, 
+because the return value of \fIarp_lookup()\fR and \fIget_mac()\fR
+will no longer be passed as parameter, but returned!
+I hope this decision is ok as long as we get a cleaner and more perlish \s-1API\s0.
+.Sh "\s-1DESCRIPTION\s0"
+.IX Subsection "DESCRIPTION"
+This module can be used to create and send \s-1ARP\s0 packets and to
+get the mac address of an ethernet interface or ip address.
+.IP "\fB\f(BIsend_packet()\fB\fR" 4
+.IX Item "send_packet()"
+.Vb 6
+\&  Net::ARP::send_packet('lo',                 # Device
+\&                        '127.0.0.1',          # Source IP
+\&                        '127.0.0.1',          # Destination IP
+\&                        'aa:bb:cc:aa:bb:cc',  # Source MAC
+\&                        'aa:bb:cc:aa:bb:cc',  # Destinaton MAC
+\&                        'reply');             # ARP operation
+.Ve
+.Sp
+.Vb 4
+\&  I think this is self documentating.
+\&  ARP operation can be one of the following values:
+\&  request, reply, revrequest, revreply, invrequest, invreply.
+\&  The default ARP operation is reply.
+.Ve
+.IP "\fB\f(BIget_mac()\fB\fR" 4
+.IX Item "get_mac()"
+.Vb 1
+\&  $mac = Net::ARP::get_mac("eth0");
+.Ve
+.Sp
+.Vb 3
+\&  This gets the MAC address of the eth0 interface and stores 
+\&  it in the variable $mac. The return value is "unknown" if
+\&  the mac cannot be looked up.
+.Ve
+.IP "\fB\f(BIarp_lookup()\fB\fR" 4
+.IX Item "arp_lookup()"
+.Vb 1
+\&  $mac = Net::ARP::arp_lookup($dev,"192.168.1.1");
+.Ve
+.Sp
+.Vb 3
+\&  This looks up the MAC address for the ip address 192.168.1.1
+\&  and stores it in the variable $mac. The return value is 
+\&  "unknown" if the mac cannot be looked up.
+.Ve
+.PP
+Please note that this module uses a C idiom that is not common in Perl:
+It expects the return value to be passed as one of the arguments. This
+means that both of the lookup functions (\f(CW\*(C`get_mac()\*(C'\fR and \f(CW\*(C`arp_lookup\*(C'\fR)
+should get a scalar variable as their last argument (\f(CW$mac\fR). The
+scalar's value will be modified with the function's result.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+.Vb 1
+\& man \-a arp
+.Ve
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+.Vb 2
+\& Bastian Ballmann [ Balle at chaostal.de ]
+\& http://www.datenterrorist.de
+.Ve
+.SH "COPYRIGHT AND LICENSE"
+.IX Header "COPYRIGHT AND LICENSE"
+Copyright (C) 2004\-2007 by Bastian Ballmann
+.PP
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.8.1 or,
+at your option, any later version of Perl 5 you may have available.

Added: trunk/libnet-arp-perl/blib/script/.exists
URL: http://svn.debian.org/wsvn/trunk/libnet-arp-perl/blib/script/.exists?rev=7022&op=file
==============================================================================
    (empty)




More information about the Pkg-perl-cvs-commits mailing list