summaryrefslogtreecommitdiff
path: root/protocol.h
diff options
context:
space:
mode:
authorHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-12-25 23:08:49 +0100
committerHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-12-25 23:08:49 +0100
commit25476c74e2fe93163e50f41a0dc15b3088c6f65f (patch)
treee01713d18bbbda9fa8a7216c5ec9761c960d62fe /protocol.h
parent8e2e73c7d861595f7e9a94eb4d7faf60addc0a2d (diff)
downloadMAC-Telnet-25476c74e2fe93163e50f41a0dc15b3088c6f65f.tar.gz
MAC-Telnet-25476c74e2fe93163e50f41a0dc15b3088c6f65f.zip
Moved global protocol info to protocol header, where it belongs
Diffstat (limited to 'protocol.h')
-rw-r--r--protocol.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocol.h b/protocol.h
index bdebfd0..c55bf74 100644
--- a/protocol.h
+++ b/protocol.h
@@ -92,13 +92,13 @@ extern int parse_control_packet(unsigned char *data, int data_len, struct mt_mac
struct mt_mndp_packet *parse_mndp(const unsigned char *data, const int packet_len);
int query_mndp(const char *identity, unsigned char *mac);
-/* Initialized by protocol.c */
+/* Number of milliseconds between each retransmission */
#define MAX_RETRANSMIT_INTERVALS 9
-extern int retransmit_intervals[MAX_RETRANSMIT_INTERVALS];
+static const int retransmit_intervals[MAX_RETRANSMIT_INTERVALS] = { 15, 20, 30, 50, 90, 170, 330, 660, 1000 };
/* Control packet magic header */
-extern unsigned char mt_mactelnet_cpmagic[4];
-extern unsigned char mt_mactelnet_clienttype[2];
+static const unsigned char mt_mactelnet_cpmagic[4] = { 0x56, 0x34, 0x12, 0xff };
+static const unsigned char mt_mactelnet_clienttype[2] = { 0x00, 0x15 };
/* Must be initialized by application */
extern unsigned char mt_direction_fromserver;