This document describes how to install and configure the Link Layer Topology Discovery (LLTD) Protocol - Responder Source Code from Microsoft. The lld2d daemon allows linux systems to display in Vista's Network Map. This How-To should be easily adaptable to other distros.

 

Credits

I initially found info on http://www.jcxp.net/forums/index.php?showtopic=19789 about how to get this working. The post from pgn674 described how they were able to get the source code working. My contributions are simplification of the directions and the simple init.d launch script.

 

Prerequistes

  • System with Linux installed (Debian Lenny was used for this how-to)
  • Linux build environment for your distro
  • Basic familarity with Linux and the command line
  • gcc compiler installed
  • Microsoft LLTD source code

 

Download the Source Code

Download Rally-LLTD-PortingKit.exe from http://www.microsoft.com/whdc/rally/rallykit.mspx. Unzip the exe to a folder on your system (I used KDE's Ark to unzip the file).

 

Install the Build Environment

Make sure you have the needed build environment and tools to compile source code for your distro.

apt-get install linux-headers-`uname -r` build-essential

 

Compile and Install

In your preferred text editor open /usr/include/linux/wireless.h and add #include <linux/if.h> at the beginning of the file and save.

Open a terminal window or from the console enter:

cd /unzipped file folder/Sample Code/native-linux

Enter the "make" command and ignore warnings:

sudo make

Copy the lld2d executable to /usr/sbin (may be different for your distribution).

 

Create the init.d Launch Script

This simple lld2d init.d script is based off of the lisa init.d script. Use your preferred text editor to create the lld2d init.d script in /etc/init.d.

Make sure to edit the INTFACE variable with your preferred interface and make the script executable.

#! /bin/sh
### BEGIN INIT INFO
# Provides:          lld2d
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/lld2d
NAME=lld2d
PIDFILE=/var/run/$NAME.pid
DESC="LLTD Protocol Responder"
INTFACE=ENTER YOUR PREFERRED INTERFACE HERE
test -f $DAEMON || exit 0
set -e
is_running ()
{
	if [ -e "$PIDFILE" ]
	then
		#checking if program is running
		if [ -L /proc/`cat $PIDFILE`/exe ]
		then
		#checking for stale pidfile
			if grep -q $NAME /proc/`cat $PIDFILE`/cmdline 
			then
				#program is running and is called lisa
				return 0
			fi
		fi
		rm -f $PIDFILE
	fi
	#program is not running
	return 1
}
case "$1" in
  start)
  	if is_running
	then
		echo "$DESC is already running. Not doing anything"
		exit 0
	fi
	echo -n "Starting $DESC: "
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON $INTFACE\
		> /dev/null
	echo $(pidof lld2d) > $PIDFILE
	echo "$NAME."
	;;
  stop)
  	if ! is_running
	then
		echo "$DESC is not running. Not doing anything"
		exit 0
	fi
	echo -n "Stopping $DESC: "
	start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \
		--exec $DAEMON
	rm -f $PIDFILE
	echo "$NAME."
	;;
  reload|force-reload)
	echo "Reloading $DESC configuration files."
	start-stop-daemon --stop --quiet --signal 1 --pidfile $PIDFILE \
		--exec $DAEMON $INTFACE
	;;
  status)
	echo -n "$DESC is "
	if ! is_running
	then 
		echo -n "not "
	fi
	echo "running."
  	;;
  restart)
	echo -n "Restarting $DESC: "
	start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \
		--exec $DAEMON $INTFACE
	rm -f $PIDFILE
	sleep 1
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON $INTFACE\
		> /dev/null
	echo $(pidof lld2d) > $PIDFILE
	echo "$NAME."
	;;
  cond-restart)
  	if ! is_running
	then
		echo "$DESC is not running. Not doing anything"
		exit 0
	fi
	echo -n "Restarting $DESC: "
	start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE \
		--exec $DAEMON $INTFACE
	rm -f $PIDFILE
	sleep 1
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON $INTFACE\
		> /dev/null
	echo $(pidof lld2d) > $PIDFILE
	echo "$NAME."
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|cond-restart|status|reload|force-reload}" >&2
	exit 1
	;;
esac
exit 0

 

Launch the lld2d daemon

Enter the following command in a terminal window or at the console:

/etc/init.d/lld2d start

Refresh the Network Map on Vista and your Linux server should now showup as part of the map's display.

Share this page:

13 Comment(s)