/*
* 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 "uucp.h"
#ifdef D_PROTOCOL
#include <dk.h>
extern int drdblk();
/*
* Datakit protocol
*/
/* ARGSUSED */
static void
int sig;
{
}
static void (*dsig)();
#ifndef V8
#endif
/*
* turn on protocol
*/
int
dturnon()
{
#ifdef V8
extern int dkp_ld;
#endif
#ifdef V8
{
return(-1);
}
#else
int ret;
return(-1);
}
#endif /* V8 */
return(0);
}
int
dturnoff()
{
return(0);
}
/*
* write message across Datakit link
* type -> message type
* str -> message body (ascii string)
* fn -> Datakit file descriptor
* return
* SUCCESS -> message sent
* FAIL -> write failed
*/
int
register char *str;
int fn;
char type;
{
register char *s;
s = &bufr[1];
while (*str)
*s++ = *str++;
*s = '\0';
if (*(--s) == '\n')
*s = '\0';
}
/*
* read message from Datakit link
* str -> message buffer
* fn -> Datakit file descriptor
* return
* FAIL -> send timed out
* SUCCESS -> ok message in str
*/
int
register char *str;
{
register int len;
return(FAIL);
(void) alarm(60);
for (;;) {
(void) alarm(0);
return(FAIL);
}
break;
}
(void) alarm(0);
return(SUCCESS);
}
/*
* read data from file fp1 and write
* on Datakit link
* fp1 -> file descriptor
* fn -> Datakit descriptor
* returns:
* FAIL ->failure in Datakit link
* SUCCESS -> ok
*/
int
{
register int fd1;
unsigned long bytes;
bytes = 0L;
return(FAIL);
}
break;
}
#ifndef V8
#endif
return(SUCCESS);
}
/*
* read data from Datakit link and
* write into file
* fp2 -> file descriptor
* fn -> Datakit descriptor
* returns:
* SUCCESS -> ok
* FAIL -> failure on Datakit link
*/
int
{
register int fd2;
register int len;
unsigned long bytes;
bytes = 0L;
for (;;) {
if (len < 0) {
return(FAIL);
}
break;
}
return(ret);
}
/*
* read block from Datakit link
* reads are timed
* blk -> address of buffer
* len -> size to read
* fn -> Datakit descriptor
* returns:
* FAIL -> link error timeout on link
* i -> # of bytes read
*/
int
register char *blk;
{
register int i, ret;
return(FAIL);
(void) alarm(60);
(void) alarm(0);
return(FAIL);
}
if (ret == 0) { /* zero length block contains only EOF signal */
i = FAIL;
break;
}
}
(void) alarm(0);
return(i);
}
#endif /* D_PROTOCOL */