summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mactelnet.c5
-rw-r--r--mactelnet.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/mactelnet.c b/mactelnet.c
index e28b946..7486a9b 100644
--- a/mactelnet.c
+++ b/mactelnet.c
@@ -42,7 +42,7 @@ int initPacket(unsigned char *data, unsigned char ptype, unsigned char *srcmac,
data[14] = sessionkey >> 8;
data[15] = sessionkey & 0xff;
- /* Magic number */
+ /* Client type: Mac Telnet */
data[16] = 0x00;
data[17] = 0x15;
@@ -91,6 +91,9 @@ void parsePacket(unsigned char *data, struct mt_mactelnet_hdr *pkthdr) {
/* dst ethernet addr */
memcpy(pkthdr->dstaddr, data+8,6);
+ /* server type */
+ memcpy(&(pkthdr->clienttype), data+14, 2);
+
/* Session key */
pkthdr->seskey = data[16] << 8 | data[17];
diff --git a/mactelnet.h b/mactelnet.h
index 44d3a09..6176fa4 100644
--- a/mactelnet.h
+++ b/mactelnet.h
@@ -41,6 +41,7 @@
struct mt_mactelnet_hdr {
unsigned char ver;
unsigned char ptype;
+ unsigned int clienttype;
unsigned char srcaddr[6];
unsigned char dstaddr[6];
unsigned short seskey;