summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mactelnet.c38
-rw-r--r--mactelnetd.c15
2 files changed, 26 insertions, 27 deletions
diff --git a/mactelnet.c b/mactelnet.c
index eccd959..e0549c1 100644
--- a/mactelnet.c
+++ b/mactelnet.c
@@ -42,34 +42,34 @@
#define PROGRAM_NAME "MAC-Telnet"
#define PROGRAM_VERSION "0.2"
-int sockfd;
-int insockfd;
-int device_index;
-unsigned int outcounter = 0;
-unsigned int incounter = 0;
-int sessionkey = 0;
-int running = 1;
+static int sockfd;
+static int insockfd;
+static int device_index;
+static unsigned int outcounter = 0;
+static unsigned int incounter = 0;
+static int sessionkey = 0;
+static int running = 1;
-unsigned char broadcast_mode = 1;
-unsigned char terminal_mode = 0;
+static unsigned char broadcast_mode = 1;
+static unsigned char terminal_mode = 0;
-unsigned char srcmac[ETH_ALEN];
-unsigned char dstmac[ETH_ALEN];
+static unsigned char srcmac[ETH_ALEN];
+static unsigned char dstmac[ETH_ALEN];
-struct in_addr sourceip;
-struct in_addr destip;
-int sourceport;
+static struct in_addr sourceip;
+static struct in_addr destip;
+static int sourceport;
-int connect_timeout = CONNECT_TIMEOUT;
+static int connect_timeout = CONNECT_TIMEOUT;
-unsigned char encryptionkey[128];
-char username[255];
-char password[255];
+static unsigned char encryptionkey[128];
+static char username[255];
+static char password[255];
/* Protocol data direction */
unsigned char mt_direction_fromserver = 0;
-unsigned int send_socket;
+static unsigned int send_socket;
static void print_version() {
fprintf(stderr, PROGRAM_NAME " " PROGRAM_VERSION "\n");
diff --git a/mactelnetd.c b/mactelnetd.c
index 7196a30..2ee1279 100644
--- a/mactelnetd.c
+++ b/mactelnetd.c
@@ -47,15 +47,14 @@
#include "users.h"
#include "config.h"
-int sockfd;
-int insockfd;
-int device_index;
+static int sockfd;
+static int insockfd;
-struct in_addr sourceip;
-struct in_addr destip;
-int sourceport;
+static struct in_addr sourceip;
+static struct in_addr destip;
+static int sourceport;
-unsigned char trypassword[17];
+static unsigned char trypassword[17];
/* Protocol data direction */
unsigned char mt_direction_fromserver = 1;
@@ -100,7 +99,7 @@ struct mt_connection {
static void uwtmp_login(struct mt_connection *);
static void uwtmp_logout(struct mt_connection *);
-struct mt_connection *connections_head = NULL;
+static struct mt_connection *connections_head = NULL;
static void list_add_connection(struct mt_connection *conn) {
struct mt_connection *p;