Codebase list arping / 19053f7
Import Debian changes 2.08-1 arping (2.08-1) unstable; urgency=low * New upstream release * Re-patch new arping.8 for fixing manpage-has-errors-from-man and hyphen-used-as-minus-sign lintian warnings * debian/copyright: Updated copyright year and url where arping was downloaded Giuseppe Iuculano authored 15 years ago Salvatore Bonaccorso committed 6 years ago
15 changed file(s) with 229 addition(s) and 128 deletion(s). Raw diff Collapse all Expand all
0 *~
1 arping
00 GNU GENERAL PUBLIC LICENSE
11 Version 2, June 1991
22
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
4 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
4 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
55 Everyone is permitted to copy and distribute verbatim copies
66 of this license document, but changing it is not allowed.
77
1414 General Public License applies to most of the Free Software
1515 Foundation's software and to any other program whose authors commit to
1616 using it. (Some other Free Software Foundation software is covered by
17 the GNU Library General Public License instead.) You can apply it to
17 the GNU Lesser General Public License instead.) You can apply it to
1818 your programs, too.
1919
2020 When we speak of free software, we are referring to freedom, not
5454
5555 The precise terms and conditions for copying, distribution and
5656 modification follow.
57
57
5858 GNU GENERAL PUBLIC LICENSE
5959 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
6060
109109 License. (Exception: if the Program itself is interactive but
110110 does not normally print such an announcement, your work based on
111111 the Program is not required to print an announcement.)
112
112
113113 These requirements apply to the modified work as a whole. If
114114 identifiable sections of that work are not derived from the Program,
115115 and can be reasonably considered independent and separate works in
167167 access to copy the source code from the same place counts as
168168 distribution of the source code, even though third parties are not
169169 compelled to copy the source along with the object code.
170
170
171171 4. You may not copy, modify, sublicense, or distribute the Program
172172 except as expressly provided under this License. Any attempt
173173 otherwise to copy, modify, sublicense or distribute the Program is
224224
225225 This section is intended to make thoroughly clear what is believed to
226226 be a consequence of the rest of this License.
227
227
228228 8. If the distribution and/or use of the Program is restricted in
229229 certain countries either by patents or by copyrighted interfaces, the
230230 original copyright holder who places the Program under this License
277277 POSSIBILITY OF SUCH DAMAGES.
278278
279279 END OF TERMS AND CONDITIONS
280
280
281281 How to Apply These Terms to Your New Programs
282282
283283 If you develop a new program, and you want it to be of the greatest
302302 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303303 GNU General Public License for more details.
304304
305 You should have received a copy of the GNU General Public License
306 along with this program; if not, write to the Free Software
307 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
308
305 You should have received a copy of the GNU General Public License along
306 with this program; if not, write to the Free Software Foundation, Inc.,
307 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309308
310309 Also add information on how to contact you by electronic and paper mail.
311310
335334 This General Public License does not permit incorporating your program into
336335 proprietary programs. If your program is a subroutine library, you may
337336 consider it more useful to permit linking proprietary applications with the
338 library. If this is what you want to do, use the GNU Library General
337 library. If this is what you want to do, use the GNU Lesser General
339338 Public License instead of this License.
0 # $Id: Makefile 1893 2007-07-09 22:23:28Z marvin $
0 # arping/Makefile
11 TARGETS=arping
22
33 CD=cd
44 CP=cp
55 TAR=tar
66 GPG=gpg
7 GIT=git
78 MAKE=make
89 RM=rm
910 SUDO=sudo
116117 DFILE=arping-$(V).tar.gz
117118 DDIR=arping-$(V)
118119 dist:
119 ($(CD) ..; \
120 $(CP) -ax arping $(DDIR); \
121 $(RM) -fr $(DDIR)/{.\#*,CVS,.svn,*~} \
122 $(DDIR)/arping-2/{.\#*,CVS,.svn,*~}; \
123 $(MAKE) -C $(DDIR) doc; \
124 $(TAR) cfz $(DFILE) $(DDIR); \
125 $(GPG) -b -a $(DFILE); \
126 )
120 $(GIT) archive --format=tar --prefix=arping-$(V)/ arping-$(V) | gzip -9 > arping-$(V).tar.gz
121 $(GPG) -b -a $(DFILE)
122
127123 test: arping2
128124 @echo Testing with destination host=$(HOST) and MAC=$(MAC)
129125 @echo IF=$(IF)
0 $Id: README 1211 2005-01-28 13:28:16Z marvin $
0 arping/README
11
22 ARP Ping
33
1111 *
1212 * Also finds out IP of specified MAC
1313 *
14 * $Id: arping.c 1972 2007-09-19 12:35:16Z marvin $
15 */
16 /*
17 * Copyright (C) 2000-2002 Thomas Habets <thomas@habets.pp.se>
14 */
15 /*
16 * Copyright (C) 2000-2008 Thomas Habets <thomas@habets.pp.se>
1817 *
1918 * This library is free software; you can redistribute it and/or
2019 * modify it under the terms of the GNU General Public
2625 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2726 * General Public License for more details.
2827 *
29 * You should have received a copy of the GNU General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3231 */
3332 //#include "config.h"
3433 #include <stdio.h>
9392 #define IP_ALEN 4
9493 #endif
9594
96 const float version = 2.06f;
95 const float version = 2.08f;
9796
9897 static libnet_t *libnet = 0;
9998
150149 /*
151150 *
152151 */
153 static const char *arping_lookupdev_default(u_int32_t srcip, u_int32_t dstip,
154 char *ebuf)
152 static const char *
153 arping_lookupdev_default(const char *ifname,
154 u_int32_t srcip, u_int32_t dstip,
155 char *ebuf)
155156 {
156157 #ifdef WIN32
157158 WCHAR buf[LIBNET_ERRBUF_SIZE + PCAP_ERRBUF_SIZE];
170171 /*
171172 *
172173 */
173 static const char *arping_lookupdev(u_int32_t srcip, u_int32_t dstip,
174 static const char *arping_lookupdev(const char *ifname,
175 u_int32_t srcip,
176 u_int32_t dstip,
174177 char *ebuf)
175178 {
176179 FILE *f;
180183 char *p,*p2;
181184 int n;
182185
183 do_libnet_init(NULL);
184 libnet_addr2name4_r(dstip,0,buf2);
185 libnet_addr2name4_r(srcip,0,buf1);
186 do_libnet_init(ifname);
187 libnet_addr2name4_r(dstip,0,buf2,1024);
188 libnet_addr2name4_r(srcip,0,buf1,1024);
186189
187190 /*
188191 * Construct and run command
219222 *p2 = 0;
220223 return p;
221224 failed:
222 return arping_lookupdev_default(srcip,dstip,ebuf);
225 return arping_lookupdev_default(ifname,srcip,dstip,ebuf);
223226 }
224227 #elif defined(FINDIF) && defined(HAVE_WEIRD_BSD)
225228 static
226229 const char *
227 arping_lookupdev(u_int32_t srcip, u_int32_t dstip, char *ebuf)
230 arping_lookupdev(const char *ifname,
231 u_int32_t srcip, u_int32_t dstip, char *ebuf)
228232 {
229233 FILE *f;
230234 static char buf[10240];
232236 char *p,*p2;
233237 int n;
234238
235 do_libnet_init(NULL);
236 libnet_addr2name4_r(dstip,0,buf1);
239 do_libnet_init(ifname);
240 libnet_addr2name4_r(dstip,0,buf1, 1024);
237241 //libnet_addr2name4_r(srcip,0,buf1);
238242
239243 /*
271275 *p2 = 0;
272276 return p;
273277 failed:
274 return arping_lookupdev_default(srcip,dstip,ebuf);
278 return arping_lookupdev_default(ifname,srcip,dstip,ebuf);
275279 }
276280 #else
277281 /*
278282 *
279283 */
280 static const char *arping_lookupdev(u_int32_t srcip, u_int32_t dstip,
284 static const char *arping_lookupdev(const char *ifname,
285 u_int32_t srcip, u_int32_t dstip,
281286 char *ebuf)
282287 {
283 return arping_lookupdev_default(srcip,dstip,ebuf);
288 return arping_lookupdev_default(ifname,srcip,dstip,ebuf);
284289 }
285290 #endif
286291
391396 {
392397 /* cisco-style */
393398 if (3*5-1 == strlen(p)) {
394 int c;
399 unsigned int c;
395400 for (c = 0; c < strlen(p); c++) {
396401 if ((c % 5) == 4) {
397402 if ('.' != p[c]) {
407412 }
408413 /* windows-style */
409414 if (6*3-1 == strlen(p)) {
410 int c;
415 unsigned int c;
411416 for (c = 0; c < strlen(p); c++) {
412417 if ((c % 3) == 2) {
413418 if ('-' != p[c]) {
10411046 break;
10421047 }
10431048 case 'S': // set source IP, may be null for don't-know
1044 do_libnet_init(NULL);
1049 do_libnet_init(ifname);
10451050 if (-1 == (srcip = libnet_name2addr4(libnet,
10461051 optarg,
10471052 LIBNET_RESOLVE))){
10781083 "in MAC ping mode\n");
10791084 exit(1);
10801085 }
1081 do_libnet_init(NULL);
1086 do_libnet_init(ifname);
10821087 if (-1 == (dstip = libnet_name2addr4(libnet,
10831088 optarg,
10841089 LIBNET_RESOLVE))){
11131118 mode = is_mac_addr(parm)?PINGMAC:PINGIP;
11141119 } else if (dstip_given) {
11151120 mode = PINGIP;
1116 do_libnet_init(NULL);
1121 do_libnet_init(ifname);
11171122 parm = strdup(libnet_addr2name4(dstip,0));
11181123 if (!parm) {
11191124 fprintf(stderr, "arping: out of mem\n");
11931198 */
11941199 if (!ifname) {
11951200 if (dont_use_arping_lookupdev) {
1196 ifname = arping_lookupdev_default(srcip,dstip,ebuf);
1201 ifname = arping_lookupdev_default(ifname,
1202 srcip,dstip,ebuf);
11971203 } else {
1198 ifname = arping_lookupdev(srcip,dstip,ebuf);
1204 ifname = arping_lookupdev(ifname,srcip,dstip,ebuf);
11991205 }
12001206 if (!ifname) {
12011207 fprintf(stderr, "arping: arping_lookupdev(): %s\n",
0 dnl $Id: configure.in 737 2002-11-03 19:47:58Z marvin $
0 dnl arping/configure.in
11
22 AC_INIT(arping2.c)
33 AC_CONFIG_HEADER(config.h)
00 #!/bin/sh
1 # $Id: arping-scan-net.sh 984 2003-08-07 20:11:36Z marvin $
1 # arping-scan-net.sh
22 #
33 # Copyright (C) 2002 Thomas Habets <thomas@habets.pp.se>
44 #
1212 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1313 # General Public License for more details.
1414 #
15 # You should have received a copy of the GNU General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 # You should have received a copy of the GNU General Public License along
16 # with this program; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1818 #
1919
2020 trap "exit 0" INT
0 .TH "arping" "8" "21th June, 2003" "arping" ""
0 .TH "arping" "8" "21th June, 2003" "arping" ""
1
12 .PP
2 .SH "NAME"
3 .SH "NAME"
34 arping \- sends arp and/or ip pings to a given host
45 .PP
5 .SH "SYNOPSIS"
6 .SH "SYNOPSIS"
67 \fBarping\fP [-abhpqrRd0uv] [-S \fIhost/ip\fP] [-T \fIhost/ip\fP] [-s \fIMAC\fP] [-t \fIMAC\fP] [-c \fIcount\fP] [-i \fIinterface\fP] [ -w \fIus\fP ] <\fIhost\fP | -B>
78 .PP
8 .SH "DESCRIPTION"
9 .SH "DESCRIPTION"
910 The \fIarping\fP utility sends \fBARP\fP and/or \fBICMP\fP requests to the specified \fIhost\fP and displays the replies\&. The \fIhost\fP may be specified by its \fBhostname\fP, its \fBIP\fP address, or its \fBMAC\fP address\&.
1011 .PP
1112 One request is sent each second\&.
3031 since arping packets (when pinging IP) doesn\&'t traverse the IP stack when
3132 received and are therefore replied to faster\&.
3233 .PP
33 .SH "OPTIONS"
34 .SH "OPTIONS"
35
3436 .PP
35 .IP
36 .IP "-0"
37 .IP "-0"
3738 Use this option to ping with source IP address 0\&.0\&.0\&.0\&. Use this
3839 when you haven\&'t configured your interface yet\&.
3940 Note that this may get the MAC-ping unanswered\&.
4041 This is an alias for -S 0\&.0\&.0\&.0\&.
41 .IP "-a"
42 .IP "-a"
4243 Audible ping\&.
43 .IP "-A"
44 .IP "-A"
4445 Only count addresses matching requested address (This *WILL*
4546 break most things you do\&. Only useful if you are arpinging many
4647 hosts at once\&. See arping-scan-net\&.sh for an example)\&.
47 .IP "-b"
48 .IP "-b"
4849 Like -0 but source broadcast source address (255\&.255\&.255\&.255)\&.
4950 Note that this may get the arping unanswered since it\&'s not normal behavior
5051 for a host\&.
51 .IP "-B"
52 .IP "-B"
5253 Use instead of host if you want to address 255\&.255\&.255\&.255\&.
53 .IP "-c \fIcount\fP"
54 .IP "-c \fIcount\fP"
5455 Only send \fIcount\fP requests\&.
55 .IP "-d"
56 .IP "-d"
5657 Find duplicate replies\&.
57 .IP "-F"
58 .IP "-F"
5859 Don\&'t try to be smart about the interface name\&. (even if this
5960 switch is not given, -i overrides smartness\&.
60 .IP "-h"
61 .IP "-h"
6162 Displays a help message and exits\&.
62 .IP "-i \fIinterface\fP"
63 .IP "-i \fIinterface\fP"
6364 Use the specified interface\&.
64 .IP "-q"
65 .IP "-q"
6566 Does not display messages, except error messages\&.
66 .IP "-r"
67 .IP "-r"
6768 Raw output: only the MAC/IP address is displayed for each reply\&.
68 .IP "-R"
69 .IP "-R"
6970 Raw output: Like -r but shows "the other one", can be combined with
7071 -r\&.
71 .IP "-s \fIMAC\fP"
72 .IP "-s \fIMAC\fP"
7273 Set source MAC address\&. You may need to use -p with this\&.
73 .IP "-S \fIIP\fP"
74 .IP "-S \fIIP\fP"
7475 Like -b and -0 but with set source address\&.
7576 Note that this may get the arping unanswered if the target does not have
7677 routing to the IP\&. If you don\&'t own the IP you are using, you may need to turn
7778 on promiscious mode on the interface (with -p)\&. With this switch you can find
7879 out what IP-address a host has without taking an IP-address yourself\&.
79 .IP "-t \fIMAC\fP"
80 .IP "-t \fIMAC\fP"
8081 Set target MAC address to use when pinging IP address\&.
81 .IP "-T \fIIP\fP"
82 .IP "-T \fIIP\fP"
8283 Use -T as target address when pinging MACs that won\&'t
8384 respond to a broadcast ping but perhaps to a directed broadcast\&.
8485 .IP
8586 \fIExample\fP: To check the address of MAC-A, use knowledge of MAC-B and IP-B\&.
8687 .IP
8788 $ arping -S <IP-B> -s <MAC-B> -p <MAC-A>
88 .IP "-p"
89 .IP "-p"
8990 Turn on promiscious mode on interface, use this if you don\&'t
9091 "own" the MAC address you are using\&.
91 .IP "-u"
92 .IP "-u"
9293 Show index=received/sent instead of just index=received when
9394 pinging MACs\&.
94 .IP "-v"
95 .IP "-v"
9596 Verbose output\&. Use twice for more messages\&.
96 .IP "-w"
97 .IP "-w"
9798 (arping 2\&.x only) Time to wait between pings, in microseconds\&.
99
98100 .PP
99 .SH "BUGS"
101 .SH "BUGS"
102
100103 .PP
101104 You have to use -B instead of arpinging 255\&.255\&.255\&.255, and -b
102105 instead of -S 255\&.255\&.255\&.255\&. This is libnets fault\&.
103106 .PP
104 .SH "SEE ALSO"
107 .SH "SEE ALSO"
108
105109 .PP
106110 \fBping(8)\fP, \fBarp(8)\fP, \fBrarp(8)\fP
107111 .PP
108 .SH "AUTHOR"
112 .SH "AUTHOR"
113
109114 .PP
110115 Arping was written by Thomas Habets <thomas@habets\&.pp\&.se>\&.
1717 *
1818 * Also finds out IP of specified MAC
1919 *
20 * $Id: arping.c 1753 2007-01-27 14:20:42Z marvin $
2120 */
2221 /*
23 * Copyright (C) 2000-2003 Thomas Habets <thomas@habets.pp.se>
22 * Copyright (C) 2000-2008 Thomas Habets <thomas@habets.pp.se>
2423 *
2524 * This program is free software; you can redistribute it and/or modify
2625 * it under the terms of the GNU General Public License as published by
3231 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3332 * GNU General Public License for more details.
3433 *
35 * You should have received a copy of the GNU General Public License
36 * along with this program; if not, write to the Free Software
37 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34 * You should have received a copy of the GNU General Public License along
35 * with this program; if not, write to the Free Software Foundation, Inc.,
36 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
3837 */
3938 /*
4039 * Note to self:
0 arping (2.08-1) unstable; urgency=low
1
2 * New upstream release
3 * Re-patch new arping.8 for fixing manpage-has-errors-from-man and
4 hyphen-used-as-minus-sign lintian warnings
5 * debian/copyright: Updated copyright year and url where arping was
6 downloaded
7
8 -- Giuseppe Iuculano <giuseppe@iuculano.it> Fri, 15 Aug 2008 22:44:52 +0200
9
010 arping (2.07~pre1-3) unstable; urgency=low
111
212 * Removed if-up.d script, there is a similar script in ifupdown-extra.
22 Re-debianized by Giuseppe Iuculano <giuseppe@iuculano.it> on
33 Sun, 22 Jun 2008 12:10:00 +0200.
44
5 It was downloaded from ftp://ftp.habets.pp.se/pub/synscan/
5 It was downloaded from:
6 http://www.habets.pp.se/synscan/programs.php?prog=arping
67
78 Upstream Author: Thomas Habets <thomas@habets.pp.se>
89
9 Copyright: Copyright © 2000-2003 Thomas Habets <thomas@habets.pp.se>
10 Copyright: Copyright © 2000-2008 Thomas Habets <thomas@habets.pp.se>
1011
1112 License:
1213
44 ## DP: fixed lintian warning manpage-has-errors-from-man, hyphen-used-as-minus-sign
55
66 @DPATCH@
7 diff -urNad arping-2.07~/arping.8 arping-2.07/arping.8
8 --- arping-2.07~/arping.8 2008-06-22 14:02:01.000000000 +0200
9 +++ arping-2.07/arping.8 2008-06-22 16:21:57.000000000 +0200
10 @@ -4,7 +4,7 @@
7 diff -urNad arping-2.08~/arping.8 arping-2.08/arping.8
8 --- arping-2.08~/arping.8 2008-08-11 08:33:31.000000000 +0200
9 +++ arping-2.08/arping.8 2008-08-15 22:34:31.000000000 +0200
10 @@ -5,7 +5,7 @@
1111 arping \- sends arp and/or ip pings to a given host
1212 .PP
13 .SH "SYNOPSIS"
13 .SH "SYNOPSIS"
1414 -\fBarping\fP [-abhpqrRd0uv] [-S \fIhost/ip\fP] [-T \fIhost/ip\fP] [-s \fIMAC\fP] [-t \fIMAC\fP] [-c \fIcount\fP] [-i \fIinterface\fP] [ -w \fIus\fP ] <\fIhost\fP | -B>
1515 +\fBarping\fP [\-abhpqrRd0uv] [\-S \fIhost/ip\fP] [\-T \fIhost/ip\fP] [\-s \fIMAC\fP] [\-t \fIMAC\fP] [\-c \fIcount\fP] [\-i \fIinterface\fP] [ \-w \fIus\fP ] <\fIhost\fP | \-B>
1616 .PP
17 .SH "DESCRIPTION"
17 .SH "DESCRIPTION"
1818 The \fIarping\fP utility sends \fBARP\fP and/or \fBICMP\fP requests to the specified \fIhost\fP and displays the replies\&. The \fIhost\fP may be specified by its \fBhostname\fP, its \fBIP\fP address, or its \fBMAC\fP address\&.
19 @@ -22,9 +22,9 @@
19 @@ -23,9 +23,9 @@
2020 On an idle system the roundtrip times will be pretty much accurate, but
2121 with more load the timing gets less exact\&.
2222 .PP
2828 .PP
2929 This is not just an issue with arping, it is with normal ping also
3030 (at least it is on my system)\&. But it doesn\&'t show up as much with ping
31 @@ -38,7 +38,7 @@
31 @@ -39,71 +39,71 @@
3232 Use this option to ping with source IP address 0\&.0\&.0\&.0\&. Use this
3333 when you haven\&'t configured your interface yet\&.
3434 Note that this may get the MAC-ping unanswered\&.
3535 -This is an alias for -S 0\&.0\&.0\&.0\&.
36 -.IP "-a"
3637 +This is an alias for \-S 0\&.0\&.0\&.0\&.
37 .IP "-a"
38 +.IP "\-a"
3839 Audible ping\&.
39 .IP "-A"
40 @@ -46,7 +46,7 @@
40 -.IP "-A"
41 +.IP "\-A"
42 Only count addresses matching requested address (This *WILL*
4143 break most things you do\&. Only useful if you are arpinging many
4244 hosts at once\&. See arping-scan-net\&.sh for an example)\&.
43 .IP "-b"
45 -.IP "-b"
4446 -Like -0 but source broadcast source address (255\&.255\&.255\&.255)\&.
47 +.IP "\-b"
4548 +Like \-0 but source broadcast source address (255\&.255\&.255\&.255)\&.
4649 Note that this may get the arping unanswered since it\&'s not normal behavior
4750 for a host\&.
48 .IP "-B"
49 @@ -57,7 +57,7 @@
51 -.IP "-B"
52 +.IP "\-B"
53 Use instead of host if you want to address 255\&.255\&.255\&.255\&.
54 -.IP "-c \fIcount\fP"
55 +.IP "\-c \fIcount\fP"
56 Only send \fIcount\fP requests\&.
57 -.IP "-d"
58 +.IP "\-d"
5059 Find duplicate replies\&.
51 .IP "-F"
60 .IP "-F"
5261 Don\&'t try to be smart about the interface name\&. (even if this
5362 -switch is not given, -i overrides smartness\&.
63 -.IP "-h"
5464 +switch is not given, \-i overrides smartness\&.
55 .IP "-h"
65 +.IP "\-h"
5666 Displays a help message and exits\&.
57 .IP "-i \fIinterface\fP"
58 @@ -67,25 +67,25 @@
59 .IP "-r"
67 -.IP "-i \fIinterface\fP"
68 +.IP "\-i \fIinterface\fP"
69 Use the specified interface\&.
70 -.IP "-q"
71 +.IP "\-q"
72 Does not display messages, except error messages\&.
73 -.IP "-r"
74 +.IP "\-r"
6075 Raw output: only the MAC/IP address is displayed for each reply\&.
61 .IP "-R"
76 -.IP "-R"
6277 -Raw output: Like -r but shows "the other one", can be combined with
6378 --r\&.
79 -.IP "-s \fIMAC\fP"
80 -Set source MAC address\&. You may need to use -p with this\&.
81 -.IP "-S \fIIP\fP"
82 -Like -b and -0 but with set source address\&.
83 +.IP "\-R"
6484 +Raw output: Like \-r but shows "the other one", can be combined with
6585 +\-r\&.
66 .IP "-s \fIMAC\fP"
67 -Set source MAC address\&. You may need to use -p with this\&.
86 +.IP "\-s \fIMAC\fP"
6887 +Set source MAC address\&. You may need to use \-p with this\&.
69 .IP "-S \fIIP\fP"
70 -Like -b and -0 but with set source address\&.
88 +.IP "\-S \fIIP\fP"
7189 +Like \-b and \-0 but with set source address\&.
7290 Note that this may get the arping unanswered if the target does not have
7391 routing to the IP\&. If you don\&'t own the IP you are using, you may need to turn
7492 -on promiscious mode on the interface (with -p)\&. With this switch you can find
7593 +on promiscious mode on the interface (with \-p)\&. With this switch you can find
7694 out what IP-address a host has without taking an IP-address yourself\&.
77 .IP "-t \fIMAC\fP"
95 -.IP "-t \fIMAC\fP"
96 +.IP "\-t \fIMAC\fP"
7897 Set target MAC address to use when pinging IP address\&.
79 .IP "-T \fIIP\fP"
98 -.IP "-T \fIIP\fP"
8099 -Use -T as target address when pinging MACs that won\&'t
100 +.IP "\-T \fIIP\fP"
81101 +Use \-T as target address when pinging MACs that won\&'t
82102 respond to a broadcast ping but perhaps to a directed broadcast\&.
83103 .IP
84104 -\fIExample\fP: To check the address of MAC-A, use knowledge of MAC-B and IP-B\&.
85 +\fIExample\fP: To check the address of MAC-A, use knowledge of MAC-B and IP-B\&.
105 +\fIExample\fP: To check the address of MAC-A, use knowledge of MAC-B and IP-B\&.
86106 .IP
87107 -$ arping -S <IP-B> -s <MAC-B> -p <MAC-A>
108 -.IP "-p"
88109 +$ arping \-S <IP-B> \-s <MAC-B> \-p <MAC-A>
89 .IP "-p"
110 +.IP "\-p"
90111 Turn on promiscious mode on interface, use this if you don\&'t
91112 "own" the MAC address you are using\&.
92 @@ -99,8 +99,8 @@
113 -.IP "-u"
114 +.IP "\-u"
115 Show index=received/sent instead of just index=received when
116 pinging MACs\&.
117 -.IP "-v"
118 +.IP "\-v"
119 Verbose output\&. Use twice for more messages\&.
120 -.IP "-w"
121 +.IP "\-w"
122 (arping 2\&.x only) Time to wait between pings, in microseconds\&.
123
93124 .PP
94 .SH "BUGS"
125 .SH "BUGS"
126
95127 .PP
96128 -You have to use -B instead of arpinging 255\&.255\&.255\&.255, and -b
97129 -instead of -S 255\&.255\&.255\&.255\&. This is libnets fault\&.
98130 +You have to use \-B instead of arpinging 255\&.255\&.255\&.255, and \-b
99131 +instead of \-S 255\&.255\&.255\&.255\&. This is libnets fault\&.
100132 .PP
101 .SH "SEE ALSO"
102 .PP
133 .SH "SEE ALSO"
134
0 /* $Id: freebsd.h 143 2000-09-28 20:45:19Z marvin $ */
0 /* arping/freebsd.h
1 /*
2 * Copyright (C) 2000-2008 Thomas Habets <thomas@habets.pp.se>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
118
219 #define __u8 u_int8_t
320 #define __u16 u_int16_t
0 /* $Id: openbsd.h 138 2000-09-15 17:22:30Z marvin $ */
0 /* arping/openbsd.h
1 *
2 * Copyright (C) 2000-2008 Thomas Habets <thomas@habets.pp.se>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
118
219 #define __u8 u_int8_t
320 #define __u16 u_int16_t
0 /* $Id: solaris.h 465 2001-11-18 14:43:45Z marvin $ */
0 /* arping/solaris.h
1 *
2 * Copyright (C) 2000-2008 Thomas Habets <thomas@habets.pp.se>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
118
219 #define __u8 uint8_t
320 #define __u16 uint16_t