1*ba96d07fShrs /*- 2*ba96d07fShrs * Copyright (c) 2009, Sun Microsystems, Inc. 3*ba96d07fShrs * All rights reserved. 4984263bcSMatthew Dillon * 5*ba96d07fShrs * Redistribution and use in source and binary forms, with or without 6*ba96d07fShrs * modification, are permitted provided that the following conditions are met: 7*ba96d07fShrs * - Redistributions of source code must retain the above copyright notice, 8*ba96d07fShrs * this list of conditions and the following disclaimer. 9*ba96d07fShrs * - Redistributions in binary form must reproduce the above copyright notice, 10*ba96d07fShrs * this list of conditions and the following disclaimer in the documentation 11*ba96d07fShrs * and/or other materials provided with the distribution. 12*ba96d07fShrs * - Neither the name of Sun Microsystems, Inc. nor the names of its 13*ba96d07fShrs * contributors may be used to endorse or promote products derived 14*ba96d07fShrs * from this software without specific prior written permission. 15984263bcSMatthew Dillon * 16*ba96d07fShrs * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17*ba96d07fShrs * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18*ba96d07fShrs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*ba96d07fShrs * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20*ba96d07fShrs * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21*ba96d07fShrs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22*ba96d07fShrs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23*ba96d07fShrs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24*ba96d07fShrs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25*ba96d07fShrs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26*ba96d07fShrs * POSSIBILITY OF SUCH DAMAGE. 271de703daSMatthew Dillon * 281de703daSMatthew Dillon * @(#)getrpcport.c 1.3 87/08/11 SMI 291de703daSMatthew Dillon * @(#)getrpcport.c 2.1 88/07/29 4.0 RPCSRC 30ce0e08e2SPeter Avalos * $NetBSD: getrpcport.c,v 1.16 2000/01/22 22:19:18 mycroft Exp $ 31ce0e08e2SPeter Avalos * $FreeBSD: src/lib/libc/rpc/getrpcport.c,v 1.13 2004/10/16 06:11:34 obrien Exp $ 32c9b6181eSSascha Wildner * $DragonFly: src/lib/libc/rpc/getrpcport.c,v 1.3 2005/11/13 12:27:04 swildner Exp $ 33984263bcSMatthew Dillon */ 34984263bcSMatthew Dillon 35984263bcSMatthew Dillon /* 36984263bcSMatthew Dillon * Copyright (c) 1985 by Sun Microsystems, Inc. 37984263bcSMatthew Dillon */ 38984263bcSMatthew Dillon 39ce0e08e2SPeter Avalos #include "namespace.h" 40ce0e08e2SPeter Avalos #include <sys/types.h> 41ce0e08e2SPeter Avalos #include <sys/socket.h> 42ce0e08e2SPeter Avalos 43ce0e08e2SPeter Avalos #include <assert.h> 44ce0e08e2SPeter Avalos #include <netdb.h> 45984263bcSMatthew Dillon #include <stdio.h> 46984263bcSMatthew Dillon #include <string.h> 47ce0e08e2SPeter Avalos 48984263bcSMatthew Dillon #include <rpc/rpc.h> 49