/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5.1.1 */
/*
*
* nlsrequest(3):
*
* Send service request message to remote listener
* on previously established virtual circuit to remote
* listener process.
*
* If an error occurrs, t_errno will contain an error code.
*
* Setting the external integer "_nlslog" to any non-zero
* value before calling nlsrequest, will cause nlsrequest
* to print debug information on stderr.
*
* initial handshake to insure connectivity.
*
* This version of nlsrequest includes the
* service request response message.
*/
#include <stdio.h>
#include <ctype.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include "listen.h"
extern int _nlslog; /* non-zero allows use of stderr */
char *_nlsrmsg = (char *)0;
int
{
char *p;
extern int t_errno;
t_errno = 0; /* indicates a 'name' problem */
buf[0] = 0;
/*
* Validate service code
*/
if (_nlslog)
return(-1);
}
/*
* send protocol message requesting the service
*/
if (_nlslog)
t_error("t_snd of listener request message failed");
return(-1);
}
p = _nlsbuf;
len = 0;
do {
if (_nlslog)
return(-1);
}
if (_nlslog)
t_error("t_rcv of listener response msg failed");
return(-1);
}
} while (*p++ != '\0');
goto parsefail;
if ((p = strtok((char *)0, ":")) == (char *)0)
goto parsefail;
return(ret);
if (_nlslog)
return(-1);
}