dlprims.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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) 1996-1999 by Sun Microsystems, Inc.
* All rights reserved.
*
* heavily cannibalized from
*
* #ident "@(#)dlprims.c 1.12 97/03/27 SMI"
*/
#pragma ident "%W% %E% SMI"
/*
* TODO: get rid of this code as soon as possible and replace it with a
* version from a standard library. this stuff is barf-o-riffic.
*/
#include <errno.h>
#include <stropts.h>
#include "dlpi_io.h"
/*
* dlinforeq(): issue DL_INFO_REQ and fetch DL_INFO_ACK on stream
*
* input: int: the stream to do the DL_INFO_REQ on
* dl_info_ack_t: a place to store the DL_INFO_ACK
* size_t: the size of the dl_info_ack_t
* output: int: 0 on success, 1 on failure (errno is set)
*/
int
{
return (1);
return (1);
return (1);
}
return (0);
}
/*
* dlattachreq(): issue DL_ATTACH_REQ and fetch DL_OK_ACK on stream
*
* input: int: the stream to do the DL_ATTACH_REQ on
* t_uscalar_t: the ppa to do the attach to
* output: int: 0 on success, 1 on failure (errno is set)
*/
int
{
union DL_primitives *dlp;
return (1);
return (1);
return (1);
}
return (0);
}
/*
* dlbindreq(): issue DL_BIND_REQ and fetch DL_BIND_ACK on stream
*
* input: int: the stream to do the DL_BIND_REQ on
* t_uscalar_t: the sap to bind to
* t_uscalar_t: the max number of outstanding DL_CONNECT_IND messages
* uint16_t: the service mode (connectionless/connection-oriented)
* uint16_t: whether this is a connection management stream
* output: int: 0 on success, 1 on failure (errno is set)
*/
int
{
union DL_primitives *dlp;
return (1);
return (1);
return (1);
}
return (0);
}
/*
* strgetmsg(): timed getmsg(3C)
*
* input: int: the stream to wait for the message on
* struct strbuf *: a buffer to hold the control part of the message
* struct strbuf *: a buffer to hold the data part of the message
* output: int: 0 on success, 1 on failure (errno is set)
*/
static int
{
int flags = 0;
int retval;
case 0:
return (1);
case -1:
return (1);
default:
if (retval == -1)
return (1);
return (1);
}
break;
}
return (0);
}