/*
* 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 */
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "mt.h"
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stropts.h>
#include <xti.h>
#include <signal.h>
#include <assert.h>
#include "tx.h"
/*
* Snd_conn_req - send connect request message to transport provider.
* All signals for the caller are blocked during the call to simplify design.
* (This is OK for a bounded amount of time this routine is expected to
* execute). Also, assumes tiptr->ti_lock is held.
*/
int
{
int size;
int fd;
return (-1);
}
return (-1);
/* LINTED pointer cast */
creq->DEST_offset = 0;
creq->OPT_offset = 0;
/*
* Aligned copy will overflow buffer allocated based
* based on transport maximum address size.
* return error.
*/
return (-1);
}
}
/*
* Aligned copy will overflow buffer allocated based
* on maximum option size in transport.
* return error.
*/
return (-1);
}
}
/*
* user data not valid with connect or it
* exceeds the limits specified by the transport
* provider.
*/
return (-1);
}
}
/*
* Assumes signals are blocked so putmsg() will not block
* indefinitely
*/
return (-1);
}
return (-1);
return (0);
}
/*
* Rcv_conn_con - get connection confirmation off
* of read queue
* Note:
* - called holding the tiptr->ti_lock
*/
int
int api_semantics)
{
int didralloc;
int flg = 0;
return (-1);
}
/*
* see if there is something in look buffer
*/
if (tiptr->ti_lookcnt > 0) {
return (-1);
}
/*
*/
return (-1);
/*
* This is a call that may block indefinitely so we drop the
* lock and allow signals in MT case here and reacquire it.
* Error case should roll back state changes done above
* (happens to be no state change here)
*/
else
goto err_out;
}
/*
* did we get entire message
*/
if (retval > 0) {
goto err_out;
}
/*
* is cntl part large enough to determine message type?
*/
goto err_out;
}
/* LINTED pointer cast */
case T_CONN_CON:
goto err_out;
}
/*
* Note: Buffer overflow is an error in XTI
* only if netbuf.maxlen > 0
*/
goto err_out;
}
}
goto err_out;
}
}
if (_T_IS_TLI(api_semantics) ||
goto err_out;
}
}
/*
* since a confirmation seq number
* is -1 by default
*/
}
if (didralloc)
else
return (0);
case T_DISCON_IND:
/*
* if disconnect indication then append it to
* the "look bufffer" list.
* This may result in MT case for the process
* signal mask to be temporarily masked to
* ensure safe memory allocation.
*/
goto err_out;
}
goto err_out;
default:
break;
}
if (didralloc)
else
return (-1);
}