/*
* 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 (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include "mt.h"
#include <stdlib.h>
#include <unistd.h>
#include <stropts.h>
#include <xti.h>
#include <stdio.h>
#include <errno.h>
#include <ucred.h>
#include <signal.h>
#include "tx.h"
/*
* Function protoypes
*/
void *
{
union structptrs {
char *caddr;
} p;
unsigned int dsize;
return (NULL);
/*
* Get size info for T_ADDR, T_OPT, and T_UDATA fields
*/
do {
if (retval < 0) {
return (NULL);
}
return (NULL);
}
/*
* Malloc appropriate structure and the specified
* fields within each structure. Initialize the
* 'buf' and 'maxlen' fields of each.
*/
switch (struct_type) {
case T_BIND:
goto errout;
goto errout;
}
return (p.bind);
case T_CALL:
goto errout;
goto errout;
}
/* compensate for XTI level options */
else
goto errout;
}
(int)info.DDATA_size);
goto errout;
}
return (p.call);
case T_OPTMGMT:
goto errout;
/* compensate for XTI level options */
else
goto errout;
}
return (p.opt);
case T_DIS:
goto errout;
goto errout;
}
return (p.dis);
case T_UNITDATA:
goto errout;
goto errout;
}
/* compensate for XTI level options */
else
goto errout;
}
goto errout;
}
return (p.udata);
case T_UDERROR:
goto errout;
goto errout;
}
/* compensate for XTI level options */
else
goto errout;
}
return (p.uderr);
case T_INFO:
goto errout;
return (p.info);
default:
if (_T_IS_XTI(api_semantics)) {
} else { /* TX_TLI_API */
}
return (NULL);
}
/*
* Clean up. Set t_errno to TSYSERR.
* If it is because memory could not be allocated
* then errno already should have been set to
* ENOMEM
*/
if (p.caddr)
return (NULL);
}
static int
{
switch (n) {
case T_INFINITE /* -1 */:
if (_T_IS_XTI(api_semantics)) {
/*
* Do not return error
* if T_ALL is used.
*/
return (-1);
}
} else if (option) { /* TX_TLI_API */
/*
* retain TLI behavior; ucred_t can vary in size,
* we need to make sure that we can receive one.
*/
if (infalloc == 0) {
infalloc = 1024;
else
}
return (-1);
} else
} else { /* TX_TLI_API */
/*
* retain TLI behavior
*/
return (-1);
} else
}
break;
case 0:
break;
case T_INVALID /* -2 */:
if (_T_IS_XTI(api_semantics)) {
/*
* Do not return error
* if T_ALL is used.
*/
return (-1);
}
} else { /* TX_TLI_API */
/*
* retain TLI behavior
*/
}
break;
default:
return (-1);
} else
break;
}
return (0);
}