
			
		       	 MASTER <=> SLAVE 
		      communication protocol
		    
	  (by Renaud Deraison <deraison@cvs.nessus.org>)
	

This documentation is just FYI in the case you'd study the sources
of this program.



	
The syntax of the M-S communication protocol is very simple.
The M sends the orders, the client sends the results.


MASTER ORDERS FORMAT
--------------------

The master will only send these two orders :
 FILTER pcap_filter
 STOP
 QUIT
 OK

Whereas :
	
	FILTER : applies a new filter, and start capturing packets
	STOP   : stops the packets capture
	QUIT   : kill the slave
	OK     : ready to go / previous message received

SLAVE REPLIES FORMAT
--------------------

The client will send to the server the packets it has received.
the actual packet is send back, splitted in bytes :

	( 45 0f ff 12 ... )
	
So the server can reconstruct it easily, and determine what are the
active filters.

The slave will send 'OK' messages each time it has received an order and
processed it -- that is, whenever the master sends a FILTER or STOP order,
the slave will send a OK message.

Whenever the slave sends a packet to the master, it waits for the master to
answer 'OK' as well. If the master doesn't reply 'OK', there may be a
synchronisation error and the slave sends the packet once more.


