MNDP and Mac-Telnet for Linux based devices.

I recently wanted my servers to be visible under Mikrotik’s network neighbors.

Thanx to: https://github.com/haakonnessjoen/MAC-Telnet
This works rather well.
Just saw i needed to open firewall rules:

-A INPUT -m state --state NEW -m udp -p udp --dport 5678 -j ACCEPT
-A INPUT -m state --state NEW -m udp -p udp --dport 20561 -j ACCEPT

I had do add this to get i compiled under Centos 5 in files: mactelnetd.c, protocol.c and mactelnet.c to fix some pre glibc 2.9 issue…

#include <byteswap.h>
#define htole16(x)      (bswap_16(htonl(x)))
#define htole32(x)      (bswap_32(htonl(x)))
#define le16toh(x)      (ntohl(bswap_16(x)))
#define le32toh(x)      (ntohl(bswap_32(x)))

This also looks interesting:
http://elceef.itsec.pl/mactelnet/
http://www.openmaniak.com/cdp.php