2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Portions of this source code were derived from Berkeley 2N/A * 4.3 BSD under license from the Regents of the University of 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * Miscl routines for RPC. 2N/A int nflag;
/* Whether NETPATH or NETCONFIG */ 2N/A * Cache the result of getrlimit(), so we don't have to do an 2N/A * expensive call every time. Since many old programs assume 2N/A * it will not return more than 1024 and use svc_fdset, return 2N/A * maximum of FD_SETSIZE. 2N/A * backward compatibility; too many places 2N/A * this function is called assuming it returns 2N/A * Something wrong. I'll try to save face by returning a 2N/A * pessimistic number. 2N/A * Find the appropriate buffer size 2N/A if (
bufsize == -
2)
/* transfer of data unsupported */ 2N/A * bufsize == -1 : No limit on the size 2N/A * bufsize == 0 : Concept of tsdu foreign. Choose 2N/A /* Check whether the value is within the upper max limit */ 2N/A * Find the appropriate address buffer size 2N/A * (size == -1) No limit on the size. we impose a limit here. 2N/A * If nettype is NULL, it defaults to NETPATH. 2N/A * For the given nettype (tcp or udp only), return the first structure found. 2N/A * This should be freed by calling freenetconfigent() 2N/A "__rpc_getconfip : " 2N/A "__rpc_getconfip : " 2N/A * Returns the type of the nettype, which should then be used with 2N/A * Returns the next netconfig struct for the given "net" type. 2N/A * __rpc_setconf() should have been called previously. 2N/A * Used to ping the NULL procedure for clnt handle. 2N/A * Returns NULL if fails, else a non-NULL pointer. 2N/A * Given a fd, find the transport device it is using and return the 2N/A * netconf entry corresponding to it. 2N/A * Note: It assumes servtpe parameter is 0 when uninitialized. 2N/A * That is true for xprt->xp_type field. 2N/A "could not get transport information",
2N/A * transport device in use on fd. 2N/A * - Match on service type first 2N/A * - if that succeeds, match on major numbers (used for new local 2N/A * transport code that is self cloning) 2N/A * - if that fails, assume transport device uses clone driver 2N/A * and try match the fdmajor with minor number of device path 2N/A * which will be the major number of transport device since it 2N/A * uses the clone driver. 2N/A break;
/* self cloning driver ? */ 2N/A break;
/* clone driver! */