summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.pp.se>2009-10-07 00:21:59 +0200
committerThomas Habets <thomas@habets.pp.se>2009-10-07 00:21:59 +0200
commit3f09ad71a5b10ffe5445f9b6235774e8c00ad584 (patch)
treebb6019ecab58e0354a8ae65df2741d1ffc798440
parent44015537bc97eb81f0b4064d2c80374f3247e93b (diff)
downloadarping-3f09ad71a5b10ffe5445f9b6235774e8c00ad584.tar.gz
Comment cleanups, no code change
-rw-r--r--Makefile.am.common2
-rw-r--r--Makefile.in2
-rw-r--r--doc/Makefile.in2
-rw-r--r--src/Makefile.am3
-rw-r--r--src/Makefile.in4
-rw-r--r--src/arping.h2
-rw-r--r--src/findif_bsd.c7
-rw-r--r--src/findif_linux.c6
8 files changed, 19 insertions, 9 deletions
diff --git a/Makefile.am.common b/Makefile.am.common
index 7591fde..4360712 100644
--- a/Makefile.am.common
+++ b/Makefile.am.common
@@ -1,3 +1,3 @@
+# arping/Makefile.am.common
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = *~
-
diff --git a/Makefile.in b/Makefile.in
index d49ba80..29adf24 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -168,6 +168,8 @@ target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+
+# arping/Makefile.am.common
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = *~
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 3340a05..a1b6515 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -146,6 +146,8 @@ target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+
+# arping/Makefile.am.common
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = *~
diff --git a/src/Makefile.am b/src/Makefile.am
index 1590deb..d42fe60 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,5 @@
-# arping/Makefile.am
+# arping/src/Makefile.am
+
include $(top_srcdir)/Makefile.am.common
sbin_PROGRAMS = arping
diff --git a/src/Makefile.in b/src/Makefile.in
index 2bd447c..8c63ae2 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -14,6 +14,8 @@
@SET_MAKE@
+# arping/src/Makefile.am
+
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -160,6 +162,8 @@ target_os = @target_os@
target_vendor = @target_vendor@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+
+# arping/Makefile.am.common
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = *~
arping_SOURCES = arping.c
diff --git a/src/arping.h b/src/arping.h
index 93d8f66..feb86f6 100644
--- a/src/arping.h
+++ b/src/arping.h
@@ -1,3 +1,5 @@
+/* arping/src/arping.h */
+
#if HAVE_STDINT_H
#include <stdint.h>
#endif
diff --git a/src/findif_bsd.c b/src/findif_bsd.c
index 367bbc2..1f5c248 100644
--- a/src/findif_bsd.c
+++ b/src/findif_bsd.c
@@ -23,14 +23,14 @@
#include <stdio.h>
#include <string.h>
-
#include "arping.h"
+
/**
*
*/
const char *
arping_lookupdev(const char *ifname,
- uint32_t srcip,
+ uint32_t srcip,
uint32_t dstip,
char *ebuf)
{
@@ -42,7 +42,6 @@ arping_lookupdev(const char *ifname,
do_libnet_init(ifname);
libnet_addr2name4_r(dstip,0,buf1, 1024);
- //libnet_addr2name4_r(srcip,0,buf1);
/*
* Construct and run command
@@ -63,7 +62,7 @@ arping_lookupdev(const char *ifname,
}
/*
- * Parse out device
+ * Parse interface name
*/
p = strstr(buf, "interface: ");
if (!p) {
diff --git a/src/findif_linux.c b/src/findif_linux.c
index 9bf35d2..ff60549 100644
--- a/src/findif_linux.c
+++ b/src/findif_linux.c
@@ -26,7 +26,7 @@
#include "arping.h"
/**
- *
+ * WARNING: non-reentrant
*/
const char *
arping_lookupdev(const char *ifname,
@@ -49,7 +49,7 @@ arping_lookupdev(const char *ifname,
* Construct and run command
*/
snprintf(buf, 1023, "/sbin/ip route get %s from %s 2>&1",
- buf2,buf1);
+ buf2, buf1);
if (!(f = popen(buf, "r"))) {
goto failed;
}
@@ -64,7 +64,7 @@ arping_lookupdev(const char *ifname,
}
/*
- * Parse out device
+ * Parse interface name
*/
p = strstr(buf, "dev ");
if (!p) {