diff options
author | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2010-10-03 03:47:16 +0200 |
---|---|---|
committer | Håkon Nessjøen <haakon.nessjoen@gmail.com> | 2010-10-03 03:47:16 +0200 |
commit | 0130c93407610720cb1b0c654a2dd79f9a4f165d (patch) | |
tree | 6b1c6f579b2480273af377c44c46de9c18847c5b /mactelnet.c | |
parent | 5025b70fae9ab2d79deac9e08d806a85c339ddbe (diff) | |
download | MAC-Telnet-0130c93407610720cb1b0c654a2dd79f9a4f165d.tar.gz MAC-Telnet-0130c93407610720cb1b0c654a2dd79f9a4f165d.zip |
Code cleanup
Diffstat (limited to 'mactelnet.c')
-rw-r--r-- | mactelnet.c | 4 |
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; |