summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-11-03 03:04:41 +0100
committerHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-11-03 03:04:41 +0100
commit1c11ee970aaa1dde00028508517e2f8964cd54ea (patch)
treeefe3331c42ced61d35d14c9d646118874b614689
parent3103d2c9c237101abf143dd19e9998a426c0d9ec (diff)
downloadMAC-Telnet-1c11ee970aaa1dde00028508517e2f8964cd54ea.tar.gz
MAC-Telnet-1c11ee970aaa1dde00028508517e2f8964cd54ea.zip
Added missing file, documentation fixup, and minifixup in makefile
-rw-r--r--Makefile6
-rw-r--r--README.markdown6
-rw-r--r--debian/README6
-rw-r--r--mactelnet.h1
4 files changed, 10 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 0115175..d6e6d7b 100644
--- a/Makefile
+++ b/Makefile
@@ -14,11 +14,11 @@ install: all
chown $(DESTDIR)/etc/mactelnetd.users
chmod 600 $(DESTDIR)/etc/mactelnetd.users
-mactelnet: config.h udp.h udp.c mactelnet.c protocol.c protocol.h console.c console.h devices.c devices.h md5.h
+mactelnet: config.h udp.h udp.c mactelnet.c mactelnet.h protocol.c protocol.h console.c console.h devices.c devices.h md5.c md5.h
gcc -g -DUSERSFILE='"/etc/mactelnetd.users"' -o mactelnet mactelnet.c udp.c protocol.c console.c devices.c md5.c
-mactelnetd: config.h mactelnetd.c udp.h udp.c protocol.c protocol.h console.c console.h users.c users.h md5.h
+mactelnetd: config.h mactelnetd.c udp.h udp.c protocol.c protocol.h console.c console.h users.c users.h md5.c md5.h
gcc -g -DUSERSFILE='"/etc/mactelnetd.users"' -o mactelnetd mactelnetd.c udp.c protocol.c console.c users.c md5.c
-mndp: config.h mndp.c protocol.h
+mndp: config.h mndp.c protocol.c protocol.h
gcc -g -o mndp mndp.c protocol.c
diff --git a/README.markdown b/README.markdown
index 3dc7f0e..b10515c 100644
--- a/README.markdown
+++ b/README.markdown
@@ -22,13 +22,13 @@ Usage
-----
# mactelnet -h
- Usage: ./mactelnet <ifname> <MAC|identity> [-h] [-n] [-u <username>] [-p <password>]
+ Usage: ./mactelnet <MAC|identity> [-h] [-n] [-t <timeout>] [-u <username>] [-p <password>]
Parameters:
- ifname Network interface that the RouterOS resides on. (example: eth0)
MAC MAC-Address of the RouterOS device. Use mndp to discover them.
identity The identity/name of your RouterOS device. Uses MNDP protocol to find it..
-n Do not use broadcast packets. Less insecure but requires root privileges.
+ -t Amount of seconds to wait for a response on each interface.
-u Specify username on command line.
-p Specify password on command line.
-h This help.
@@ -36,7 +36,7 @@ Usage
Example:
- $ ./mactelnet eth0 0:c:42:43:58:a5 -u admin
+ $ ./mactelnet 0:c:42:43:58:a5 -u admin
Password:
Connecting to 0:c:42:43:58:a5...done
diff --git a/debian/README b/debian/README
index 3dc7f0e..b10515c 100644
--- a/debian/README
+++ b/debian/README
@@ -22,13 +22,13 @@ Usage
-----
# mactelnet -h
- Usage: ./mactelnet <ifname> <MAC|identity> [-h] [-n] [-u <username>] [-p <password>]
+ Usage: ./mactelnet <MAC|identity> [-h] [-n] [-t <timeout>] [-u <username>] [-p <password>]
Parameters:
- ifname Network interface that the RouterOS resides on. (example: eth0)
MAC MAC-Address of the RouterOS device. Use mndp to discover them.
identity The identity/name of your RouterOS device. Uses MNDP protocol to find it..
-n Do not use broadcast packets. Less insecure but requires root privileges.
+ -t Amount of seconds to wait for a response on each interface.
-u Specify username on command line.
-p Specify password on command line.
-h This help.
@@ -36,7 +36,7 @@ Usage
Example:
- $ ./mactelnet eth0 0:c:42:43:58:a5 -u admin
+ $ ./mactelnet 0:c:42:43:58:a5 -u admin
Password:
Connecting to 0:c:42:43:58:a5...done
diff --git a/mactelnet.h b/mactelnet.h
new file mode 100644
index 0000000..f9ac1b9
--- /dev/null
+++ b/mactelnet.h
@@ -0,0 +1 @@
+#define CONNECT_TIMEOUT 2