diff options
author | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2010-10-04 11:38:00 +0200 |
---|---|---|
committer | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2010-10-04 11:38:00 +0200 |
commit | 4c8978d341731e5aa49bc877214d145bfde0bc20 (patch) | |
tree | 5f979afd2cb23e820b949134369cf996b7e07a7a /mndp.c | |
parent | 3e4740e94d5151783085b16df6d76692cfa9cb5f (diff) | |
download | MAC-Telnet-4c8978d341731e5aa49bc877214d145bfde0bc20.tar.gz MAC-Telnet-4c8978d341731e5aa49bc877214d145bfde0bc20.zip |
Minior code cleanup
Diffstat (limited to 'mndp.c')
-rw-r--r-- | mndp.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -21,12 +21,9 @@ #include <arpa/inet.h> #include <netinet/ether.h> #include <string.h> +#include "mactelnet.h" #include "config.h" -#define MT_PACKET_LEN 1500 -#define MT_MNDP_PORT 5678 -#define MT_MNDP_MAX_NAME_LENGTH 64 - int main(int argc, char **argv) { int sock,result; int optval = 1; @@ -57,9 +54,7 @@ int main(int argc, char **argv) { /* Set the socket to allow sending broadcast packets */ if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &optval, sizeof (optval))==-1) { fprintf(stderr, "Unable to send broadcast packets: Operating in receive only mode.\n"); - } - else - { + } else { /* Request routers identify themselves */ unsigned int message = 0; |