This is pppd_rpc_lookup.c in view mode; [Download] [Up]
//***************************************************************************** // // pppd_rpc_lookup.c // // Contains a library routine to look up the pppd 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/pppd_rpc_types.h" #import <mach/mach_error.h> #import <servers/netname.h> //***************************************************************************** // // finds the port that the pppd rpc server has advertised // //***************************************************************************** port_t pppd_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, "", PPPD_RPC_SERVER_NAME, &port); if (ret != KERN_SUCCESS) { /* Print the network name server's error message. */ mach_error("Lookup of pppd 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.