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 (c) 1989, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A/* Copyright (c) 1988 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * The highest level interface for server creation. 2N/A * It tries for all the nettokens in that particular class of token 2N/A * and returns the number of handles it can create and/or find. 2N/A * It creates a link list of all the handles it could create. 2N/A * If svc_create() is called multiple times, it uses the handle 2N/A * created earlier instead of creating a new handle every time. 2N/A/* VARIABLES PROTECTED BY xprtlist_lock: xprtlist */ 2N/A /* This is a list of identified multilevel service provider */ 2N/A * Check if service should register over doors transport. 2N/A "svc_create: could not register over doors");
2N/A /* Found an old one, use it */ 2N/A "svc_create: could not register prog %d vers %d on %s",
2N/A /* It was not found. Now create a new one */ 2N/A "svc_create: no memory");
2N/A * In case of num == 0; the error messages are generated by the 2N/A * underlying layers; and hence not needed here. 2N/A * The high level interface to svc_tli_create(). 2N/A * It tries to create a server for "nconf" and registers the service 2N/A * with the rpcbind. It calls svc_tli_create(); 2N/A "svc_tp_create: invalid netconfig structure for prog %d vers %d",
2N/A /* Some programs need to allocate MLP for multilevel services */ 2N/A "svc_tp_create: Could not register prog %d vers %d on %s",
2N/A * If fd is RPC_ANYFD, then it opens a fd for the given transport 2N/A * provider (nconf cannot be NULL then). If the t_state is T_UNBND and 2N/A * bindaddr is NON-NULL, it performs a t_bind using the bindaddr. For 2N/A * NULL bindadr and Connection oriented transports, the value of qlen 2N/A * is set arbitrarily. 2N/A * If sendsz or recvsz are zero, their default values are chosen. 2N/A int state;
/* state of the transport provider */ 2N/A "svc_tli_create: invalid netconfig");
2N/A "svc_tli_create: could not open connection for %s: %s",
2N/A * It is an open descriptor. Sync it & get the transport info. 2N/A "svc_tli_create: could not do t_sync: %s",
2N/A "svc_tli_create: could not get transport information: %s",
2N/A /* Enable options of returning the ip's for udp */ 2N/A "svc_tli_create: IPV6_RECVPKTINFO(1): %s",
2N/A "svc_tli_create: IP_RECVDSTADDR(1): %s",
2N/A * If the fd is unbound, try to bind it. 2N/A * In any case, try to get its bound info in tres 2N/A /* If this is a labeled system, then ask for an MLP */ 2N/A * SO_EXCLBIND has the following properties 2N/A * - an fd bound to port P via IPv4 will prevent an IPv6 2N/A * bind to port P (and vice versa) 2N/A * - an fd bound to a wildcard IP address for port P will 2N/A * prevent a more specific IP address bind to port P 2N/A * (see {tcp,udp}.c for details) 2N/A * We use the latter property to prevent hijacking of RPC 2N/A * services that reside at non-privileged ports. 2N/A "svc_tli_create: can't set EXCLBIND [netid='%s']",
2N/A "svc_tli_create: could not bind: %s",
2N/A * Should compare the addresses only if addr.len 2N/A "svc_tli_create: could not bind to requested address: %s",
2N/A "address mismatch");
2N/A "svc_tli_create: could not bind: %s",
2N/A /* Enable options of returning the ip's for udp */ 2N/A "svc_tli_create: IPV6_RECVPKTINFO(2): %s",
2N/A "svc_tli_create: IP_RECVDSTADDR(2): %s",
2N/A /* Copy the entire stuff in tres */ 2N/A "svc_tli_create: illegal netbuf length");
2N/A "svc_tli_create: other side wants to\ 2N/Arelease connection");
2N/A /* Do nothing here. Assume this is handled in rendezvous */ 2N/A * This takes care of the case where a fd 2N/A * is passed on which a connection has already 2N/A "svc_tli_create: connection in a wierd state (%d)",
state);
2N/A * call transport specific function. 2N/A "svc_tli_create: bad service type");
2N/A * The error messages here are spitted out by the lower layers: 2N/A * svc_vc_create(), svc_fd_create() and svc_dg_create(). 2N/A /* fill in the other xprt information */ 2N/A /* Assign the local bind address */ 2N/A /* Fill in type of service */ 2N/A /* Allocate space for the remote bind info */ 2N/A * (void) ioctl(fd, I_POP, NULL); 2N/A if (!
madefd)
/* so that svc_destroy doesnt close fd */