LISa 0.2.2 reviewDownload
LISa is a small daemon which is intended to run on end user systems
LISa is a small daemon which is intended to run on end user systems. It provides something like a "network neighbourhood", but only relying on the TCP/IP protocol stack, no smb or whatever. The information about the hosts in your "neighbourhood" is provided via TCP port 7741.
LISa supports two ways of searching for hosts, the first method is to send ICMP echo request packets to the hosts, the second one is to send NetBIOS broadcasts using nmblookup. In order to keep network load low various strategies are implemented. There is also a basic security mechanism. For environments with stricter security rules there is also a restricted version, resLISa. LISa should compile and work under the usual unix flavours (linux, *bsd, solaris,...), it might have problems on 64 bit machines and it definitly doesn't work with IPv6. It provides some special support for KDE , but it is completely independant, it requires neither the Qt library nor any KDE stuff.
In the configuration file of LISa you provide a range of IP-addresses which LISa should check wether they are running. In the most simple case this could be your network address/subnetmask, then LISa would check every possible host of your network wether it is up. The hosts are checked using ICMP echo requests. To be able to send and receive ICMP echo requests and replies the program has to open a so called "raw socket". Therefor it needs root privileges. This socket is opened right after the start of the program, after successfully opening the socket root privileges are dropped immediatly (see main.cpp and strictmain.cpp). If you configure LISa this way, that it also uses nmblookup, it will popen("nmblookup "*""); and then parse the results.
Since the ICMP requests and the broadcasts can cause some network traffic if there are more than one such server running in one network, the servers cooperate with each other. Before they start pinging (or nmblookup), they send a broadcast on port 7741.
If somebody answers this broadcast, they will retrieve the complete list of running hosts via TCP port 7741 from this host and will not start to ping (or nmblookup) theirselves. If nobody answers, the host which sent the broadcast will start pinging the hosts (or nmblookup) and then open a socket which listens for the mentioned broadcasts. If the host received an answer to his broadcast, it won't have the socket for listening to the broadcasts open. So usually exactly one of the servers will have this socket open and only this one will actually ping (or nmblookup) the hosts. In other words, the servers are lazy, they work like "I will only do something if nobody else can do it for me".
There is another feature which reduces the network load. Let's say you configured LISa to update all 10 minutes. Now you don't access your server very often. If nobody accessed the server during the last update period, the server will update (either itself or from the one which actually does the work) and then double its update period, i.e. the next update will happen after 20 minutes. This will happen 4 times, so if nobody accesses the server with update period 10 minutes for a long time, its update interval will grow up to 160 minutes, almost three hours. If then somebody accesses the data from the server, he will get an old list ( up to 160 minutes old). With accessing the server will reset its update interval to its initial value, i.e. 10 minutes and immediatly start updating if the last update is more than these 10 minutes over. This means if you get a very old list, you can try some seconds later again and you should get a current version. This will have fast effect for the servers, which don't ping (or nmblookup) theirselves, since only one user usually accesses them, and it will have less effect for the server which does the pinging (or nmblookup), since this server is accessed from all other servers in the network.
This way it is possible that many hosts in a network run this server, but the net load will remain low. For the user it is not neccessary to know wether there is a server (i.e. a name server or fileserver or whatever) in the network which also runs LISa. He can always run LISa locally and LISa will detect if there is one existing, transparently to the user.
If you don't want that your LISa takes part in the broadcasting, but always does the pinging itself, make it use another port with the command line option --port or -p. This is not recommended !
If you send SIGHUP to LISa, it will reread its configfile. If you send SIGUSR1 to LISa, it will print some status information to stdout.
LISa 0.2.2 keywords