summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-12-25 23:48:03 +0100
committerHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-12-25 23:48:03 +0100
commit425d09a5ddbb1aed1c6c11a11165719fa63d0a5e (patch)
treef6401709d888cbb6b42b84e6af993c688190a6b0
parent52edeba4b440aa0cc84d458caa40fb40f8488a63 (diff)
downloadMAC-Telnet-425d09a5ddbb1aed1c6c11a11165719fa63d0a5e.tar.gz
MAC-Telnet-425d09a5ddbb1aed1c6c11a11165719fa63d0a5e.zip
Official version 0.2
-rw-r--r--debian/changelog26
-rw-r--r--mactelnet.c15
2 files changed, 40 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 57c442f..461d14f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,29 @@
+mactelnet (0.2-1ubuntu1) unstable; urgency=low
+
+ * 52edeba Add support for dash-seperated mac addresses
+ * 25476c7 Moved global protocol info to protocol header, where it belongs
+ * 8e2e73c Added simple DATA packet retransmission support.
+ * 93d82ea Change naming convention on variable names as well
+ * 2d9057c Changed naming convention on function names
+ * dbadc1a Fixed a bug where the mndp port/socket was not closed after a parseMNDP call.
+ * c91ff96 Cleaned up code and added -Wall to the compiler flags. Moved packet types over to enums for more ease of use.
+ * 2074658 Added u/wtmp logout code, and did some minior code cleanup.
+ * fae8147 Show mac address of client in syslog, and save correct mac address for wtmp.
+ * ff590f3 Fix silly bug that made mactelnetd connections time out after only 65k bytes
+ * 53ef36c Added syslog logging. Added daemonizing of application. Cleaned up login code to correctly set up controlling terminal.
+ * 1cf099b Added "nologin" support. And cleaned up a little duplicated code.
+ * fadddf3 Fix silly warning about ether_ntoa argument
+ * bc9266f Added wtmp/utmp support. Fixed setuid/setgid bug and error detection. Added motd message. Minior code cleanup.
+ * 1fb3f64 Code cleanup in mactelnet daemon
+ * 59525a2 Added a little documentation in the source code
+ * 3f66904 Handle network devices without address information correctly.
+ * 749229f Skip loopback interfaces. They seldom/never have a MAC address, and you probably won't run a MAC-Telnet server there. Speeds up autodetect.
+ * 1c11ee9 Added missing file, documentation fixup, and minifixup in makefile
+ * 3103d2c Started code for auto-detecting interface. Working proof of concept version. Raw socket version not updated yet.
+ * 40362c4 Simplified the way parseControlPacket is looped/called
+ * a993f53 Minior fix: Move mac-address code downwards according to the order of arguments. So problems with the ifname will be reported before problems with the mac addr
+ * 50d0439 Removed dependency of libssl/crypto. Added L. Peter Deutsch's implementation of MD5 instead.
+
mactelnet (0.1-1ubuntu1) unstable; urgency=low
* Removed libssl dependency
diff --git a/mactelnet.c b/mactelnet.c
index 37fb026..eccd959 100644
--- a/mactelnet.c
+++ b/mactelnet.c
@@ -39,6 +39,9 @@
#include "config.h"
#include "mactelnet.h"
+#define PROGRAM_NAME "MAC-Telnet"
+#define PROGRAM_VERSION "0.2"
+
int sockfd;
int insockfd;
int device_index;
@@ -68,6 +71,10 @@ unsigned char mt_direction_fromserver = 0;
unsigned int send_socket;
+static void print_version() {
+ fprintf(stderr, PROGRAM_NAME " " PROGRAM_VERSION "\n");
+}
+
static int send_udp(struct mt_packet *packet, int retransmit) {
int sent_bytes;
if (broadcast_mode) {
@@ -347,7 +354,7 @@ int main (int argc, char **argv) {
int optval = 1;
while (1) {
- c = getopt(argc, argv, "nt:u:p:h?");
+ c = getopt(argc, argv, "nt:u:p:vh?");
if (c == -1)
break;
@@ -376,6 +383,11 @@ int main (int argc, char **argv) {
connect_timeout = atoi(optarg);
break;
+ case 'v':
+ print_version();
+ exit(0);
+ break;
+
case 'h':
case '?':
print_help = 1;
@@ -384,6 +396,7 @@ int main (int argc, char **argv) {
}
}
if (argc - optind < 1 || print_help) {
+ print_version();
fprintf(stderr, "Usage: %s <MAC|identity> [-h] [-n] [-t <timeout>] [-u <username>] [-p <password>]\n", argv[0]);
if (print_help) {