1 EMU_IP   
 Collection of routines used to process IP and related protocols. 
 See individual routines for descriptions
2 EMU_PING
 This routine will test the specified IP layer address on the Internet with 
 an ICMP echo packet.


3 Inputs
	P1	.address of 4 byte IP address of target node
    Optional:
	P2 	.address of .long  where reponse time is written
3 Output
  	If P2 specified, the round trip reponse time is returned
	as a number of 1/100 second units.
3 Returns 
	SS$_NORMAL	Requested echo(s) were succesful
	SS$_UNREACHABLE	Failed to receive response from target
	SS$_ACCVIO	Can' read input params or can't write outp field
2 CKSUM 

 Returns 1's complement checksum of a number of 16 bit words
 Thanks to Commer,Stevens 
 
3 Input
	P1      addr of 1st word to checksum
	p2	Number of words

3 Output

 Returns checksum in r0 

3 Return
  None
3 Original_source
 Follows is the original source code. This was compiled with 
 /machine, the macro instructions extracted and corrected.
 
    2        	short	cksum(buf, nwords)
    3        	unsigned short	*buf;
    4        	int		nwords;
    5        		{
    6    1   		unsigned long	sum;
    7    1   	
    8    1   		for(sum = 0; nwords > 0; nwords--) { sum += *buf++; }
    9    1   	
   10    1   		sum = (sum >> 16) + (sum & 0xFFFF);
   11    1   		sum += (sum >> 16);
   12    1   		return ~sum;
   13    1   		}

