/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
/*
* Contains the following utility functions:
* tli_send:
* tli_recv:
* get_ok_ack:
*
* Returns:
* See individual functions.
*/
extern int getiocseqno(void);
int
{
int error;
/*
* Send data honoring flow control and errors
*/
return (error);
}
int
{
int error;
int pflag;
timout = 0;
else
timout = -1;
pri = 0;
return (error);
}
int
{
int msgsz;
int error;
error = 0;
/*
* wait for ack
*/
return (error);
return (EPROTO);
}
case T_OK_ACK:
break;
case T_ERROR_ACK:
if (msgsz < TERRORACKSZ) {
break;
}
else
break;
default:
break;
}
return (error);
}
/*
* Translate a TLI error into a system error as best we can.
*/
static const int tli_errs[] = {
0, /* no error */
EADDRNOTAVAIL, /* TBADADDR */
ENOPROTOOPT, /* TBADOPT */
EACCES, /* TACCES */
EBADF, /* TBADF */
EADDRNOTAVAIL, /* TNOADDR */
EPROTO, /* TOUTSTATE */
EPROTO, /* TBADSEQ */
0, /* TSYSERR - will never get */
EPROTO, /* TLOOK - should never be sent by transport */
EMSGSIZE, /* TBADDATA */
EMSGSIZE, /* TBUFOVFLW */
EPROTO, /* TFLOW */
EWOULDBLOCK, /* TNODATA */
EPROTO, /* TNODIS */
EPROTO, /* TNOUDERR */
EINVAL, /* TBADFLAG */
EPROTO, /* TNOREL */
EOPNOTSUPP, /* TNOTSUPPORT */
EPROTO, /* TSTATECHNG */
};
int
{
return (EPROTO);
else
}
/*
* Notify transport that we are having trouble with this connection.
*/
void
{
if (!mp)
return;
return;
}
ipid->ipid_ire_type = 0;
/* Ignore flow control, signals and errors */
}
#ifdef KTLIDEBUG
int ktlilog = 0;
/*
* Kernel level debugging aid. The global variable "ktlilog" is a bit
* mask which allows various types of debugging messages to be printed
* out.
*
* ktlilog & 1 will cause actual failures to be printed.
* ktlilog & 2 will cause informational messages to be
* printed.
*/
int
{
}
#endif