-
Notifications
You must be signed in to change notification settings - Fork 11
/
arpad.pl
43 lines (32 loc) · 1.01 KB
/
arpad.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/local/bin/perl
#
# arp-ad.pl cleans up all entries in arp table
# similar to "arp -ad" in freeBSD
#
# Feb 14, 2000 Wai Chan Created.
#
# Submitter Name: Wai Chan
# Submitter Email: waichan@hpu.edu
# Submitter Company: Hawaii Pacific University
@arpTable=`arp -a`;
$count=0;
foreach $list (@arpTable)
{
if ($count++ > 2)
{
($trash, $hostname, $trash)=split(' ',$list,3);
print(`arp -d $hostname`);
}
}
print($count-3);
##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright 2008 Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.html
##############################################################################