Net-ARP/0000755000175000001440000000000012406610575011253 5ustar bastiusersNet-ARP/.git/0000755000175000001440000000000012161753235012113 5ustar bastiusersNet-ARP/.git/COMMIT_EDITMSG0000644000175000001440000000061012161753235014177 0ustar bastiusersfixed bugfix (see https://rt.cpan.org/Ticket/Display.html?id=86223) # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # modified: ARP.pm # modified: ARP.xs # modified: Changes # modified: Makefile.PL # Net-ARP/.git/COMMIT_EDITMSG~0000644000175000001440000000050412161753231014373 0ustar bastiusers # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch master # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # modified: ARP.pm # modified: ARP.xs # modified: Changes # modified: Makefile.PL # Net-ARP/.git/HEAD0000644000175000001440000000002711763723474012547 0ustar bastiusersref: refs/heads/master Net-ARP/.git/branches/0000755000175000001440000000000011763723474013711 5ustar bastiusersNet-ARP/.git/config0000644000175000001440000000040111763724125013301 0ustar bastiusers[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = git@github.com:balle/Net-ARP.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master Net-ARP/.git/description0000644000175000001440000000011111763723474014363 0ustar bastiusersUnnamed repository; edit this file 'description' to name the repository. Net-ARP/.git/hooks/0000755000175000001440000000000011763723474013247 5ustar bastiusersNet-ARP/.git/hooks/applypatch-msg.sample0000755000175000001440000000070411763723474017407 0ustar bastiusers#!/bin/sh # # An example hook script to check the commit log message taken by # applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. The hook is # allowed to edit the commit message file. # # To enable this hook, rename this file to "applypatch-msg". . git-sh-setup test -x "$GIT_DIR/hooks/commit-msg" && exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} : Net-ARP/.git/hooks/commit-msg.sample0000755000175000001440000000160011763723474016526 0ustar bastiusers#!/bin/sh # # An example hook script to check the commit log message. # Called by "git commit" with one argument, the name of the file # that has the commit message. The hook should exit with non-zero # status after issuing an appropriate message if it wants to stop the # commit. The hook is allowed to edit the commit message file. # # To enable this hook, rename this file to "commit-msg". # Uncomment the below to add a Signed-off-by line to the message. # Doing this in a hook is a bad idea in general, but the prepare-commit-msg # hook is more suited to it. # # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { echo >&2 Duplicate Signed-off-by lines. exit 1 } Net-ARP/.git/hooks/post-update.sample0000755000175000001440000000027511763723474016726 0ustar bastiusers#!/bin/sh # # An example hook script to prepare a packed repository for use over # dumb transports. # # To enable this hook, rename this file to "post-update". exec git update-server-info Net-ARP/.git/hooks/pre-applypatch.sample0000755000175000001440000000061611763723474017411 0ustar bastiusers#!/bin/sh # # An example hook script to verify what is about to be committed # by applypatch from an e-mail message. # # The hook should exit with non-zero status after issuing an # appropriate message if it wants to stop the commit. # # To enable this hook, rename this file to "pre-applypatch". . git-sh-setup test -x "$GIT_DIR/hooks/pre-commit" && exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} : Net-ARP/.git/hooks/pre-commit.sample0000755000175000001440000000325011763723474016531 0ustar bastiusers#!/bin/sh # # An example hook script to verify what is about to be committed. # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, rename this file to "pre-commit". if git rev-parse --verify HEAD >/dev/null 2>&1 then against=HEAD else # Initial commit: diff against an empty tree object against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 fi # If you want to allow non-ascii filenames set this variable to true. allownonascii=$(git config hooks.allownonascii) # Redirect output to stderr. exec 1>&2 # Cross platform projects tend to avoid non-ascii filenames; prevent # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && # Note that the use of brackets around a tr range is ok here, (it's # even required, for portability to Solaris 10's /usr/bin/tr), since # the square bracket bytes happen to fall in the designated range. test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 then echo "Error: Attempt to add a non-ascii file name." echo echo "This can cause problems if you want to work" echo "with people on other platforms." echo echo "To be portable it is advisable to rename the file ..." echo echo "If you know what you are doing you can disable this" echo "check using:" echo echo " git config hooks.allownonascii true" echo exit 1 fi # If there are whitespace errors, print the offending file names and fail. exec git diff-index --check --cached $against -- Net-ARP/.git/hooks/pre-rebase.sample0000755000175000001440000001152711763723474016510 0ustar bastiusers#!/bin/sh # # Copyright (c) 2006, 2008 Junio C Hamano # # The "pre-rebase" hook is run just before "git rebase" starts doing # its job, and can prevent the command from running by exiting with # non-zero status. # # The hook is called with the following parameters: # # $1 -- the upstream the series was forked from. # $2 -- the branch being rebased (or empty when rebasing the current branch). # # This sample shows how to prevent topic branches that are already # merged to 'next' branch from getting rebased, because allowing it # would result in rebasing already published history. publish=next basebranch="$1" if test "$#" = 2 then topic="refs/heads/$2" else topic=`git symbolic-ref HEAD` || exit 0 ;# we do not interrupt rebasing detached HEAD fi case "$topic" in refs/heads/??/*) ;; *) exit 0 ;# we do not interrupt others. ;; esac # Now we are dealing with a topic branch being rebased # on top of master. Is it OK to rebase it? # Does the topic really exist? git show-ref -q "$topic" || { echo >&2 "No such branch $topic" exit 1 } # Is topic fully merged to master? not_in_master=`git rev-list --pretty=oneline ^master "$topic"` if test -z "$not_in_master" then echo >&2 "$topic is fully merged to master; better remove it." exit 1 ;# we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` only_next_2=`git rev-list ^master ${publish} | sort` if test "$only_next_1" = "$only_next_2" then not_in_topic=`git rev-list "^$topic" master` if test -z "$not_in_topic" then echo >&2 "$topic is already up-to-date with master" exit 1 ;# we could allow it, but there is no point. else exit 0 fi else not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { /^([0-9a-f]+) /; ($1 => 1); } split(/\n/, $ARGV[1]); for my $elem (map { /^([0-9a-f]+) (.*)$/; [$1 => $2]; } split(/\n/, $ARGV[2])) { if (!exists $not_in_next{$elem->[0]}) { if ($msg) { print STDERR $msg; undef $msg; } print STDERR " $elem->[1]\n"; } } ' "$topic" "$not_in_next" "$not_in_master" exit 1 fi exit 0 ################################################################ This sample hook safeguards topic branches that have been published from being rewound. The workflow assumed here is: * Once a topic branch forks from "master", "master" is never merged into it again (either directly or indirectly). * Once a topic branch is fully cooked and merged into "master", it is deleted. If you need to build on top of it to correct earlier mistakes, a new topic branch is created by forking at the tip of the "master". This is not strictly necessary, but it makes it easier to keep your history simple. * Whenever you need to test or publish your changes to topic branches, merge them into "next" branch. The script, being an example, hardcodes the publish branch name to be "next", but it is trivial to make it configurable via $GIT_DIR/config mechanism. With this workflow, you would want to know: (1) ... if a topic branch has ever been merged to "next". Young topic branches can have stupid mistakes you would rather clean up before publishing, and things that have not been merged into other branches can be easily rebased without affecting other people. But once it is published, you would not want to rewind it. (2) ... if a topic branch has been fully merged to "master". Then you can delete it. More importantly, you should not build on top of it -- other people may already want to change things related to the topic as patches against your "master", so if you need further changes, it is better to fork the topic (perhaps with the same name) afresh from the tip of "master". Let's look at this example: o---o---o---o---o---o---o---o---o---o "next" / / / / / a---a---b A / / / / / / / / c---c---c---c B / / / / \ / / / / b---b C \ / / / / / \ / ---o---o---o---o---o---o---o---o---o---o---o "master" A, B and C are topic branches. * A has one fix since it was merged up to "next". * B has finished. It has been fully merged up to "master" and "next", and is ready to be deleted. * C has not merged to "next" at all. We would want to allow C to be rebased, refuse A, and encourage B to be deleted. To compute (1): git rev-list ^master ^topic next git rev-list ^master next if these match, topic has not merged in next at all. To compute (2): git rev-list master..topic if this is empty, it is fully merged to "master". Net-ARP/.git/hooks/prepare-commit-msg.sample0000755000175000001440000000232711763723474020171 0ustar bastiusers#!/bin/sh # # An example hook script to prepare the commit log message. # Called by "git commit" with the name of the file that has the # commit message, followed by the description of the commit # message's source. The hook's purpose is to edit the commit # message file. If the hook fails with a non-zero status, # the commit is aborted. # # To enable this hook, rename this file to "prepare-commit-msg". # This hook includes three examples. The first comments out the # "Conflicts:" part of a merge commit. # # The second includes the output of "git diff --name-status -r" # into the message, just before the "git status" output. It is # commented because it doesn't cope with --amend or with squashed # commits. # # The third example adds a Signed-off-by line to the message, that can # still be edited. This is rarely a good idea. case "$2,$3" in merge,) /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; # ,|template,) # /usr/bin/perl -i.bak -pe ' # print "\n" . `git diff --cached --name-status -r` # if /^#/ && $first++ == 0' "$1" ;; *) ;; esac # SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') # grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" Net-ARP/.git/hooks/update.sample0000755000175000001440000000703311763723474015742 0ustar bastiusers#!/bin/sh # # An example hook script to blocks unannotated tags from entering. # Called by "git receive-pack" with arguments: refname sha1-old sha1-new # # To enable this hook, rename this file to "update". # # Config # ------ # hooks.allowunannotated # This boolean sets whether unannotated tags will be allowed into the # repository. By default they won't be. # hooks.allowdeletetag # This boolean sets whether deleting tags will be allowed in the # repository. By default they won't be. # hooks.allowmodifytag # This boolean sets whether a tag may be modified after creation. By default # it won't be. # hooks.allowdeletebranch # This boolean sets whether deleting branches will be allowed in the # repository. By default they won't be. # hooks.denycreatebranch # This boolean sets whether remotely creating branches will be denied # in the repository. By default this is allowed. # # --- Command line refname="$1" oldrev="$2" newrev="$3" # --- Safety check if [ -z "$GIT_DIR" ]; then echo "Don't run this script from the command line." >&2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then echo "Usage: $0 " >&2 exit 1 fi # --- Config allowunannotated=$(git config --bool hooks.allowunannotated) allowdeletebranch=$(git config --bool hooks.allowdeletebranch) denycreatebranch=$(git config --bool hooks.denycreatebranch) allowdeletetag=$(git config --bool hooks.allowdeletetag) allowmodifytag=$(git config --bool hooks.allowmodifytag) # check for no description projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") echo "*** Project description file hasn't been set" >&2 exit 1 ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero="0000000000000000000000000000000000000000" if [ "$newrev" = "$zero" ]; then newrev_type=delete else newrev_type=$(git cat-file -t $newrev) fi case "$refname","$newrev_type" in refs/tags/*,commit) # un-annotated tag short_refname=${refname##refs/tags/} if [ "$allowunannotated" != "true" ]; then echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 exit 1 fi ;; refs/tags/*,delete) # delete tag if [ "$allowdeletetag" != "true" ]; then echo "*** Deleting a tag is not allowed in this repository" >&2 exit 1 fi ;; refs/tags/*,tag) # annotated tag if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 then echo "*** Tag '$refname' already exists." >&2 echo "*** Modifying a tag is not allowed in this repository." >&2 exit 1 fi ;; refs/heads/*,commit) # branch if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then echo "*** Creating a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/heads/*,delete) # delete branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a branch is not allowed in this repository" >&2 exit 1 fi ;; refs/remotes/*,commit) # tracking branch ;; refs/remotes/*,delete) # delete tracking branch if [ "$allowdeletebranch" != "true" ]; then echo "*** Deleting a tracking branch is not allowed in this repository" >&2 exit 1 fi ;; *) # Anything else (is there anything else?) echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 exit 1 ;; esac # --- Finished exit 0 Net-ARP/.git/index0000644000175000017500000000302412161753231013105 0ustar bastibastiDIRCQ]5gAQ]5gAAw XbIxZARP.pmQ|kQ|kAxҬ#rB 0ʅARP.xsQ-.*Q-.*Ay ٜ\:A+/1ChangesQ$Ee<Azd[Gf-O݇.PlMANIFESTQWQWA{ds!ފcԐi^ Makefile.PLQ$Qx&!A|dUX;Z*޳v*5dREADMEQQբ&.A}c<8Zu!3uarp.hQJA~dn_'TwNLQarp_lookup_bsd.cQJJAd ^gL1P\karp_lookup_linux.cQJAd ]( ˧9@_䬭" get_mac_bsd.cQQfc4Ad&Ũ`&5' Tpget_mac_linux.cQ$J=4;Ade>2W(RKɦppport.hQ$JAd]E'5zwG5C6z\Wtsend_packet_bsd.cQ$Qբ'Atg2pa(|<8send_packet_linux.cQ$?Adț>ey&$Ѳ|t/ARP.tQ$E~AdvLb`Tx aM|~8-SЍt/arp_lookup.tQ$EAde5rd uP@ t/get_mac.tQ$Qv,<KAd i3gUa 1 K^Dt/send_packet.tQ$EAd'QXZO,l VN.wtest.plTREE419 1 20t4 0 \eh4 A3񱈹qmq#_[.]Net-ARP/.git/info/0000755000175000001440000000000011763723474013057 5ustar bastiusersNet-ARP/.git/info/exclude0000644000175000001440000000036011763723474014432 0ustar bastiusers# git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ Net-ARP/.git/logs/0000755000175000001440000000000011763723562013066 5ustar bastiusersNet-ARP/.git/logs/HEAD0000644000175000001440000000273012161753235013505 0ustar bastiusers0000000000000000000000000000000000000000 5d9311f97f62527062ec632acb59f640e0167023 Bastian Ballmann 1339008882 +0200 commit (initial): first commit 5d9311f97f62527062ec632acb59f640e0167023 06aa554ccdf36e7f69503e31e2e82aac7d856300 Bastian Ballmann 1339008915 +0200 commit: removed backup file 06aa554ccdf36e7f69503e31e2e82aac7d856300 23dd2f204ee15ae942fee1680362a199d59fd3e8 Bastian Ballmann 1339009076 +0200 commit: removed unnecessary files 23dd2f204ee15ae942fee1680362a199d59fd3e8 c3028a36a8742b40c74ab918ee8f87e3da9c7a5d Bastian Ballmann 1371891352 +0200 commit: get_mac linux forgot to close socket - see https://rt.cpan.org/Public/Bug/Display.html?id=86221 c3028a36a8742b40c74ab918ee8f87e3da9c7a5d 7fca7170c9a0cf35d48e6d0a8c9ce70376648c69 Bastian Ballmann 1371895483 +0200 commit: fixed unnecessary memcpy of dest addr (see https://rt.cpan.org/Ticket/Display.html?id=86223) 7fca7170c9a0cf35d48e6d0a8c9ce70376648c69 7844f9920ed3c936ffba0feb6f276f16035b8c21 Bastian Ballmann 1371895957 +0200 commit: just doc 7844f9920ed3c936ffba0feb6f276f16035b8c21 f7b42b0cdcaa322e0cdd8e6e4a8b6482c29fcdee Bastian Ballmann 1371897289 +0200 commit: just doc f7b42b0cdcaa322e0cdd8e6e4a8b6482c29fcdee a0a520bb6395828457f5f52a65dd3a6da039a798 Bastian Ballmann 1372051097 +0200 commit: fixed bugfix (see https://rt.cpan.org/Ticket/Display.html?id=86223) Net-ARP/.git/logs/refs/0000755000175000001440000000000011763724011014013 5ustar bastiusersNet-ARP/.git/logs/refs/heads/0000755000175000001440000000000011763723562015111 5ustar bastiusersNet-ARP/.git/logs/refs/heads/master0000644000175000001440000000273012161753235016322 0ustar bastiusers0000000000000000000000000000000000000000 5d9311f97f62527062ec632acb59f640e0167023 Bastian Ballmann 1339008882 +0200 commit (initial): first commit 5d9311f97f62527062ec632acb59f640e0167023 06aa554ccdf36e7f69503e31e2e82aac7d856300 Bastian Ballmann 1339008915 +0200 commit: removed backup file 06aa554ccdf36e7f69503e31e2e82aac7d856300 23dd2f204ee15ae942fee1680362a199d59fd3e8 Bastian Ballmann 1339009076 +0200 commit: removed unnecessary files 23dd2f204ee15ae942fee1680362a199d59fd3e8 c3028a36a8742b40c74ab918ee8f87e3da9c7a5d Bastian Ballmann 1371891352 +0200 commit: get_mac linux forgot to close socket - see https://rt.cpan.org/Public/Bug/Display.html?id=86221 c3028a36a8742b40c74ab918ee8f87e3da9c7a5d 7fca7170c9a0cf35d48e6d0a8c9ce70376648c69 Bastian Ballmann 1371895483 +0200 commit: fixed unnecessary memcpy of dest addr (see https://rt.cpan.org/Ticket/Display.html?id=86223) 7fca7170c9a0cf35d48e6d0a8c9ce70376648c69 7844f9920ed3c936ffba0feb6f276f16035b8c21 Bastian Ballmann 1371895957 +0200 commit: just doc 7844f9920ed3c936ffba0feb6f276f16035b8c21 f7b42b0cdcaa322e0cdd8e6e4a8b6482c29fcdee Bastian Ballmann 1371897289 +0200 commit: just doc f7b42b0cdcaa322e0cdd8e6e4a8b6482c29fcdee a0a520bb6395828457f5f52a65dd3a6da039a798 Bastian Ballmann 1372051097 +0200 commit: fixed bugfix (see https://rt.cpan.org/Ticket/Display.html?id=86223) Net-ARP/.git/logs/refs/remotes/0000755000175000001440000000000011763724011015471 5ustar bastiusersNet-ARP/.git/logs/refs/remotes/origin/0000755000175000001440000000000011763724011016760 5ustar bastiusersNet-ARP/.git/logs/refs/remotes/origin/master0000644000175000001440000000161212161753254020202 0ustar bastiusers0000000000000000000000000000000000000000 06aa554ccdf36e7f69503e31e2e82aac7d856300 Bastian Ballmann 1339009033 +0200 update by push 06aa554ccdf36e7f69503e31e2e82aac7d856300 23dd2f204ee15ae942fee1680362a199d59fd3e8 Bastian Ballmann 1339009109 +0200 update by push 23dd2f204ee15ae942fee1680362a199d59fd3e8 c3028a36a8742b40c74ab918ee8f87e3da9c7a5d Bastian Ballmann 1371891401 +0200 update by push c3028a36a8742b40c74ab918ee8f87e3da9c7a5d 7844f9920ed3c936ffba0feb6f276f16035b8c21 Bastian Ballmann 1371895972 +0200 update by push 7844f9920ed3c936ffba0feb6f276f16035b8c21 f7b42b0cdcaa322e0cdd8e6e4a8b6482c29fcdee Bastian Ballmann 1371897300 +0200 update by push f7b42b0cdcaa322e0cdd8e6e4a8b6482c29fcdee a0a520bb6395828457f5f52a65dd3a6da039a798 Bastian Ballmann 1372051116 +0200 update by push Net-ARP/.git/objects/0000755000175000001440000000000012161753235013544 5ustar bastiusersNet-ARP/.git/objects/04/0000755000175000017500000000000012161273273013733 5ustar bastibastiNet-ARP/.git/objects/04/97107923575d686d160147874aaced7329775e0000444000175000017500000000100512161273273020453 0ustar bastibastix+)JMU034`040075Up +ep :efUDwyRk>@f&&` xWUww~2}5*3S></#݇Buts avLw5 ?M8(S`^?g_[S0|% WG_WB5swp\ r1OEz 5XD=bZh\9٥I)z yC^-)_?| TWZTkYĥ}|2 >UZ 57vwO/tf3h afv<"AM~z' ! @}dg!|&'AX: 85/% 19h?K\MT]/w7u6[Xu͋JhNet-ARP/.git/objects/0c/0000755000175000001440000000000011763723505014052 5ustar bastiusersNet-ARP/.git/objects/0c/fbf08886fca9a91cb753ec8734c84fcbe52c9f0000444000175000001440000000002111763723505021527 0ustar bastiusersxKOR0b0.Net-ARP/.git/objects/0d/0000755000175000001440000000000011763723505014053 5ustar bastiusersNet-ARP/.git/objects/0d/5d94280ef720ebe7cba739405fe4acad22cdcc0000444000175000001440000000147211763723505021561 0ustar bastiusersx}To6Wz*hy $vbLu Fl@KD $hHM:{|M^n݇w? :l* ZɠԢ -x* ! 'Η)2PE)lpεyR PW)7; Gpx"HV**DG\xCu %Їɨ7"j+4Ts.3a_֐FMm0 yElTey%_siP9,M.EB Pt7QumY!-E/B1.o+wpDQ0_ݍlKQT ]~Dglu6j>Y.Mo"`D: "Xr$GBX !EE 0I^h=;*)!→+?uEf5C, DqsS~ 9T8´6c4p&.xot%N\A'Ňnm}b4uuBxZ$صL(mƌzDxSЇϟ#O}@slj%wp-jov-w|.\Oo2Z;N?÷_EFvl#?nE+dMIaGdQ?/K':d ޙq m.4g? `i.X]>t4ږ0qPmU4&sB; H,Mɽ/%6|}Am]Zl~I%q6FmĮ)579Zy3NNet-ARP/.git/objects/12/0000755000175000017500000000000012161263230013722 5ustar bastibastiNet-ARP/.git/objects/12/fe7b7d6708c43cf2fcdb8fa3265d736aad58c50000444000175000017500000000100512161263230021364 0ustar bastibastix+)JMU034`040075Up +ep :efUDwyRk>@f&&` v}7\ޘ!ž _@U8g$楧3}2`G KPeA. %jefťb 2> kzTѸtKK sK ⓊSZR~߉~?6'3zׂճgɉK\g!d}:=$>71j,o ^ndZgytE SqOĆ*-((/* C~aMO47~?trTMqj^J|Abr6~^nlxL,aH߱h{[AD5l:-01\oB|s>rc㌤BQ%%z9 #urŽmޣV>ENNet-ARP/.git/objects/1f/0000755000175000017500000000000012161273273014016 5ustar bastibastiNet-ARP/.git/objects/1f/95f4f03367c7559b619d840a310c4b955e44940000444000175000017500000000101512161273273020606 0ustar bastibastixmk0]H]=XBmYVR[$%~'6RG' G.NyrH_ɳIXV"ӌou#+$~¨au- wYW2cUL#sB/"yAHc|7//z=2]f%!ZEDR:>RnK./Sn:}hBN ƽQ:?:FdIt1Hᮕzf͸ '8W7L|O2UJ,ڸIAvc4)4}>jo9Y7 34BWl(->>Bv t`q˕qwYHU' <!fпOCj  _TOWPܿ-Qc8?/>'A}՘ʄS' A}Dwoߕ1ζs-#/z0GDջi˘љ\·4l;1=hBH䏞sJ;}Net-ARP/.git/objects/23/0000755000175000001440000000000011763724104013770 5ustar bastiusersNet-ARP/.git/objects/23/dd2f204ee15ae942fee1680362a199d59fd3e80000444000175000001440000000025311763724104021215 0ustar bastiusersxAj0s+c’kEk򄜺TcNv^AfLyouԨII.VN,ޏ1! j i☍~TW-Wnۮr5]uJy y Ŀݛx"Y "Znh o1NyNet-ARP/.git/objects/27/0000755000175000001440000000000011763724064014001 5ustar bastiusersNet-ARP/.git/objects/27/602fe8f9652a4acad616da302b0571020e03020000444000175000001440000000100611763724064020725 0ustar bastiusersx+)JMU034`040075Up +ep :efUDwyRk>@f&&` v}7\ޘ!ž _@U8g$楧3}2`G KPeA. %jefťb 2> kzTѸtKK sK ⓊSZR~߉~?6'3zׂճgɉK\g!d}:=$>71j,o ^ndZgL[)ubC^V,/䝂쌞0$D#{C'A$&gx鐫險f Ǵ /f .L8^̦s  P(ay&|7J#;60"_'+=zmY$Net-ARP/.git/objects/27/af51585a4f2c6c0a56c64eb3bc2e86779104180000444000175000001440000000136011763723505021052 0ustar bastiusersxTmO0W+n-RA҆B[@*RErKkյ3);; c[Z5{qcb>6B7c.9jս: hpe i\b Ya8bɤ$A`֡缀bZf [ kUBBlS^ %7dT*2E fO/ PېYg(Q32<O(j0amŜ!bNу 8U*')p*UNX\GPPJp_N*MfȊ+d2Ry4fm O w{5PUN~g4!D0ɤ a0.GGG2Wda\H}q0qi{q<WLQ ayn}my ~A ӆB%4@}gH-`7A ͼU'*f+m1}?=lœufʀ-Net-ARP/.git/objects/28/0000755000175000001440000000000011763723505014001 5ustar bastiusersNet-ARP/.git/objects/28/4be648f7e85cb14d03cecbf6a7cb0574098ed40000444000175000001440000000146211763723505021365 0ustar bastiusersxTM6홿bKvXMQ 1 AC@#0QIj>ɡE Ù7oޛIMׯ)T7RUm}φ=c\W.Ki(_0:OSaXkJql:-1ir!(xuuR? [,c쐬x6ԋN*+GPjio(2@ qB<ޝnF;@{A|c>HFK"Ϡ 8$H!uriǴ4~R}X2ш"QpR'܅:77 6wJac^w8rjIRnC sT4OOڍuYr..\ x[3JpfHG8^P=&PY-!;CYvZN`c<ϫ];2Gi|\樒2LoKtwy/U1_?c[8N0ơ]=A5J3rOt2f-e|KjS!60p'폺)X P=zY\8ֽMPj:l-lJCόm[ZЗC<OA!~C(s 1:8ƀ>92/攑AO(c^`<\vMRvbƜ8!ހNF*=39nϏ6t,.aKtq{If{󰄢iҐ&TlN~_^)enNet-ARP/.git/objects/30/0000755000175000001440000000000011763723623013773 5ustar bastiusersNet-ARP/.git/objects/30/161192c2ed76649f47908b455102981dfa001e0000444000175000001440000000104211763723623020542 0ustar bastiusersx+)JMU031d040075Up +ep :efUDwyRk>@f&&` v}7\ޘ!ž _@U8g$楧3}2`G KPeA. %jefť5}CovZbg-Ei=A H,*`,"RE-/E(.-O*NKfȋWjI|'s_ ڜ̼ ] VJ%'.s;a@L!ԒdS4+~~zC5kΞAS335nԉ{2[岸ο }P }dg!|&'AX: 85/% 19h?K\MT]/w7u6[Xui߻dK(jL#B2s4vAU0'4)/ $7dz4*كUT2E f`P% }M%j&`\Àϩ[Ԯ0am b-ɚeaz|)p FKf,;.GJ*qT\h]~\u,Y tx^N=I`qBn8+$ &؏71x4 8, \5BqQRG6L > =%3x^78#xHQqBд9+`E >M5K;CVb;fI,hyMt@+oy&Pd96Vp?|{`Na _0{jY[h*(Qߠv [{ekMETP3+t'gŅذg~)ϦPK͍[{AD0'? ơsēpm=>&isԝGfG~ Ħy6ao01Abahzq؝ :bmtiQ2 ^͢wU5z<8ouv8`i$S[?V/a 7Q10ym׍{ M'4TQ&3%Q/$ehn% 3Ѹ/|lT@X&'I"91d&Yʐ`Ez 81*^NFf@x~86*Ftnz1?Hk7 tQ(J"sðjF0!M`#ؔ[:9a3 T5x?aҁL8U86M~@ Ԯ^RQ8B-m0d?;B Ӈ Q8zjB: 'tbҌQyeB7ge7iH.czN~mZ_MqdrvWq qfWn`;&k~*I°G@(85]o]s2 ǧ01ɅOzH홎qSxыq<=WKGBe+B5j5aLkԄ2Q!V'owNmHZ8Na[ LC?h݋ wUdKU0!$:v}kxh*zvgN\z^ ?RJ8IF-eR3 `G'K |x^LLET/ &rAl.֥$B_qLpSJ8nrblEfr= /F(qDz/"CԤ%d|a.Mnc3Ps煺"2-3m"pHkwlMVgmQ=w̼0^JQP>ww'\H0;AM^YǾ4 /5/ ~^{e|Z+O;1fl Ox[*[0LdC ClI DQ=;*:2EuJV,BEizrT~N9}TMQuRWqh1chVMy:CJxiDۢSЧf jkNVSnVj:x Q`F<2{MҠ¬gI*5ٷv `S)z܄Iiq q b2CxXVU922ɳR3Kn,#rQe5W\#v,̷|.pҺ8t&[mexhK&bklB ܭb"s؁T0qi Nd6uo[&/ Oe U@Q>T ,]K[0DKWw6N4 (K[NK>_?oS!%kJ[ ?x60fX^.{* ­ sˌ;ͥu*lAݿ_+U֓պKWjwx_v8qE\l[f(.YQ]áO,gGo]9Ԟ ":"b+S9VXߒ,)ªՌ{^IN^cu3tε,,+>Ex>xTO\.iZ~5m Eq;@#طz~lNܦ7wΓ'v񾶾~'Sh3XS! >PD^9vhpIZzyLk N{e}ɡR?kG͵?k|X?ZxzpXњB=bpXx)L]-4sSsyYkUbfܻg(MWT*kJTã9{>x-YGQh.y+k.:Cr84LKB)y鰌RuJFɀ%Ÿ1vZG DJl_la<0%2**ekzP*N{2 q 8D=q9[Ǖ*/.bIJTA`0-1:Da?.hxaqD''3É̼{:qT:^?7T/^zGsϋW!r|fRk&!*Gp@!z؇@>1߃dMr>Rg΁|;5:Q1zQAlJQAc#^3N#x!23I)caf=Y~f:R/a>|6 @Z{IiNWBmB;|MtEk6 5h4GoJ[5yڂc?r-}d| }ϛF:i%㮃BL-GG\NOAka$mgr2:p1/Y$+Ny0x#.loYov/_n\.eJB݉-˂l!'XMJIp9E!kHr F?@풇ҍVu_ל0yX騄)Da@.ЧDxTp$B4ۡQrbCo=[`}"R1؆&Ȓk&*vqVМIfzapJ)X;p0^b<'s'+S#H =|9fQ=\ZW92)YhTҴ ] &S aF;3Ӟ2!ǀ3 '1/% A[aF _L0W8*OnOo-Q,W~Zgd-8Zx80`L.k6ڢq!-R"o5cI0S)pJm@}*/Ʋ|ڈíJgvbaz[Dqk|&ng$P{ԜwDWX ) LU~ '!;!yT5q!2/f,H 7k_0wCfXA7mp7Fa$<0tcfQG'7Vc^8 ͽ_?c7_U.TS⢮"V#{(6.x"] Eڇ.A+5OЫTfߝhV,_BV_Xg Yi %ptIpT(jy;:F <{x ~@{ѢZy*-Y+e"uBE@)`9-zj9)XA:k?,h6Tj3d+$@]lN_wm+y#W>: NLjl7^ 9&`Ǜw>R뀣^ G\.=N,CQ!sw5YH J>} iP1fV2g5/B:jXͮxUI،+[:{vBVOW﷥]R!{ r@hUtL_N'hpOJwAy{RyU@RA BJs$Xaن6EqFkLвNQ$\VOF8k>G/h\=[GV17O~0p[( D-KDTK?H[FSĬ hYMqzVȚdkpU^+H|!705yظ}R6*(juZ*1Oqlʼ}rp MH9+yt(vQ WIqR$ψ?蜎K_jkK*Ag~ Ǹ/1BgaG<4H:jY zqόzۜscp]l"NsA#(>ux|ɸ ӊэr|lTx*z)LPJ0+8eP`2: BșBd7J@>Or"pTE_^#Oe+}+3$ }q9QfJ5F$POe'"C:̢)wTFQcЃ .QMH#َKf^#`é!~~غ?ͮ/iOP+/;v%%ͩ/pEi;-q FK>l#NgĜk*ٚss:"ޕGn 3i &/2^ rdqK3 e !YxG{跜˥{cR5B儶hr+V~ @6kf;5OP%psK u,wbp?1mT?ϾZoXmAp+ejkeX?"tޓKZr+⡺Ⱥl廪# A"w\TZVkPb^ 3XߧKigvxg 6Wǜ$21!eg'}EjةNB 賂dADh7RzohA4yRn+ιh$$ddV2-i4Q$w󅮑Szm32/Rgx[9-k?9mk C* Gaxfc=#JMت\b|^X!u<ҰWؾV\W( Zr"s㛓U:=G?kqt2?,hf9;+0oKvI0 lepG/o4y r|CJ SN%{q3/ c%X.p}7n xLI *ιr/wEA<*/0 EFAc.ޢf3{"0`8  n4B+d'jY7@]W~o0_lpY:(eLdSDwc2SINvu_Dm-ᣫjSx)z''U+BY>٩ Loa&ݬ>5;>3F2{4N'T^Pg VE]F0, v35j5$ 'lH;Ý%S` U;rE%o:; bEb]ř"(dMs>"Te]0> JGܼ%u kn-x λ] ]JU0XBX _2 Hc 0O7y"OL%|HjHj'%hK +.Pi4ƛd0G6[(! b/|iS^4lDdڇT>+ IۀAe"\>Vus2^7~r[8&M"} 3Z8& ?w\96rܷy_[&s-4pּ--58:f.ºZ:F#t:F?lMl縎nK笛[}uZDYֺl2oS*9pFO%CdSY!Sc>*Ǡr-LVr8K~>݇:SY!g8;K"(Ջ~ /! >e$O$i~;?Ͽ^5_A+6  Z9{δ-ڈC3h‰XgX-< " LIpMd:bu;DŽx3O*]/x,KEHSns9CT|Gfޥ@ ׾ Gn2N7 O1*͂敪*M"SW.+(}J:ql:%;d-u)Re!Q}+#S`hظ)g3!%zn`olTĜx6ObڕxyB[BT.a"uPot ]Ήڿ0ElUd*W.zhx!Phn 8dX2)y r):&ѧ~p]-#{V#!TQfxDP  f+*TȯA7,;MMa݋;;"56۞'>ZF(]!fmenm Zth(5O*(R޳ǂ%r`am+JGz֋=zb#rQ27V %y{3E ;Nv$sӎ#w2^ċÝګj헗ZVVQ)(T!sJhm`.rıg #ٲ)YoġIie{fT}๺M5%:2]gnki5h5*^C„Z;܀#ޠ0\Qh 7OصeP h)!vڤʕ&\ [E5iw$MeXUϋmL#ͯr;x-芯Jw ^gr8S8X Mn+@N%c-Nա=CFn`C (Mafa֍1+'u#`dm!9`|~.8 tV@F )YMF7moLF(9qNާzP<'k^PRc(|^rLO{U4n4B1Ėre~j=T8^t6ܛX{MF |N=,FL=Z;/˪ ^U/sf-{S圮 }ˠʂ\]|]օFXG]y瑋eZL̀H,*`,"RE-/E(.-O*NKfȋWjI|'s_ ڜ̼ ] VJ%'.s;a@L!ԒdS4+~~zC5kΞAS3s j3L>qn Y^0 #;' %6 <IX$&gx鐫險f Ǵ /f .L8^̦s  P(a~OLR&B 2jTIjq^A(c~赕OdNet-ARP/.git/objects/4c/ef0aec5577acf64459791bc4db88b0e36862710000444000175000001440000000023611763723562021234 0ustar bastiusersx+)JMU045d040075Up +am9uJ59~ʨ\TT`fbXT]ZT3)xHOoMa.Bե&&M(`Z?LgC$&g6)m|yLn6~1?Net-ARP/.git/objects/4c/f96260c754780c614d7c7e38c32dfb53ded08d0000444000175000001440000000043511763723505021227 0ustar bastiusersxQ]K0B-If(Cf[it{["Rr{νTVӋ4IUB[lBcM2|9u 4xjI)OZa ʊeDY_֫6qd)cEr$Nn+~2⃓fD(uT$'\#Xn FuMkɐ| 18Wwc6i9V=Eްoml҈~MQ??ӳ`낡9A%Pt Z=HNet-ARP/.git/objects/4e/0000755000175000017500000000000012161274225014016 5ustar bastibastiNet-ARP/.git/objects/4e/6765807b62090adc073d96cd59707050b9963b0000444000175000017500000000100412161274225020577 0ustar bastibastix+)JMU034`040075Up +ep :efUDwyRk>@f&&` xWUww~2}5*3S/Z}̃/Buts avLw5 ?M8(S`^?g_[S0|% WG_WuQWmyb})3* 2> kzTѸtKK sK ⓊSZR~߉~?6'3zׂճgɉK\g!d}:=$>71j,o ^ndZgytE SqOĆ*-((/* C~aMO47~?trTMqj^J|Abr6~^nlxL,aH߱h{[AD5l:-017Ĥ'a)n.F0 ;y^[D Net-ARP/.git/objects/56/0000755000175000001440000000000011763723505014002 5ustar bastiusersNet-ARP/.git/objects/56/f1c9c45150a3ccfa322de19b5b417ae0246c4d0000444000175000001440000000141611763723505021246 0ustar bastiusersx͖M6{毘aUg hS0y1F2+jHIM{ >HE;ﰴEn(BIiOp],{@` ``kA0N' VYɱv9$xWE.ՎvOC;#+U溦nGn~+g;js3T 9Ȍ4L`r':٤#M $eEA.\h>KZҲ3T3_٧sJAN"m3 ^^\U zz vݸzЙs`ZO?Ԯ!Hg27emFx¶0ǙZgjj6I {p $>nEjMy]D `+WDb .֔޾h.URىàHRťY٤~{}Nd"qQ$9_Z-p1h*a4bh3ř*:'NR<.+S53TJl'|L'7JC7)T 5l g"آ.2Vt3JJ44gtY -LLcߒk:NF &ؐ[T˿(ۙ@Ƕ(i=2844rcX%>ek^B)1w=A#Џ{ Q/G5tJ%d\w&.XZL dj[z}RS(G',9tL' (W @Net-ARP/.git/objects/5b/0000755000175000001440000000000011763723505014056 5ustar bastiusersNet-ARP/.git/objects/5b/df4766c62dbd4ff6ac80f8dd872e9350c1186c0000444000175000001440000000021111763723505021363 0ustar bastiusersxKOR047gp Ы(J,*rHKO-MNMI uts *((/* rutu*- sK ⓊSr2J+B%P0L85/% 19 bL*?Net-ARP/.git/objects/5d/0000755000175000001440000000000011763723562014063 5ustar bastiusersNet-ARP/.git/objects/5d/9311f97f62527062ec632acb59f640e01670230000444000175000001440000000020111763723562020623 0ustar bastiusersxK 0 )/NjB) z]̼k49r|. O(!qZi-[?CvnR5XI7CR~ W4*~_%u?/>;Net-ARP/.git/objects/65/0000755000175000001440000000000011763723505014002 5ustar bastiusersNet-ARP/.git/objects/65/5ea91ac89f4085bd4069851e6a0ac0db6fd1fc0000444000175000001440000000162611763723505021357 0ustar bastiusersxTmsFWWl$2mqH;#c^4^#iܑ8 y+JuL*lm;NՁArawTr u?&lMS#K4.#$mJ݂0-萺I*n:H+l\mzrqOY>qe-Mgtx94DJĵl?hj^o3_~;޶ sOZ+]n%k65@pLsm62܌{=g%UE Qv:=H8cUܪ(y%FhzeYI$D24}gm8 QA8*Ρ*R)~ˢODךu$BA^$"]L25WJx\re0癈1+a:$)ӕ!hZ4ދKI܃2PW<`p= .fv}7Gh{.@]XIg0.=yQ0LW>0q`t6\&3r5bFDCu$ =~2jYRZכ'0^ bYYG|m.W0_4䘫ڼEG~0%߱I^0o-JS$j6>MȆO V_O:= Ѕ"B@m;xڌ 03ΫĊ /"wpQ\Ql'B<|'5HXg"@{^)>b䙂1gQ8p|5pZu$t έ%1uZŃlurGxy~ 6A[x3ÛOCF8^8 1c5` Y~; G/~% ϡCϽ҅ CW&v >% ԼBނ**;p1UnSѱ=8MLJTnDsܘ-S*,:XbZn(6][V i&&v?1rij{F[^)5e_b#/m4^&9끞im(ekP:̫E4^_L 5~b($N(mN:ط ite[V3*׽f\b{3J2K0KGL#K 7mP"D44$<K$m 'جs]"_y4؎iXJܼ1>*kbkSfXFINet-ARP/.git/objects/75/0000755000175000001440000000000011763723505014003 5ustar bastiusersNet-ARP/.git/objects/75/6b3e8ed8e0d73f8bb16810b4f09fa34d80f4fc0000444000175000001440000000344611763723505021372 0ustar bastiusersxXkOHݯd_ -KW!5 ]ҡ'mϛ۾o@iyjg20L98%7v$6Hi CpdD"4C& o;h8rvKhH}GDc fx۟[h^xrJ=9WA"bl`~1CP8;KpI_vP\;ap7`WPY<;>9?p14qk8<$p!"'L9`B 8hD4hΤ`2-2F`&e rDbK/ƬmQS/u͏csrZ[4|MEAT' 7T~ɋJw7}"-"D2b]rVmyBQG ӣIϤdo{V;om!ge[2l_1v~6M6 |lkGL]j6ݾa:GQ#:6t0cy#O1W Y7&4׉RZ6rjTˬ~*Vrl|{̌hu4ټsV")kY,L D9K06 Y HR\!od>䬁8& XY~ׂ&# b:_oFs?)ȤV`zHg3.y,<2V>9+)1%)T6yV="NMd8a"B kh=1Gc߸WxfBvAah<0L=D?22u}+SX:Mz=}=<بno\ 0>RJLҒh]vݰh=΍t7U5e+R3ٍ.(ʔuɔsO@x'O%k,e&v^w9&mukh B/!Wa)U׻l<UdL;9n( 9 !]:^A*jI0w?Mm죂*gP5|?:= 只-b&fRQK f̼aE>8ߦ-=*ow NZʮ+T9B>W8} `ht1Vz98D]lมPC }@n֒`xh=ˁC{cU< [9~aOa۪l(ç)\U_pb C p{"Αk[.gXa+kW1]TgN+]4H |TYq~,jK2eςz,R[=kY ȥH$ȗrMnQ~@KrHH^>U,Qw?bcY/@lgeS뮘Fshy忱r7+9փN;,.ð}*꘬8+WsjS/_X'A0nus[-1i߫ fwX'+^uk#ubDŽ#~ĈJBu` & Ez^[NdzrRkG(p'tMژ1r,7yIL!Q$i3"p :Xm& 8UʠO Z$P<;jY 6@jPG2jzqI9L*.iW-\4T吇}x Uqc As=QgkN?@ٹx~UF UC9+gjA0\ 2͟TPSky^mls7>HiBSJnԈs2Z+E4e[{Q.Ǔtz84/Qo 8 B@vywCLS hh'Ë&8T"5 I4AS_?ʧ`/?!0Azz`D ٩ Pu6aBn~B6 ]*A=7ih sʖB_!1S|ȁ_P.KΦ]ΏX xHs)5o$.&υZb=MZN̘GPEΰ Bt;q<}~]~5]nh i]˷3 r4iԐ&TlN\.^+Net-ARP/.git/objects/7f/0000755000175000017500000000000012161273401014015 5ustar bastibastiNet-ARP/.git/objects/7f/ca7170c9a0cf35d48e6d0a8c9ce70376648c690000444000175000017500000000036412161273401021170 0ustar bastibastixMN0Y!i6)O#pi2}^D$$M,elh96W]#A̹5-(^cixݐQrk RK%Wj 6  hiAuJgx%#-sbZPJ|H7JQGbhj#( p@O7G+ WBJ%wG4z)4ԶO GD:"M'jOſwNet-ARP/.git/objects/86/0000755000175000017500000000000012161274225013743 5ustar bastibastiNet-ARP/.git/objects/86/27d2272d3af57c9b2aa7cce0675ad1b73fd23d0000444000175000017500000000163112161274225021303 0ustar bastibastixVMo6홿b!di:hh`49Q#E%MBIy3|ޔږqç-wD΋yqhgPW CB@:`k(Dp` 7th ٓ-ٽ NNT<16@pFFXZ3ށu1*ks2jfc6M*Uj1~OݱWBikE!(+rkFiWC/*VZ>Bd/ Q&|F^^^ ܅jULdP01Dpޖ:=<(`"_jG1n$dE/JR%1 !}:˙r~)3vsA'bV.MbH>-jɨv~La)Jt8$VضqD:HMIG.a5Sҥц_Fc'4/G@Bm~AW荇xrڿ*</ ǒ++U1v^'on6OCTέ LS*5J*?*R,C0Tώ"+Ibbf#BnI4TQN&**󜭎;{g97C_U{R{2$2ω6=/ؤA7235l٣c<0i@){Ь\7zTMwPϤK LqySC[BBF&AVJzy\Tr;(Jb|b^K|m9ϩX`G'cG]FLky;CHkTaˢFQR?!F(1k0"aKp;%ԁeG۳GINet-ARP/.git/objects/89/0000755000175000017500000000000012161263230013740 5ustar bastibastiNet-ARP/.git/objects/89/99c5a860261f9835172786f209b01154a7709c0000444000175000017500000000163712161263230020400 0ustar bastibastixTmoFWWLZ!X% Q'x[C]{g !!9׳<3.S>?l:/Bޠ̅lLpuG< AHB!cSn4_0NynaOylD(MlCuZr5؁* @#-A`4T$ 2[d-6_%j´X"J;ԶVh'v/O?kR@_Qnfr5*c$QAXpZB%Ia54"svKWV6~REH#5~7,*H)ʚouBZҫՀ&YQR%Pˤ266ST^ /Yuˏ /O>_cҮ64;R;H"!Io:BiVk,Z-XrMUqׁU@A!e㚔la;~:׏{/ki$!R"차dAS ܛ;0tZ ^Oe}2ZZuX-XcoEf߃GKYL?Ҏҁe+_YZv`y"LUe3>%m  MlX9TRW"p+],ɦ9T$0P*4]OiuXd#Q=HZypB(szDqZL!]V lEnPe_T9I G_qgnQdX9'xD4)Q%T(w9& s(UTh g5ZXoc$jm#/*Hhdsv `-KIs9Wzs_(!r:Mq5g}$.-CVX TXݯlkk]{.ju}pwv@6ry)vk%jTZ%K ?۔4Z"3P:upO6D&K#Fx/K0w]q۶{ڭ=/Y<ڨRLr ⁙jOH͙[jMQ@>;+ʥgeVoX(ߵo=qI)HhQO^$7M8se=o*{{h=Bǒg{FG(UXryW_rnjM3?@A qmi1ro  l H0fe4h)Bx#gT}*b%@;)0/fxl{' $vaYMJ=$(JP7p<!4Qv!zq,a!:p([HZk NF9|/'-X܎i xZ (&xte(ϹBZ`>Л_v[?ճ[6_ߵ"Q`G=Etsˑ.r4 * O;&T܃JXcY&î]c-Elɿa9h3|qG<Q*2q' ƫm[ 1Ϸ0"*ۣd]',L,PhbQ JOGUx۶Aƿ G;PTAxZ? juK,u m;a_ t"w-=EWyX'˴ѡ1 tZV7+:A "hZ'ә5^'8_ ];SdTfNet-ARP/.git/objects/8f/0000755000175000001440000000000011763723562014070 5ustar bastiusersNet-ARP/.git/objects/8f/d988f96aaee8b8f315df84277266508c4be0d60000444000175000001440000000021611763723562021257 0ustar bastiusersx+)JMU046c040031QH/M,aʕ2ۃߴ?Tg>TEN~:ófoxٻ[s]yԍCOz'B J2܏G}Pݾf^PFԲb"um-ʂGh U>Net-ARP/.git/objects/97/0000755000175000001440000000000012161273273014002 5ustar bastiusersNet-ARP/.git/objects/97/9c1b350b27e7bb9d2a4b88d088918904f856270000444000175000001440000000107611763723562020753 0ustar bastiusersx+)JMU037c040075Up +ep :efUDwyRk>@f&&` v}7\ޘ!ž _@U8g$楧3}2`G KPeA. %jefťb *4y|їoOp]11x??ֽY~zQZ@kP 2> kzTѸtKK sK ⓊSZR~߉~?6'3zׂճgɉK\g!d}:=$>71j,o ^ndZgL[)ubC^V,/" E%@=a/,IFN.)NK/HL!Wu5UMVi]^E1;mo+]qM.ay&|7J#;60"_'+=zmY$aqNet-ARP/.git/objects/97/d8fc5c65d9fe1a683489122041ae9cba33f1b10000444000175000017500000000023612161273273021157 0ustar bastibastix+)JMU045d040075Up +am9uJ59~ʨ\TT`fbXT]ZT3)xHOoMa.Bե&&M(`Z?LgC$&gO8xĹ-\ZzԐ8?N1 < \ ]C@|dOoa_tCCR TG I}"eK"D2YH|5>u\@ 0ccJr\LOlNet-ARP/.git/objects/a0/0000755000175000017500000000000012161753235014011 5ustar bastibastiNet-ARP/.git/objects/a0/a520bb6395828457f5f52a65dd3a6da039a7980000444000175000017500000000032012161753235021011 0ustar bastibastixMN!`לƤ.z̨1 PL5^\o%HFgGeКh5Iഢ& , 82n|F4n x"w^"?r­e+n<&z 1w^gPAY>+PJL틘)Hw6ڎ.G}?prLI^cNet-ARP/.git/objects/a2/0000755000175000017500000000000012161273273014012 5ustar bastibastiNet-ARP/.git/objects/a2/0d13edff252744112f43e4979714d628feaa8b0000444000175000017500000000341612161273273021075 0ustar bastibastixX[SF+ͦ&tv} aҌFXk,@L{,c2 ۷guxWhj8H 7aFLעPad>FDaϻ}S2-+a(BMu`¢a$tZ$뽃4mlːd3,Boݙ8a0 U h^ hYr Į%lA!y3MpE`:49VA"`L`~ 32JЙ f{Q,m{>f@8i젋?SwI_aid{%qȹHGӍl{}>džI_\qшZ4h ǝ`2Gi#X"78eDdJ'Įݦ(ݩ[DZ>˜4*|MNx *-3,o(w#Jӥ@͊ p슨)?R .O5<0!ǒbV9}tz":'.d5B2<,-,\^KtY /sLu5_Փ@ìVy[A)#@a3lVQ?Jw/2'eX:;Wles1Ez)1`_CE>|܀E9);txQ ĿjA@B` 'hBgR_#w }̇@fH*> uU!2YM׻sUW 3,(engS'n1܁BpW Ƚܡ1{"plim;5j5V]dyvf̒sٍWKI)vt'jRG֚x4V# ՚*깿e_ Uǽˠ`*M:,rZ d(IGN~xH-782j-QY0wzӡzaVN3Ost+]ѱ >ך*ԤNŒ:z*#%-Jr"q~ {/$o^5j4fBUks}h@v`8-Vh0RLQ_bVIz98fmpXS(Ǘ `Es៬OgVF(is$R w,UcO)Rʺ ˌ"tq٦vL,nv[&Ey٫6e:YwϦ<%oU˶ % W2%ޕ䜤ByThU^$z~TQ-(tHuj W0OQRdT((0ݴᗝܟ<0NFQ+̀F;kOf2l]+ e-[Zj\&DZj+m"P]_V!q^سv< [K &tb%teCYJZh:?K^IS\MC#_zya+W^),ub1dW23QF/,^g|1M@ZT0ez%wHy̜d^Net-ARP/.git/objects/ab/0000755000175000017500000000000012161276711014072 5ustar bastibastiNet-ARP/.git/objects/ab/96728fc2dc211054d586998a0bb0a62a3f3ff40000444000175000017500000000277212161276711021155 0ustar bastibastixWmsFWlmwglِ6i`hfbzsݎ~|OVtWwHs/3yeL0Z|Ωu#B.SkD˰BuhБwX |,K[X8}ukJeߵ+W,P?0m/g TQX<̢!2xm_rKeb5Vfu4^{O+ 񄕗 E /J!iJOs6HWʈgJ<OK1Z"cnJva_ tw8{1,|EtZV;+:AEҋ3K#}"?N)m5Yք"zrNet-ARP/.git/objects/ae/0000755000175000017500000000000012161274225014073 5ustar bastibastiNet-ARP/.git/objects/ae/55583b5ad42a17deb3b9c4d1762ae035be64980000444000175000017500000000150112161274225021221 0ustar bastibastixTMo6홿bKm Nz"h ]`MF!TI>r?C)f{fJmKOba\=BζNT/郒Oi咺d1ߐ(zz.(uR]]TXhZ.#JhV8Rؽr 6fPgX J\gbP]4K_u(6+E6/86DC%25Vk;+. JAuϋm|7z~R`.S/}e"P=\SM`-SbN>3aN~oB5SðDbYhYLp # p=8hњT*C+? P:lLEː9 p%׵jvnzMqK#ćyԜ#c X M%9N|EJEIAX&MZ7P%Kh1GZ{j{U*!JqvX`68ӎ.]ȫQܺV-Y`H5Lq[.]N0B&78!BUtkk-dj%47 uv_Q%LeF6h.8N-?#^SYX Q|5grj ]!pɲż.@:z\ίf7p-,R+40CR/m%%D$jxF%|"\\MWx&9!)yU qYZ:3V©_0!+CV4Dq٭m5l/>zZ}7ԛH g뾪͘ɄӮ10[?'>~{꼏1{3x\߷2h,jTFz~ۈJ75Sj3|BqO/!.HD{?_zmЉNet-ARP/.git/objects/ba/0000755000175000001440000000000011763723505014132 5ustar bastiusersNet-ARP/.git/objects/ba/a0ab9a679a1e171b4cd704f7081231505c6bc20000444000175000001440000000255211763723505021160 0ustar bastiusersxVaoGܯj줖ji cXQTh[|+=4XO۝}3W?4v FC93et7:OŒ[mQdeФBW:D2\YXȈfKz+2`V$Bh LjZ]Z:eHaFy 'YoZ?h6`"$JI[a1-MN![Y5˝ SDj$,8NI)!8\ҩҊ,Q!U%H ,Q8JqK5/!oEM p V%I0gr'5B79Pk޷F`.6ؕ7RB-DhavKyg>}mߛ| M8^Ehk_[#^N=#sϧI'TՃFt䑤ߤ72K=4J_mײeLx-ueBl/kJo ,>MSy]KaØ8wAn%{Jp;uF( A85J"B-"S.{^|m*kbA{qitH!`M d?6rA9:54e7\~Vg$A1] 5R,M@ Lq$K6`yV""yHgn DLh<@}jZ`E R q5TqW1oWHc `&!f *eOed.wL1[v30/h"BoiߢTP"8/0ɥiɌeԺB?"%T U,*U;Sa7ЍHTGSݤxhqCT 2C3㱶Vk)We6aeEra,o>xAٽE%klkVUZ0k*B2U|؞.[JO **7Lj4h9}w:j׀PN^P+cx;d=TKVcVT^r/ei~BlhYf[R%]q-7BaP`ۉ<ފ? p4<v&g=ΆSDGʆZu#6> nPK̆{tsk%C{S|%BwnVbsuKuy,;\]Y9&ypw;5ի;CƢ)_Ϳ%5s^=~Ykxi47*/X" N<2xxf%+C#8 |`Net-ARP/.git/objects/c2/0000755000175000001440000000000011763723505014054 5ustar bastiusersNet-ARP/.git/objects/c2/452735ac7ad77747354336a17ac75c85aa57740000444000175000001440000000137711763723505020730 0ustar bastiusersx}To9QU*i%AZ@T!;{X5&|n@Ixf<j޴Aѯ+kMa'1\ MP:c Jz/Sr@%2鶺V(jl19LNm TiuJ@$ mރM C\p԰ȷZ0U1ՃpH1# ,eYId |ꓸ)w6Cċ{Ls'o D`4,E ֡V: .QttjxKyX r=DXGr?ք?MI:TSy[:O.!C}}V6[46/C{qT}5֮&2E9nG_0&CP_@U?VFqrgS0f%G=Y$u>u{y$`|HgZ/u5kmJ玽KjM`ټH&#҄h|M_I8g[g6c! xs$\GxV3jS[n]Y՜/oF* ==W zwSW'h57Zrby3B/ 0wNȪ9]C{:G TNet-ARP/.git/objects/c3/0000755000175000017500000000000012161263257014016 5ustar bastibastiNet-ARP/.git/objects/c3/028a36a8742b40c74ab918ee8f87e3da9c7a5d0000444000175000017500000000034212161263257021241 0ustar bastibastix[N0}fn^-\;0C;:${K|KN+4w|Tyfm@Gm`xPfP{4OXB9M~d9EΥ{uOӮ蟭QJ6tg_Net-ARP/.git/objects/e1/0000755000175000017500000000000012161753231014012 5ustar bastibastiNet-ARP/.git/objects/e1/a4ee73c321a1de8a1263a18dfcd7d490695e140000444000175000017500000000125412161753231021217 0ustar bastibastixTO0ݿ˧1thB2icH\ZPwvۭC -RݻX1OO^ @`P\I(-\ZM5+ `+ gV! &%ty 6~}Gs:%W @FRilBU0!6/ %7dv4*T2C f`P%m}%j&`P@O(;.:0am!'ruZtEaj?+ t35'E3f{.#GJ+q\EeB_U$A^7 lfx:Y9 NCBO,~rǪ}0G>t; )N:9qr66ۃQhm?φChĐ+2UV9"ca(:槑9mum,UG> LJkmb~u[F0  C,aaF3j_GI+~ʃy (_0m ~IB; &qI-L\a#UP\G-ʁݴ7ȀBnuh^Sh6}ܭ؅S2cY0-dvB_ A򧲰tJ$0y#! 4|UOBJ1L Rxkwi'1瑟z |"N%2NpYLbiJ92ᯱJ>\n#L}JiU6pYV="NMx8a#L50Ñ:o<+<$%0w߽xq2Ք+?ʪ[[JAcLqcn}ȔNywr3NS =] ܾB ȽܠʽLkᴶbʘF lrCv Y8;)[TPSYr.I%'H*QfN_,].%2]udtAMd.RUݪG+_X` %)wCȮ@r5C\eͽ rŹkYljk2 4lZC_t>+E+7H_k"IUSmF`̼cE**$cGmIZYcԢB^KdCı^G@ͥ"YlUЫ̹̺มX. Ww`xgEázֽ*q V9|g,|[5 ū* ByLBiMW)Jk[omje*qu*Du'NKE$ p \pZۂR<1eɟ虻RB]a9< :9]MEl _\KE5kJ:}21g("DW%iQOǑ1Gh3Hó e>W ]*ΝbjW^2vԵ7Kҕ EM]Or(J?Hoڞ5{ | V#*ǣ=m:0R`g!? X=`m,|j~N5x_=zvZyukkO̡оV(]h඲7 x2us {2١$47"HS[CRiMʓ,SV&4Net-ARP/.git/objects/f3/0000755000175000001440000000000011763723505014060 5ustar bastiusersNet-ARP/.git/objects/f3/13ec0e823c385ae207e575213375b48ff79fa50000444000175000001440000000162711763723505021067 0ustar bastiusersxUoF#Kb%\Dr)uS°U.]U΂q6<ذ37 3" nL>o ͥE S+TjX>҆G| A<L0" +"a6n0@s?OpN&@8;A8|zN4 3Qb0\#%SR.mO; ͭ{|ToLuwTMǀ *)u [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '1.0.8'; 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 =item B 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. =item B $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 $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 =head1 SEE ALSO man -a arp =head1 AUTHOR Bastian Ballmann [ balle@codekid.net ] http://www.codekid.net =head1 COPYRIGHT AND LICENSE Copyright (C) 2004-2013 by Bastian Ballmann License: GPLv2 =cut Net-ARP/ARP.xs0000644000175000000000000001261612161752744012073 0ustar bastiroot/* Perl ARP Extension Create and send an arp packets, lookup mac addresses Programmed by Bastian Ballmann Last update: 22.06.2013 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. */ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include #include #include #include #include #include #include #include #include "arp.h" MODULE = Net::ARP PACKAGE = Net::ARP int send_packet(dev, sip, dip, smac, dmac, type) const char *dev; const char *sip; const char *dip; const char *smac; const char *dmac; const char *type; CODE: int uid; unsigned int packetsize = sizeof(struct my_arphdr) + sizeof(struct ether_header); unsigned char packet[packetsize]; struct ether_header *ethhdr = (struct ether_header *)packet; struct my_arphdr *arp = (struct my_arphdr *)(packet + sizeof(struct ether_header)); u_short op; in_addr_t ipaddr; RETVAL = 1; // Are you root? uid = getuid(); if(uid != 0) { printf("You must have UID 0 instead of %d.\n",uid); exit(0); } // Initialize packet buffer memset(packet,0,packetsize); // What's the ARP operation type? if(!strcmp(type,"request")) { op = ARPOP_REQUEST; } else if(!strcmp(type,"reply")) { op = ARPOP_REPLY; } else if(!strcmp(type,"revrequest")) { op = ARPOP_REVREQUEST; } else if(!strcmp(type,"revreply")) { op = ARPOP_REVREPLY; } else if(!strcmp(type,"invrequest")) { op = ARPOP_INVREQUEST; } else if(!strcmp(type,"invreply")) { op = ARPOP_INVREPLY; } else { printf("Unknown ARP operation\n"); RETVAL = 0; } if(smac == NULL) { printf("Parameter smac is NULL! Terminating.\n"); RETVAL = 0; } if(dmac == NULL) { printf("Parameter dmac is NULL! Terminating.\n"); RETVAL = 0; } // Found a dollar sign? if(strchr(smac,36)) { printf("Found a $ char in smac! Terminating.\n"); RETVAL = 0; } if(strchr(dmac,36)) { printf("Found a $ char in dmac! Terminating.\n"); RETVAL = 0; } if(ether_aton(smac) == NULL) { printf("Invalid source mac address! Terminating.\n"); RETVAL = 0; } if(ether_aton(dmac) == NULL) { printf("Invalid destination mac address! Terminating.\n"); RETVAL = 0; } // Check ips if(inet_addr(sip) == INADDR_NONE) { printf("Invalid source ip address! Terminating.\n"); RETVAL = 0; } if(inet_addr(dip) == INADDR_NONE) { printf("Invalid destination ip address! Terminating.\n"); RETVAL = 0; } // Construct and send packet if(RETVAL != 0) { // Ethernet header memcpy(ethhdr->ether_dhost,(u_char *)ether_aton(dmac),ETHER_ADDR_LEN); // Destination MAC memcpy(ethhdr->ether_shost,(u_char *)ether_aton(smac),ETHER_ADDR_LEN); // Source MAC ethhdr->ether_type = htons(ETHERTYPE_ARP); // ARP protocol // ARP header arp->hw_type = htons(ARPHDR_ETHER); // Hardware address type arp->proto_type = htons(ETH_P_IP); // Protocol address type arp->ha_len = ETH_ALEN; // Hardware address length arp->pa_len = IP_ALEN; // Protocol address length arp->opcode = htons(op); // ARP operation memcpy(arp->source_add,(u_char *)ether_aton(smac),ETH_ALEN); // Source MAC memcpy(arp->dest_add,(u_char *)ether_aton(dmac),ETH_ALEN); // Destination MAC ipaddr = inet_addr(sip); memcpy(arp->source_ip, (u_char *)&ipaddr, IP_ALEN); // Source IP ipaddr = inet_addr(dip); memcpy(arp->dest_ip, (u_char *)&ipaddr, IP_ALEN); // Destination IP // Run packet!! Run! // FreeBSD code if(SOCK_TYPE == SOCK_RAW) { RETVAL = send_packet_bsd(dev,packet,packetsize); } // Linux code else { RETVAL = send_packet_linux(dev,packet,packetsize); } } OUTPUT: RETVAL char * get_mac(dev) const char *dev; CODE: char tmp[HEX_HW_ADDR_LEN] = "unknown"; if(SOCK_TYPE == SOCK_RAW) { get_mac_bsd(dev,tmp); } else { get_mac_linux(dev,tmp); } RETVAL = tmp; OUTPUT: RETVAL char * arp_lookup(dev, ip) const char *dev; const char *ip; CODE: char tmp[HEX_HW_ADDR_LEN] = "unknown"; if(SOCK_TYPE == SOCK_RAW) { arp_lookup_bsd(dev,ip,tmp); } else { arp_lookup_linux(dev,ip,tmp); } RETVAL = tmp; OUTPUT: RETVAL Net-ARP/Changes0000644000175000000000000000622112406610564012356 0ustar bastirootChanges between 1.0.8 and 1.0.9 - missing includes for BSD (thanks to Damyan Ivanov) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0.7 and 1.0.8 - fixed bugfix (see https://rt.cpan.org/Ticket/Display.html?id=86223) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0.6 and 1.0.7 - fixed unnecessary memcpy of dest addr (see https://rt.cpan.org/Ticket/Display.html?id=86223) Thanks to Daniel Black - abort on unknown arp operation - get_mac linux forgot to close socket - see https://rt.cpan.org/Public/Bug/Display.html?id=86221 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0.5 and 1.0.6 new linux arp lookup via ioctl by Franck Joncourt -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0.4 and 1.0.5 buffer overflow patch by Franck Joncourt -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0.3 and 1.0.4 fix FTBFS due to unaligned assignment problems by Niko Tyni get_mac unknown device fix by Franck Joncourt -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0.2 and 1.0.3 Fixed possible buffer overflow in get_mac_linux() FreeBSD 7 amd64 patches by mitsuru@riken.jp -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0.1 and 1.0.2 FreeBSD 7 bugfixes by Niels Bakker -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 1.0 and 1.0.1 Segfault bugfix on 64 bit cpus by Paul Kolano -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.8 and 1.0 API Change for get_mac() and arp_lookup() - see perldoc Updated test script (Net::Pcap not needed if unavailable) New test suite to test for unwanted input. Fixed possible segfault in send_packet() because of not checking src / dst ip values -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.7 and 0.8 Fixed typo in return value of arp_lookup() and get_mac() Fixed a segfault in send_packet() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.6 and 0.7 arp_lookup bugfix by Jeff Pinyan -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.5 and 0.6 Filedescriptor Bugfixes in arp_lookup by Sigmund Augdal Helberg -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.4 and 0.5 Bugfixes in function send_packet by Jonas Nagel fireball@zerouptime.ch -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.3 and 0.4 ARP broadcast -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.2 and 0.3 Check in all functions if we got all parameter we need -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Changes between 0.1 and 0.2 Alexander Mueller visus@portsonline.net updated the arp lookup function for linux to make use of the proc fs. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Net-ARP/MANIFEST0000755000175000001440000000026110560062474012404 0ustar bastiusersARP.xs arp.h Changes Makefile.PL MANIFEST ppport.h README t/ARP.t ARP.pm arp_lookup_bsd.c arp_lookup_linux.c get_mac_bsd.c get_mac_linux.c send_packet_bsd.c send_packet_linux.c Net-ARP/Makefile.PL0000755000175000001440000000240412161753127013227 0ustar bastiusers# # Perl ARP Extension makefile # # Programmed by Bastian Ballmann # Last update: 24.06.2013 # # 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. use ExtUtils::MakeMaker; use Config; BEGIN { eval { require Net::Pcap }; if($@) { print "Module Net::Pcap is required for make test!\n"; } } if($Config{'osname'} =~ /linux/i) { $flags = "-DLINUX"; $objects = "ARP.o send_packet_linux.o get_mac_linux.o arp_lookup_linux.o"; } elsif($Config{'osname'} =~ /bsd/i) { $flags = "-DBSD"; $objects = "ARP.o send_packet_bsd.o get_mac_bsd.o arp_lookup_bsd.o"; } else { $flags = "-DBSD"; $objects = "ARP.o get_mac_bsd.o arp_lookup_bsd.o"; } WriteMakefile( NAME => 'Net::ARP', VERSION => '1.0.8', AUTHOR => 'Bastian Ballmann', DEFINE => $flags, OBJECT => $objects ); Net-ARP/README0000755000175000001440000000300412161274027012127 0ustar bastiusers-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Net::ARP Programmed by Bastian Ballmann Web: http://www.codekid.net Mail: balle@codekid.net -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ---:[ Description This module is a Perl extension to create and send ARP packets and lookup local or remote mac addresses. You do not need to install any additional libraries like Libnet to compile this extension. It uses kernel header files to create the packets. ---:[ IMPORTANT NOTICE 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. ---:[ Installation To install this module type the following: perl Makefile.PL make make test make install ---:[ Usage Please read the POD documentation: perldoc Net::ARP. If you've still any questions feel free to ask. ---:[ Want to contribute? Please drop me a mail and if you want to submit patches please generate them using "diff -Nru" on the latest version or use the exellent github pull request feature! https://github.com/balle/Net-ARP There is also the possibility to use the CPAN bugtracker https://rt.cpan.org Last but not least new code for new features should be commented and I like test code ;) ---:[ COPYRIGHT AND LICENCE Copyright (C) 2004-2013 by Bastian Ballmann This software is licensed under GPLv2 Net-ARP/arp.h0000755000175000000000000000414312161752642012024 0ustar bastiroot/* Perl ARP Extension header file Programmed by Bastian Ballmann Last update: 19.12.2003 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. */ #define ARPOP_REQUEST 1 #define ARPOP_REPLY 2 #define ARPOP_REVREQUEST 3 #define ARPOP_REVREPLY 4 #define ARPOP_INVREQUEST 8 #define ARPOP_INVREPLY 9 #define ARPHDR_ETHER 1 #ifndef ETH_ALEN #define ETH_ALEN 6 #endif #ifndef ETH_P_IP #define ETH_P_IP 0x0800 #endif #ifndef ETH_P_ARP #define ETH_P_ARP 0x0806 #endif #ifndef ETH_P_ALL #define ETH_P_ALL 0x0000 #endif #ifdef BSD #define SOCK_TYPE SOCK_RAW #else #define SOCK_TYPE SOCK_PACKET #endif #define IP_ALEN 4 /* Length of the hardware address in the standard hex-digits-and-colons * notation (null terminated string) */ #define HEX_HW_ADDR_LEN 18 // ARP Header Struktur struct my_arphdr { u_short hw_type; // hardware type u_short proto_type; // protocol type u_char ha_len; // hardware address len u_char pa_len; // protocol address len u_short opcode; // arp opcode u_char source_add[ETH_ALEN]; // source mac u_char source_ip[IP_ALEN]; // source ip u_char dest_add[ETH_ALEN]; // dest mac u_char dest_ip[IP_ALEN]; // dest ip }; extern struct ether_addr *ether_aton (__const char *__asc) __THROW; extern int get_mac_linux(const char *dev, char *mac); extern int get_mac_bsd(const char *dev, char *mac); extern int arp_lookup_linux(const char *dev, const char *ip, char *mac); extern int arp_lookup_bsd(const char *dev, const char *ip, char *mac); extern int send_packet_linux(const char *dev, u_char *packet, u_int packetsize); extern int send_packet_bsd(const char *dev, u_char *packet, u_int packetsize); Net-ARP/arp_lookup_bsd.c0000755000175000017500000000435112406610353014367 0ustar bastibasti/* Perl ARP Extension Lookup the MAC address of an ip address BSD code Programmed by Bastian Ballmann Last update: 20.09.2006 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. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "arp.h" #define ROUNDUP(a) \ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) int arp_lookup_bsd(const char *dev, const char *ip, char *mac) { int mib[6]; size_t needed; char *lim, *buf, *next; if ( (mac == NULL) || (dev == NULL) || (ip == NULL) ) return -1; strncpy(mac,"unknown", HEX_HW_ADDR_LEN); mac[HEX_HW_ADDR_LEN-1] = '\0'; mib[0] = CTL_NET; mib[1] = PF_ROUTE; mib[2] = 0; mib[3] = AF_INET; mib[4] = NET_RT_FLAGS; mib[5] = RTF_LLINFO; /* Retrieve routing table */ if(sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) { perror("route-sysctl-estimate"); exit(1); } if((buf = malloc(needed)) == NULL) { perror("malloc"); exit(1); } if(sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { perror("retrieval of routing table"); exit(1); } lim = buf + needed; next = buf; /* Search for the requested ip */ while (next < lim) { struct rt_msghdr *rtm = (struct rt_msghdr *)next; struct sockaddr_inarp *sinarp = (struct sockaddr_inarp *)(rtm + 1); struct sockaddr_dl *sdl = (struct sockaddr_dl *)((char *)sinarp + ROUNDUP(sinarp->sin_len)); if( (sdl->sdl_alen) && (!strcmp(ip,inet_ntoa(sinarp->sin_addr))) ) { sprintf(mac,"%s", ether_ntoa((struct ether_addr *)LLADDR(sdl))); } next += rtm->rtm_msglen; } free(buf); return(0); } Net-ARP/arp_lookup_linux.c0000755000175000001440000000613611244045331015011 0ustar bastiusers/* Perl ARP Extension Lookup the MAC address of an ip address Linux code Programmed by Bastian Ballmann and Alexander Mueller Last update: 20.09.2006 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. */ #include #include #include #include #include #include #include #include #include #include /* * Search for a hardware address linked to an IP address on a device * * @device: network interface name we are going to query * @ip: ip address (IPv4 numbers-and-dots notation) whose hardware address * is going to be looked for * @hw_addr: buffer containing the hardware mac_address * * \returns 0 if a hardware address has been found. @mac is set accordingly as * a null terminated string. * 1 if an error occured */ int arp_lookup_linux ( const char *device, const char *ip, char *hw_addr) { int s; unsigned char err; struct in_addr ipaddr; struct arpreq areq; struct sockaddr_in *sin; err = 1; /* A device name must be a null terminated string whose length is less * than 16 bytes */ if ( !strlen(device) || (strlen(device) >= 16) ) fprintf(stderr, "No valid device name found.\n"); /* Is there a buffer allocated to store the hardware address? */ else if (hw_addr == NULL) fprintf(stderr, "No memory allocated to store the hardware address.\n"); /* Make sure the ip address is valid */ else if ( !strlen(ip) || (inet_aton(ip, &ipaddr) == 0) ) fprintf(stderr, "Invalid ip address.\n"); /* Create the socket */ else if ((s = socket(AF_INET, SOCK_DGRAM, 0)) == -1) perror("Socket"); else { /* Set up the protocol address */ memset(&areq, 0, sizeof(areq)); sin = (struct sockaddr_in *) &areq.arp_pa; sin->sin_family = AF_INET; sin->sin_addr = ipaddr; /* Set up the hardware address */ sin = (struct sockaddr_in *) &areq.arp_ha; sin->sin_family = ARPHRD_ETHER; strcpy(areq.arp_dev, device); /* Carry out the request */ if (ioctl(s, SIOCGARP, &areq) == -1) perror("SIOCGARP"); else { sprintf(hw_addr, "%02x:%02x:%02x:%02x:%02x:%02x", areq.arp_ha.sa_data[0] & 0xFF, areq.arp_ha.sa_data[1] & 0xFF, areq.arp_ha.sa_data[2] & 0xFF, areq.arp_ha.sa_data[3] & 0xFF, areq.arp_ha.sa_data[4] & 0xFF, areq.arp_ha.sa_data[5] & 0xFF); err = 0; } /* Close the current socket */ close(s); } return err; } Net-ARP/get_mac_bsd.c0000755000175000001440000000270211205754776013662 0ustar bastiusers/* Perl ARP Extension Get the MAC address of an interface BSD code Programmed by Bastian Ballmann Last update: 09.02.2006 Fixed for FreeBSD by Niels Bakker Last update: 2007-12-26 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. */ #include #include #include #include #include #include #include #include #include "arp.h" int get_mac_bsd(const char *dev, char *mac) { struct ifaddrs *iface, *iffirst; if ( (mac == NULL) || (dev == NULL) ) return -1; strncpy(mac,"unknown", HEX_HW_ADDR_LEN); mac[HEX_HW_ADDR_LEN-1] = '\0'; if (getifaddrs(&iface)) return -1; iffirst = iface; while(iface->ifa_next != NULL) { if(!strcmp(iface->ifa_name,dev)) { if (iface->ifa_addr->sa_family == AF_LINK) { struct sockaddr_dl *sdl = (struct sockaddr_dl *) iface->ifa_addr; sprintf(mac, "%s", ether_ntoa((struct ether_addr *)LLADDR(sdl))); break; } } iface = iface->ifa_next; } freeifaddrs(iffirst); return 0; } Net-ARP/get_mac_linux.c0000755000175000001440000000344612161263143014240 0ustar bastiusers/* Perl ARP Extension Get the MAC address of an interface Linux code Programmed by Bastian Ballmann Last update: 09.02.2006 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. */ #include #include #include #include #include #include #include #include "arp.h" int get_mac_linux(const char *dev, char *mac) { int sock; struct ifreq iface; if ( !strlen(mac) || !strlen(dev) ) return -1; /* Set hardware address as unknown */ strncpy(mac,"unknown", HEX_HW_ADDR_LEN); mac[HEX_HW_ADDR_LEN-1] = '\0'; /* Copy device name into the ifreq strcture so that we can look for its * hardware address through an ioctl request */ strncpy(iface.ifr_name, dev, IFNAMSIZ); iface.ifr_name[IFNAMSIZ-1] = '\0'; // Open a socket if((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { perror("socket"); return -1; } else { // Get the interface hardware address if((ioctl(sock, SIOCGIFHWADDR, &iface)) < 0) { perror("ioctl SIOCGIFHWADDR"); close(sock); return -1; } else { sprintf(mac,"%02x:%02x:%02x:%02x:%02x:%02x", iface.ifr_hwaddr.sa_data[0] & 0xff, iface.ifr_hwaddr.sa_data[1] & 0xff, iface.ifr_hwaddr.sa_data[2] & 0xff, iface.ifr_hwaddr.sa_data[3] & 0xff, iface.ifr_hwaddr.sa_data[4] & 0xff, iface.ifr_hwaddr.sa_data[5] & 0xff); } } close(sock); return 0; } Net-ARP/ppport.h0000755000175000001440000006277311217232073012762 0ustar bastiusers /* ppport.h -- Perl/Pollution/Portability Version 2.007 * * Automatically Created by Devel::PPPort on Fri Oct 24 16:45:45 2003 * * Do NOT edit this file directly! -- Edit PPPort.pm instead. * * Version 2.x, Copyright (C) 2001, Paul Marquess. * Version 1.x, Copyright (C) 1999, Kenneth Albanowski. * This code may be used and distributed under the same license as any * version of Perl. * * This version of ppport.h is designed to support operation with Perl * installations back to 5.004, and has been tested up to 5.8.1. * * If this version of ppport.h is failing during the compilation of this * module, please check if a newer version of Devel::PPPort is available * on CPAN before sending a bug report. * * If you are using the latest version of Devel::PPPort and it is failing * during compilation of this module, please send a report to perlbug@perl.com * * Include all following information: * * 1. The complete output from running "perl -V" * * 2. This file. * * 3. The name & version of the module you were trying to build. * * 4. A full log of the build that failed. * * 5. Any other information that you think could be relevant. * * * For the latest version of this code, please retreive the Devel::PPPort * module from CPAN. * */ /* If you use one of a few functions that were not present in earlier * versions of Perl, please add a define before the inclusion of ppport.h * for a static include, or use the GLOBAL request in a single module to * produce a global definition that can be referenced from the other * modules. * * Function: Static define: Extern define: * newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL * */ /* To verify whether ppport.h is needed for your module, and whether any * special defines should be used, ppport.h can be run through Perl to check * your source code. Simply say: * * perl -x ppport.h *.c *.h *.xs foo/bar*.c [etc] * * The result will be a list of patches suggesting changes that should at * least be acceptable, if not necessarily the most efficient solution, or a * fix for all possible problems. It won't catch where dTHR is needed, and * doesn't attempt to account for global macro or function definitions, * nested includes, typemaps, etc. * * In order to test for the need of dTHR, please try your module under a * recent version of Perl that has threading compiled-in. * */ /* #!/usr/bin/perl @ARGV = ("*.xs") if !@ARGV; %badmacros = %funcs = %macros = (); $replace = 0; foreach () { $funcs{$1} = 1 if /Provide:\s+(\S+)/; $macros{$1} = 1 if /^#\s*define\s+([a-zA-Z0-9_]+)/; $replace = $1 if /Replace:\s+(\d+)/; $badmacros{$2}=$1 if $replace and /^#\s*define\s+([a-zA-Z0-9_]+).*?\s+([a-zA-Z0-9_]+)/; $badmacros{$1}=$2 if /Replace (\S+) with (\S+)/; } foreach $filename (map(glob($_),@ARGV)) { unless (open(IN, "<$filename")) { warn "Unable to read from $file: $!\n"; next; } print "Scanning $filename...\n"; $c = ""; while () { $c .= $_; } close(IN); $need_include = 0; %add_func = (); $changes = 0; $has_include = ($c =~ /#.*include.*ppport/m); foreach $func (keys %funcs) { if ($c =~ /#.*define.*\bNEED_$func(_GLOBAL)?\b/m) { if ($c !~ /\b$func\b/m) { print "If $func isn't needed, you don't need to request it.\n" if $changes += ($c =~ s/^.*#.*define.*\bNEED_$func\b.*\n//m); } else { print "Uses $func\n"; $need_include = 1; } } else { if ($c =~ /\b$func\b/m) { $add_func{$func} =1 ; print "Uses $func\n"; $need_include = 1; } } } if (not $need_include) { foreach $macro (keys %macros) { if ($c =~ /\b$macro\b/m) { print "Uses $macro\n"; $need_include = 1; } } } foreach $badmacro (keys %badmacros) { if ($c =~ /\b$badmacro\b/m) { $changes += ($c =~ s/\b$badmacro\b/$badmacros{$badmacro}/gm); print "Uses $badmacros{$badmacro} (instead of $badmacro)\n"; $need_include = 1; } } if (scalar(keys %add_func) or $need_include != $has_include) { if (!$has_include) { $inc = join('',map("#define NEED_$_\n", sort keys %add_func)). "#include \"ppport.h\"\n"; $c = "$inc$c" unless $c =~ s/#.*include.*XSUB.*\n/$&$inc/m; } elsif (keys %add_func) { $inc = join('',map("#define NEED_$_\n", sort keys %add_func)); $c = "$inc$c" unless $c =~ s/^.*#.*include.*ppport.*$/$inc$&/m; } if (!$need_include) { print "Doesn't seem to need ppport.h.\n"; $c =~ s/^.*#.*include.*ppport.*\n//m; } $changes++; } if ($changes) { open(OUT,">/tmp/ppport.h.$$"); print OUT $c; close(OUT); open(DIFF, "diff -u $filename /tmp/ppport.h.$$|"); while () { s!/tmp/ppport\.h\.$$!$filename.patched!; print STDOUT; } close(DIFF); unlink("/tmp/ppport.h.$$"); } else { print "Looks OK\n"; } } __DATA__ */ #ifndef _P_P_PORTABILITY_H_ #define _P_P_PORTABILITY_H_ #ifndef PERL_REVISION # ifndef __PATCHLEVEL_H_INCLUDED__ # include # endif # if !(defined(PERL_VERSION) || (SUBVERSION > 0 && defined(PATCHLEVEL))) # include # endif # ifndef PERL_REVISION # define PERL_REVISION (5) /* Replace: 1 */ # define PERL_VERSION PATCHLEVEL # define PERL_SUBVERSION SUBVERSION /* Replace PERL_PATCHLEVEL with PERL_VERSION */ /* Replace: 0 */ # endif #endif #define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION) /* It is very unlikely that anyone will try to use this with Perl 6 (or greater), but who knows. */ #if PERL_REVISION != 5 # error ppport.h only works with Perl version 5 #endif /* PERL_REVISION != 5 */ #ifndef ERRSV # define ERRSV perl_get_sv("@",FALSE) #endif #if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)) /* Replace: 1 */ # define PL_Sv Sv # define PL_compiling compiling # define PL_copline copline # define PL_curcop curcop # define PL_curstash curstash # define PL_defgv defgv # define PL_dirty dirty # define PL_dowarn dowarn # define PL_hints hints # define PL_na na # define PL_perldb perldb # define PL_rsfp_filters rsfp_filters # define PL_rsfpv rsfp # define PL_stdingv stdingv # define PL_sv_no sv_no # define PL_sv_undef sv_undef # define PL_sv_yes sv_yes /* Replace: 0 */ #endif #ifdef HASATTRIBUTE # if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) # define PERL_UNUSED_DECL # else # define PERL_UNUSED_DECL __attribute__((unused)) # endif #else # define PERL_UNUSED_DECL #endif #ifndef dNOOP # define NOOP (void)0 # define dNOOP extern int Perl___notused PERL_UNUSED_DECL #endif #ifndef dTHR # define dTHR dNOOP #endif #ifndef dTHX # define dTHX dNOOP # define dTHXa(x) dNOOP # define dTHXoa(x) dNOOP #endif #ifndef pTHX # define pTHX void # define pTHX_ # define aTHX # define aTHX_ #endif /* IV could also be a quad (say, a long long), but Perls * capable of those should have IVSIZE already. */ #if !defined(IVSIZE) && defined(LONGSIZE) # define IVSIZE LONGSIZE #endif #ifndef IVSIZE # define IVSIZE 4 /* A bold guess, but the best we can make. */ #endif #ifndef UVSIZE # define UVSIZE IVSIZE #endif #ifndef NVTYPE # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) # define NVTYPE long double # else # define NVTYPE double # endif typedef NVTYPE NV; #endif #ifndef INT2PTR #if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) # define PTRV UV # define INT2PTR(any,d) (any)(d) #else # if PTRSIZE == LONGSIZE # define PTRV unsigned long # else # define PTRV unsigned # endif # define INT2PTR(any,d) (any)(PTRV)(d) #endif #define NUM2PTR(any,d) (any)(PTRV)(d) #define PTR2IV(p) INT2PTR(IV,p) #define PTR2UV(p) INT2PTR(UV,p) #define PTR2NV(p) NUM2PTR(NV,p) #if PTRSIZE == LONGSIZE # define PTR2ul(p) (unsigned long)(p) #else # define PTR2ul(p) INT2PTR(unsigned long,p) #endif #endif /* !INT2PTR */ #ifndef boolSV # define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) #endif #ifndef gv_stashpvn # define gv_stashpvn(str,len,flags) gv_stashpv(str,flags) #endif #ifndef newSVpvn # define newSVpvn(data,len) ((len) ? newSVpv ((data), (len)) : newSVpv ("", 0)) #endif #ifndef newRV_inc /* Replace: 1 */ # define newRV_inc(sv) newRV(sv) /* Replace: 0 */ #endif /* DEFSV appears first in 5.004_56 */ #ifndef DEFSV # define DEFSV GvSV(PL_defgv) #endif #ifndef SAVE_DEFSV # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) #endif #ifndef newRV_noinc # ifdef __GNUC__ # define newRV_noinc(sv) \ ({ \ SV *nsv = (SV*)newRV(sv); \ SvREFCNT_dec(sv); \ nsv; \ }) # else # if defined(USE_THREADS) static SV * newRV_noinc (SV * sv) { SV *nsv = (SV*)newRV(sv); SvREFCNT_dec(sv); return nsv; } # else # define newRV_noinc(sv) \ (PL_Sv=(SV*)newRV(sv), SvREFCNT_dec(sv), (SV*)PL_Sv) # endif # endif #endif /* Provide: newCONSTSUB */ /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */ #if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION < 63)) #if defined(NEED_newCONSTSUB) static #else extern void newCONSTSUB(HV * stash, char * name, SV *sv); #endif #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL) void newCONSTSUB(stash,name,sv) HV *stash; char *name; SV *sv; { U32 oldhints = PL_hints; HV *old_cop_stash = PL_curcop->cop_stash; HV *old_curstash = PL_curstash; line_t oldline = PL_curcop->cop_line; PL_curcop->cop_line = PL_copline; PL_hints &= ~HINT_BLOCK_SCOPE; if (stash) PL_curstash = PL_curcop->cop_stash = stash; newSUB( #if (PERL_VERSION < 3) || ((PERL_VERSION == 3) && (PERL_SUBVERSION < 22)) /* before 5.003_22 */ start_subparse(), #else # if (PERL_VERSION == 3) && (PERL_SUBVERSION == 22) /* 5.003_22 */ start_subparse(0), # else /* 5.003_23 onwards */ start_subparse(FALSE, 0), # endif #endif newSVOP(OP_CONST, 0, newSVpv(name,0)), newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */ newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) ); PL_hints = oldhints; PL_curcop->cop_stash = old_cop_stash; PL_curstash = old_curstash; PL_curcop->cop_line = oldline; } #endif #endif /* newCONSTSUB */ #ifndef START_MY_CXT /* * Boilerplate macros for initializing and accessing interpreter-local * data from C. All statics in extensions should be reworked to use * this, if you want to make the extension thread-safe. See ext/re/re.xs * for an example of the use of these macros. * * Code that uses these macros is responsible for the following: * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts" * 2. Declare a typedef named my_cxt_t that is a structure that contains * all the data that needs to be interpreter-local. * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t. * 4. Use the MY_CXT_INIT macro such that it is called exactly once * (typically put in the BOOT: section). * 5. Use the members of the my_cxt_t structure everywhere as * MY_CXT.member. * 6. Use the dMY_CXT macro (a declaration) in all the functions that * access MY_CXT. */ #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \ defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT) /* This must appear in all extensions that define a my_cxt_t structure, * right after the definition (i.e. at file scope). The non-threads * case below uses it to declare the data as static. */ #define START_MY_CXT #if (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 )) /* Fetches the SV that keeps the per-interpreter data. */ #define dMY_CXT_SV \ SV *my_cxt_sv = perl_get_sv(MY_CXT_KEY, FALSE) #else /* >= perl5.004_68 */ #define dMY_CXT_SV \ SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \ sizeof(MY_CXT_KEY)-1, TRUE) #endif /* < perl5.004_68 */ /* This declaration should be used within all functions that use the * interpreter-local data. */ #define dMY_CXT \ dMY_CXT_SV; \ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv)) /* Creates and zeroes the per-interpreter data. * (We allocate my_cxtp in a Perl SV so that it will be released when * the interpreter goes away.) */ #define MY_CXT_INIT \ dMY_CXT_SV; \ /* newSV() allocates one more than needed */ \ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ Zero(my_cxtp, 1, my_cxt_t); \ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) /* This macro must be used to access members of the my_cxt_t structure. * e.g. MYCXT.some_data */ #define MY_CXT (*my_cxtp) /* Judicious use of these macros can reduce the number of times dMY_CXT * is used. Use is similar to pTHX, aTHX etc. */ #define pMY_CXT my_cxt_t *my_cxtp #define pMY_CXT_ pMY_CXT, #define _pMY_CXT ,pMY_CXT #define aMY_CXT my_cxtp #define aMY_CXT_ aMY_CXT, #define _aMY_CXT ,aMY_CXT #else /* single interpreter */ #define START_MY_CXT static my_cxt_t my_cxt; #define dMY_CXT_SV dNOOP #define dMY_CXT dNOOP #define MY_CXT_INIT NOOP #define MY_CXT my_cxt #define pMY_CXT void #define pMY_CXT_ #define _pMY_CXT #define aMY_CXT #define aMY_CXT_ #define _aMY_CXT #endif #endif /* START_MY_CXT */ #ifndef IVdf # if IVSIZE == LONGSIZE # define IVdf "ld" # define UVuf "lu" # define UVof "lo" # define UVxf "lx" # define UVXf "lX" # else # if IVSIZE == INTSIZE # define IVdf "d" # define UVuf "u" # define UVof "o" # define UVxf "x" # define UVXf "X" # endif # endif #endif #ifndef NVef # if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \ defined(PERL_PRIfldbl) /* Not very likely, but let's try anyway. */ # define NVef PERL_PRIeldbl # define NVff PERL_PRIfldbl # define NVgf PERL_PRIgldbl # else # define NVef "e" # define NVff "f" # define NVgf "g" # endif #endif #ifndef AvFILLp /* Older perls (<=5.003) lack AvFILLp */ # define AvFILLp AvFILL #endif #ifdef SvPVbyte # if PERL_REVISION == 5 && PERL_VERSION < 7 /* SvPVbyte does not work in perl-5.6.1, borrowed version for 5.7.3 */ # undef SvPVbyte # define SvPVbyte(sv, lp) \ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ ? ((lp = SvCUR(sv)), SvPVX(sv)) : my_sv_2pvbyte(aTHX_ sv, &lp)) static char * my_sv_2pvbyte(pTHX_ register SV *sv, STRLEN *lp) { sv_utf8_downgrade(sv,0); return SvPV(sv,*lp); } # endif #else # define SvPVbyte SvPV #endif #ifndef SvPV_nolen # define SvPV_nolen(sv) \ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ ? SvPVX(sv) : sv_2pv_nolen(sv)) static char * sv_2pv_nolen(pTHX_ register SV *sv) { STRLEN n_a; return sv_2pv(sv, &n_a); } #endif #ifndef get_cv # define get_cv(name,create) perl_get_cv(name,create) #endif #ifndef get_sv # define get_sv(name,create) perl_get_sv(name,create) #endif #ifndef get_av # define get_av(name,create) perl_get_av(name,create) #endif #ifndef get_hv # define get_hv(name,create) perl_get_hv(name,create) #endif #ifndef call_argv # define call_argv perl_call_argv #endif #ifndef call_method # define call_method perl_call_method #endif #ifndef call_pv # define call_pv perl_call_pv #endif #ifndef call_sv # define call_sv perl_call_sv #endif #ifndef PERL_SCAN_GREATER_THAN_UV_MAX # define PERL_SCAN_GREATER_THAN_UV_MAX 0x02 #endif #ifndef PERL_SCAN_SILENT_ILLDIGIT # define PERL_SCAN_SILENT_ILLDIGIT 0x04 #endif #ifndef PERL_SCAN_ALLOW_UNDERSCORES # define PERL_SCAN_ALLOW_UNDERSCORES 0x01 #endif #ifndef PERL_SCAN_DISALLOW_PREFIX # define PERL_SCAN_DISALLOW_PREFIX 0x02 #endif #if (PERL_VERSION >= 6) #define I32_CAST #else #define I32_CAST (I32*) #endif #ifndef grok_hex static UV _grok_hex (char *string, STRLEN *len, I32 *flags, NV *result) { NV r = scan_hex(string, *len, I32_CAST len); if (r > UV_MAX) { *flags |= PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = r; return UV_MAX; } return (UV)r; } # define grok_hex(string, len, flags, result) \ _grok_hex((string), (len), (flags), (result)) #endif #ifndef grok_oct static UV _grok_oct (char *string, STRLEN *len, I32 *flags, NV *result) { NV r = scan_oct(string, *len, I32_CAST len); if (r > UV_MAX) { *flags |= PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = r; return UV_MAX; } return (UV)r; } # define grok_oct(string, len, flags, result) \ _grok_oct((string), (len), (flags), (result)) #endif #ifndef grok_bin static UV _grok_bin (char *string, STRLEN *len, I32 *flags, NV *result) { NV r = scan_bin(string, *len, I32_CAST len); if (r > UV_MAX) { *flags |= PERL_SCAN_GREATER_THAN_UV_MAX; if (result) *result = r; return UV_MAX; } return (UV)r; } # define grok_bin(string, len, flags, result) \ _grok_bin((string), (len), (flags), (result)) #endif #ifndef IN_LOCALE # define IN_LOCALE \ (PL_curcop == &PL_compiling ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME) #endif #ifndef IN_LOCALE_RUNTIME # define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE) #endif #ifndef IN_LOCALE_COMPILETIME # define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE) #endif #ifndef IS_NUMBER_IN_UV # define IS_NUMBER_IN_UV 0x01 # define IS_NUMBER_GREATER_THAN_UV_MAX 0x02 # define IS_NUMBER_NOT_INT 0x04 # define IS_NUMBER_NEG 0x08 # define IS_NUMBER_INFINITY 0x10 # define IS_NUMBER_NAN 0x20 #endif #ifndef grok_numeric_radix # define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) #define grok_numeric_radix Perl_grok_numeric_radix bool Perl_grok_numeric_radix(pTHX_ const char **sp, const char *send) { #ifdef USE_LOCALE_NUMERIC #if (PERL_VERSION >= 6) if (PL_numeric_radix_sv && IN_LOCALE) { STRLEN len; char* radix = SvPV(PL_numeric_radix_sv, len); if (*sp + len <= send && memEQ(*sp, radix, len)) { *sp += len; return TRUE; } } #else /* pre5.6.0 perls don't have PL_numeric_radix_sv so the radix * must manually be requested from locale.h */ #include struct lconv *lc = localeconv(); char *radix = lc->decimal_point; if (radix && IN_LOCALE) { STRLEN len = strlen(radix); if (*sp + len <= send && memEQ(*sp, radix, len)) { *sp += len; return TRUE; } } #endif /* PERL_VERSION */ #endif /* USE_LOCALE_NUMERIC */ /* always try "." if numeric radix didn't match because * we may have data from different locales mixed */ if (*sp < send && **sp == '.') { ++*sp; return TRUE; } return FALSE; } #endif /* grok_numeric_radix */ #ifndef grok_number #define grok_number Perl_grok_number int Perl_grok_number(pTHX_ const char *pv, STRLEN len, UV *valuep) { const char *s = pv; const char *send = pv + len; const UV max_div_10 = UV_MAX / 10; const char max_mod_10 = UV_MAX % 10; int numtype = 0; int sawinf = 0; int sawnan = 0; while (s < send && isSPACE(*s)) s++; if (s == send) { return 0; } else if (*s == '-') { s++; numtype = IS_NUMBER_NEG; } else if (*s == '+') s++; if (s == send) return 0; /* next must be digit or the radix separator or beginning of infinity */ if (isDIGIT(*s)) { /* UVs are at least 32 bits, so the first 9 decimal digits cannot overflow. */ UV value = *s - '0'; /* This construction seems to be more optimiser friendly. (without it gcc does the isDIGIT test and the *s - '0' separately) With it gcc on arm is managing 6 instructions (6 cycles) per digit. In theory the optimiser could deduce how far to unroll the loop before checking for overflow. */ if (++s < send) { int digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { digit = *s - '0'; if (digit >= 0 && digit <= 9) { value = value * 10 + digit; if (++s < send) { /* Now got 9 digits, so need to check each time for overflow. */ digit = *s - '0'; while (digit >= 0 && digit <= 9 && (value < max_div_10 || (value == max_div_10 && digit <= max_mod_10))) { value = value * 10 + digit; if (++s < send) digit = *s - '0'; else break; } if (digit >= 0 && digit <= 9 && (s < send)) { /* value overflowed. skip the remaining digits, don't worry about setting *valuep. */ do { s++; } while (s < send && isDIGIT(*s)); numtype |= IS_NUMBER_GREATER_THAN_UV_MAX; goto skip_value; } } } } } } } } } } } } } } } } } } numtype |= IS_NUMBER_IN_UV; if (valuep) *valuep = value; skip_value: if (GROK_NUMERIC_RADIX(&s, send)) { numtype |= IS_NUMBER_NOT_INT; while (s < send && isDIGIT(*s)) /* optional digits after the radix */ s++; } } else if (GROK_NUMERIC_RADIX(&s, send)) { numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */ /* no digits before the radix means we need digits after it */ if (s < send && isDIGIT(*s)) { do { s++; } while (s < send && isDIGIT(*s)); if (valuep) { /* integer approximation is valid - it's 0. */ *valuep = 0; } } else return 0; } else if (*s == 'I' || *s == 'i') { s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; if (s == send || (*s != 'F' && *s != 'f')) return 0; s++; if (s < send && (*s == 'I' || *s == 'i')) { s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; if (s == send || (*s != 'I' && *s != 'i')) return 0; s++; if (s == send || (*s != 'T' && *s != 't')) return 0; s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0; s++; } sawinf = 1; } else if (*s == 'N' || *s == 'n') { /* XXX TODO: There are signaling NaNs and quiet NaNs. */ s++; if (s == send || (*s != 'A' && *s != 'a')) return 0; s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; s++; sawnan = 1; } else return 0; if (sawinf) { numtype &= IS_NUMBER_NEG; /* Keep track of sign */ numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT; } else if (sawnan) { numtype &= IS_NUMBER_NEG; /* Keep track of sign */ numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT; } else if (s < send) { /* we can have an optional exponent part */ if (*s == 'e' || *s == 'E') { /* The only flag we keep is sign. Blow away any "it's UV" */ numtype &= IS_NUMBER_NEG; numtype |= IS_NUMBER_NOT_INT; s++; if (s < send && (*s == '-' || *s == '+')) s++; if (s < send && isDIGIT(*s)) { do { s++; } while (s < send && isDIGIT(*s)); } else return 0; } } while (s < send && isSPACE(*s)) s++; if (s >= send) return numtype; if (len == 10 && memEQ(pv, "0 but true", 10)) { if (valuep) *valuep = 0; return IS_NUMBER_IN_UV; } return 0; } #endif /* grok_number */ #endif /* _P_P_PORTABILITY_H_ */ /* End of File ppport.h */ Net-ARP/send_packet_bsd.c0000755000175000017500000000260412406610353014473 0ustar bastibasti/* Perl ARP Extension Send the packet BSD code Programmed by Bastian Ballmann Last update: 01.12.2004 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. */ #include #include #include #include #include #include #include #include #include "arp.h" int send_packet_bsd(const char *dev, u_char *packet, u_int packetsize) { int bpffd, i; char bpfdev[12]; if( (strlen(dev) == 0) || (packetsize == 0) ) return 0; // Open a bpf device for(i = 0; i < 512; i++) { sprintf(bpfdev,"/dev/bpf%d",i); if((bpffd = open(bpfdev,O_WRONLY)) > 0) { break; } } if(bpffd < 0) { perror("open bpf"); return 0; } else { // Lock it flock(bpffd,LOCK_EX); // Bind it to a device ioctl(bpffd,BIOCSETIF,dev); // Send the packet and unlock write(bpffd,packet,packetsize); flock(bpffd,LOCK_UN); close(bpffd); } return 1; } Net-ARP/send_packet_linux.c0000755000175000000000000000256412161752642014741 0ustar bastiroot/* Perl ARP Extension Send the packet Linux code Programmed by Bastian Ballmann Last update: 01.12.2004 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. */ #include #include #include #include #include #include #include #include "arp.h" int send_packet_linux(const char *dev, u_char *packet, u_int packetsize) { struct sockaddr addr; int sock; if(strlen(dev) == 0) { printf("dev is undefined. Terminating.\n"); return 0; } if(packetsize == 0) { printf("packetsize is zero. Terminating.\n"); return 0; } // Create socket descriptor if( ( sock = socket(AF_INET,SOCK_TYPE,htons(ETH_P_ALL))) < 0 ) { perror("socket"); return 0; } // Set dev and send the packet strncpy(addr.sa_data,dev,sizeof(addr.sa_data)); if( (sendto(sock,packet,packetsize,0,&addr,sizeof(struct sockaddr))) < 0 ) { perror("send"); return 0; } close(sock); return 1; } Net-ARP/t/0000755000175000001440000000000012161273256011515 5ustar bastiusersNet-ARP/t/ARP.t0000755000175000001440000000071007753203772012334 0ustar bastiusers# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl ARP.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 1; BEGIN { use_ok('ARP') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. Net-ARP/t/arp_lookup.t0000644000175000001440000000116610560077204014055 0ustar bastiusers# # Test arp_lookup function # # Programmed by Bastian Ballmann # Last update: 31.01.2007 use Net::ARP; use Test::More qw( no_plan ); $mac = Net::ARP::arp_lookup("strange_dev_value","127.0.0.1"); ok( $mac eq "unknown", "unkown mac on strange dev value -> $mac" ); $mac = Net::ARP::arp_lookup("$fu","127.0.0.1"); ok( $mac eq "unknown", "unkown mac on strange dev value 2 -> $mac" ); $mac = Net::ARP::arp_lookup("eth0","this_is_not_an_ip_address"); ok( $mac eq "unknown", "unkown mac on strange ip value -> $mac" ); #Net::ARP::arp_lookup("eth0","192.168.1.1","fu"); #ok( $mac eq "unknown", "unkown mac on strange mac value" ); Net-ARP/t/get_mac.t0000644000175000001440000000037110560101437013272 0ustar bastiusers# # Test get_mac function # # Programmed by Bastian Ballmann # Last update: 31.01.2007 use Net::ARP; use Test::More qw( no_plan ); $mac = Net::ARP::get_mac("strange_dev_value"); ok( $mac eq "unknown", "unkown mac on strange dev value -> $mac" ); Net-ARP/t/send_packet.t0000644000175000001440000000555112161273007014162 0ustar bastiusers# # Test send_packet function # # Programmed by Bastian Ballmann # Last update: 22.06.2013 use Net::ARP; use Test::More qw( no_plan ); $dev="lo"; print "Using device $dev to test send_packet()\n"; $ret = Net::ARP::send_packet("strange_dev", # network interface '127.0.0.1', # source ip '127.0.0.1', # destination ip 'aa:bb:cc:aa:bb:cc', # source mac 'ff:ff:ff:ff:ff:ff', # destination mac 'reply'); # ARP operation ok( $ret == 0, "abort on strange dev value -> $ret" ); $ret = Net::ARP::send_packet($dev, # network interface 'strange_src_ip', # source ip '127.0.0.1', # destination ip 'aa:bb:cc:aa:bb:cc', # source mac 'ff:ff:ff:ff:ff:ff', # destination mac 'reply'); # ARP operation ok( $ret == 0, "abort on strange source ip value -> $ret" ); $ret = Net::ARP::send_packet($dev, # network interface '127.0.0.1', # source ip 'strange_dst_ip', # destination ip 'aa:bb:cc:aa:bb:cc', # source mac 'ff:ff:ff:ff:ff:ff', # destination mac 'reply'); # ARP operation ok( $ret == 0, "abort on strange destination ip value -> $ret" ); $ret = Net::ARP::send_packet($dev, # network interface '127.0.0.1', # source ip '127.0.0.1', # destination ip 'strange_src_mac', # source mac 'ff:ff:ff:ff:ff:ff', # destination mac 'reply'); # ARP operation ok( $ret == 0, "abort on strange source mac value -> $ret" ); $ret = Net::ARP::send_packet($dev, # network interface '127.0.0.1', # source ip '127.0.0.1', # destination ip 'aa:bb:cc:aa:bb:cc', # source mac 'strange_dst_mac', # destination mac 'reply'); # ARP operation ok( $ret == 0, "abort on strange destination mac value -> $ret" ); $ret = Net::ARP::send_packet($dev, # network interface '127.0.0.1', # source ip '127.0.0.1', # destination ip 'aa:bb:cc:aa:bb:cc', # source mac 'ff:ff:ff:ff:ff:ff', # destination mac 'my_happy_arp_opcode'); # ARP operation ok( $ret == 0, "abort on strange arp op value -> $ret" ); $ret = Net::ARP::send_packet($dev, # network interface '127.0.0.1', # source ip '127.0.0.1', # destination ip 'aa:bb:cc:aa:bb:cc', # source mac 'ff:ff:ff:ff:ff:ff', # destination mac 'reply'); # ARP operation ok( $ret == 1, "send arp reply" ); Net-ARP/test.pl0000755000175000001440000000260710560137270012572 0ustar bastiusers#!/usr/bin/perl # # Perl ARP Extension test file # # 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. use ExtUtils::testlib; use Net::ARP; BEGIN { eval{ require Net::Pcap; }; if($@ =~ /^Can\'t\slocate/) { $dev = "eth0"; } else { import Net::Pcap; $dev = Net::Pcap::lookupdev(\$errbuf); } } print "Sending ARP reply packet via dev $dev... "; $ret = Net::ARP::send_packet($dev, # network interface '127.0.0.1', # source ip '127.0.0.1', # destination ip 'aa:bb:cc:aa:bb:cc', # source mac 'ff:ff:ff:ff:ff:ff', # destination mac 'reply'); # ARP operation print $ret ? "ok\n" : "failed\n"; $mac = Net::ARP::get_mac($dev); print "MAC $mac\n"; $mac = Net::ARP::arp_lookup($dev,"192.168.1.1"); print "192.168.1.1 has got mac $mac\n";