summaryrefslogtreecommitdiff
path: root/mactelnet.c
diff options
context:
space:
mode:
authorHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-10-03 03:47:16 +0200
committerHåkon Nessjøen <haakon.nessjoen@gmail.com>2010-10-03 03:47:16 +0200
commit0130c93407610720cb1b0c654a2dd79f9a4f165d (patch)
tree6b1c6f579b2480273af377c44c46de9c18847c5b /mactelnet.c
parent5025b70fae9ab2d79deac9e08d806a85c339ddbe (diff)
downloadMAC-Telnet-0130c93407610720cb1b0c654a2dd79f9a4f165d.tar.gz
MAC-Telnet-0130c93407610720cb1b0c654a2dd79f9a4f165d.zip
Code cleanup
Diffstat (limited to 'mactelnet.c')
-rw-r--r--mactelnet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mactelnet.c b/mactelnet.c
index 8030b49..88d55a2 100644
--- a/mactelnet.c
+++ b/mactelnet.c
@@ -24,6 +24,7 @@
#include "config.h"
unsigned char mt_mactelnet_cpmagic[4] = { 0x56, 0x34, 0x12, 0xff };
+unsigned char mt_mactelnet_clienttype[2] = { 0x00, 0x15 };
int initPacket(struct mt_packet *packet, unsigned char ptype, unsigned char *srcmac, unsigned char *dstmac, unsigned short sessionkey, unsigned int counter) {
@@ -46,8 +47,7 @@ int initPacket(struct mt_packet *packet, unsigned char ptype, unsigned char *src
data[15] = sessionkey & 0xff;
/* Client type: Mac Telnet */
- data[16] = 0x00;
- data[17] = 0x15;
+ memcpy(data + 16, &mt_mactelnet_clienttype, sizeof(mt_mactelnet_clienttype));
/* Received/sent data counter */
data[18] = (counter >> 24) & 0xff;