diff options
-rw-r--r-- | mactelnet.c | 2 | ||||
-rw-r--r-- | mactelnetd.c | 3 | ||||
-rw-r--r-- | mndp.c | 5 | ||||
-rw-r--r-- | protocol.h | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/mactelnet.c b/mactelnet.c index 19624ea..ad2c985 100644 --- a/mactelnet.c +++ b/mactelnet.c @@ -592,7 +592,7 @@ int main (int argc, char **argv) { inet_pton(AF_INET, (char *)"255.255.255.255", &destip); memcpy(&sourceip, &(si_me.sin_addr), IPV4_ALEN); - /* Sessioon key */ + /* Session key */ sessionkey = rand() % 65535; /* stop output buffering */ diff --git a/mactelnetd.c b/mactelnetd.c index 1738ce8..2c31e90 100644 --- a/mactelnetd.c +++ b/mactelnetd.c @@ -803,6 +803,7 @@ void mndp_broadcast() { mndp_add_attribute(&pdata, MT_MNDPTYPE_PLATFORM, PLATFORM_NAME, strlen(PLATFORM_NAME)); mndp_add_attribute(&pdata, MT_MNDPTYPE_HARDWARE, s_uname.machine, strlen(s_uname.machine)); mndp_add_attribute(&pdata, MT_MNDPTYPE_TIMESTAMP, &uptime, 4); + mndp_add_attribute(&pdata, MT_MNDPTYPE_SOFTID, MT_SOFTID_MACTELNET, strlen(MT_SOFTID_MACTELNET)); header->cksum = in_cksum((unsigned short *)&(pdata.data), pdata.size); send_special_udp(interface, MT_MNDP_PORT, &pdata); @@ -1019,7 +1020,7 @@ int main (int argc, char **argv) { signal(SIGCHLD,SIG_IGN); signal(SIGTSTP,SIG_IGN); signal(SIGTTOU,SIG_IGN); - signal(SIGTTIN,SIG_IGN); + signal(SIGTTIN,SIG_IGN); signal(SIGHUP, sighup_handler); signal(SIGTERM, sigterm_handler); @@ -109,7 +109,10 @@ int mndp(void) { printf(" (%s %s %s)", packet->platform, packet->version, packet->hardware); } if (packet->uptime > 0) { - printf(_(" up %d days %d hours"), packet->uptime / 86400, packet->uptime % 86400 / 3600); + printf(_(" up %d days %d hours"), packet->uptime / 86400, packet->uptime % 86400 / 3600); + } + if (packet->softid != NULL) { + printf(" %s", packet->softid); } putchar('\n'); } @@ -33,6 +33,8 @@ #define MT_MNDP_TIMEOUT 5 #define MT_MNDP_LONGTIMEOUT 120 +#define MT_SOFTID_MACTELNET "MAC-Telnet" + #ifndef ETH_ALEN #define ETH_ALEN 6 #endif |