
   Simple but hopefully hopefully safer RPC service replacement
  
   Copright (C) 2000 <okir@caldera.de>
  
   This implementation tries to protect against the most common
   DoS attacks against TCP based RPC servers.
  
    1.	Send a record marker, then stop. This will hang the server
  	for 30 secs or so.

    2.	Send a valid RPC packet, byte by byte, 20 seconds apart.
  	This will hang the server for as long as it takes to transmit
  	the packet.

    3.	Send a stream of valid packets to the server, but never
  	read the replies from your TCP socket. This will gradually
  	fill up the network pipe until the server blocks in tcp_write.
  	This blocking is indefinite.

   What this implementation doesn't do:

    1.	It supports only NONE and UNIX credentials. No DES or GSS

    2.	It has an upper limit on the maximum size of requests it
  	will handle (16K currently). Useful for most system services,
  	but I've seen apps that shove several megs worth of data through
  	a TCP stream. Ick.

    3.	Protect you against "eat up all the server's TCP sockets"
   	type of DoS attacks.

   Known incompatibilities:

    1.	In the original implementation, an RPC packet received on
    	_any_ transport will be delivered to the matching service,
	even if the transport was not registered for that program/version
	pair via svc_register().

	The following would work in the old code:

		xprt = svcudp_create(...);
		xprt = svctcp_create(...);
		svc_register(xprt, ....);

	With this RPC implementation, you will have to register
	each transport individually.

     2.	Idle TCP connections are closed after 30 seconds of
	inactivity.

   Using this RPC library:

     1.	In your application source code, replace all
	#include <rpc/foo.h> with #include <smallrpc/foo.h>
	and recompile.

	If the compile breaks because of a missing header
	file, it's possible smallrpc is missing some feature
	your application needs.

     2.	If the application compiled fine, make sure that it's
	not asking for any RPC functions from the system libc.
	Run

		nm -u yourapp

	and check the output for any symbols with rpc, svc,
	and xdr in them.
