ftp.nice.ch/pub/next/connectivity/protocol/GateKeeper.3.0.Beta.4.s.tar.gz#/GateKeeper.3.0.Beta.4.s/MiG/Client/gk_rpc_lookup.c

This is gk_rpc_lookup.c in view mode; [Download] [Up]

//*****************************************************************************
//
// 	gk_rpc_lookup.c  
//
//		Contains a library routine to look up the GateKeeper RPC server.
//
//			by	Felipe A. Rodriguez		
//
//	This code is supplied "as is" the author makes no warranty as to its 
//	suitability for any purpose.  This code is free and may be distributed 
//	in accordance with the terms of the:
//		
//			GNU GENERAL PUBLIC LICENSE
//			Version 2, June 1991
//			copyright (C) 1989, 1991 Free Software Foundation, Inc.
// 			675 Mass Ave, Cambridge, MA 02139, USA
//
//*****************************************************************************

#import "../../MiG/Library/gk_rpc_types.h"





//*****************************************************************************
//
// 		function finds the port that the GateKeeper server has	advertised
//
//*****************************************************************************

port_t gk_rpc_server_look_up()
{
port_t			port;
kern_return_t   ret;    
	 
		/* 
		* Use "" instead of "*", so we look only on this machine.
		* (That way, we won't run into someone else who's testing 
		* this server.)
		*/
	ret = netname_look_up(name_server_port, "", GK_SERVER_NAME, &port);
	
	if (ret != KERN_SUCCESS)
		{
				/* Print the network name server's error message. */
		mach_error("Lookup of GateKeeper RPC server failed", ret);	

		return PORT_NULL;
		}

	return port;
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.