t_look.c revision 61961e0f20c7637a3846bb39786bb9dffa91dfb9
470N/A * The contents of this file are subject to the terms of the 253N/A * Common Development and Distribution License, Version 1.0 only 253N/A * (the "License"). You may not use this file except in compliance 292N/A * See the License for the specific language governing permissions 292N/A * and limitations under the License. 253N/A * When distributing Covered Code, include this CDDL HEADER in each 292N/A * If applicable, add the following below this CDDL HEADER, with the 292N/A * fields enclosed by brackets "[]" replaced with your own identifying 292N/A * information: Portions Copyright [yyyy] [name of copyright owner] 292N/A/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 292N/A/* All Rights Reserved */ 253N/A * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 253N/A * Use is subject to license terms. 253N/A#
pragma ident "%Z%%M% %I% %E% SMI" 470N/A * _t_look_locked() assumes tiptr->ti_lock lock is already held and signals 253N/A * already blocked in MT case. 253N/A * Intended for use by other TLI routines only. 470N/A * XTI requires the strange T_GODATA and T_GOEXDATA 253N/A * events which are almost brain-damaged but thankfully 253N/A * not tested. Anyone feeling the need for those should 253N/A * consider the need for using non-blocking endpoint. 253N/A * Probably introduced at the behest of some weird-os 253N/A * vendor which did not understand the non-blocking endpoint 253N/A * We choose not to implment these mis-features. 253N/A * Here is the plan-of-action (POA)if we are ever forced 253N/A * - When returning TFLOW set state to indicate if it was 253N/A * a normal or expedited data send attempt. 253N/A * - In routines that set TFLOW, clear the above set state 253N/A * - In this routine, if that state flag is set, 253N/A * do a I_CANPUT on appropriate band to to see if it 253N/A * is writeable. If that indicates that the band is 253N/A * writeable, return T_GODATA or T_GOEXDATA event. 253N/A * Actions are also influenced by whether T_EXDATA_REQ stays 253N/A * band 1 or goes to band 0 if EXPINLINE is set 253N/A * We will also need to sort out if "write side" events 253N/A * all other events (all read side) or not. 253N/A * This return of T_ERROR event is ancient 253N/A * SVR3 TLI semantics and not documented for 253N/A * current SVR4 TLI interface. 253N/A * Fixing this will impact some apps 253N/A * (e.g. nfsd,lockd) in ON consolidation 253N/A * so they need to be fixed first before TLI 253N/A * XXX Should we never fix this because it might 253N/A * break apps in field ? 253N/A * XTI semantics (also identical to documented, 253N/A * but not implemented TLI semantics). 253N/A * if something there and cntl part also there 253N/A /* LINTED pointer cast */ 253N/A /* LINTED pointer cast */ 253N/A * If message on stream head is a T_DISCON_IND, that 253N/A * has priority over a T_ORDREL_IND in the look 253N/A * (This assumes that T_ORDREL_IND can only be in the 253N/A * first look buffer in the list) 253N/A * Blow away T_ORDREL_IND * if something there put no control part * it must be data on the stream head. * if msg there and control * part not large enough to determine type? * it must be illegal TLI message