157416Smarkm/*-
257416Smarkm * Copyright (c) 1991, 1993
357416Smarkm *	The Regents of the University of California.  All rights reserved.
457416Smarkm *
557416Smarkm * Redistribution and use in source and binary forms, with or without
657416Smarkm * modification, are permitted provided that the following conditions
757416Smarkm * are met:
857416Smarkm * 1. Redistributions of source code must retain the above copyright
957416Smarkm *    notice, this list of conditions and the following disclaimer.
1057416Smarkm * 2. Redistributions in binary form must reproduce the above copyright
1157416Smarkm *    notice, this list of conditions and the following disclaimer in the
1257416Smarkm *    documentation and/or other materials provided with the distribution.
1357416Smarkm * 3. All advertising materials mentioning features or use of this software
1457416Smarkm *    must display the following acknowledgement:
1557416Smarkm *	This product includes software developed by the University of
1657416Smarkm *	California, Berkeley and its contributors.
1757416Smarkm * 4. Neither the name of the University nor the names of its contributors
1857416Smarkm *    may be used to endorse or promote products derived from this software
1957416Smarkm *    without specific prior written permission.
2057416Smarkm *
2157416Smarkm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2257416Smarkm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2357416Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2457416Smarkm * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2557416Smarkm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2657416Smarkm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2757416Smarkm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2857416Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2957416Smarkm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3057416Smarkm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3157416Smarkm * SUCH DAMAGE.
3257416Smarkm */
3357416Smarkm
3457416Smarkm#include "telnetd.h"
3557416Smarkm
36233294SstasRCSID("$Id$");
3757416Smarkm
3857416Smarkm#ifdef AUTHENTICATION
3957416Smarkm
4057416Smarkmint
4157416Smarkmtelnet_net_write(unsigned char *str, int len)
4257416Smarkm{
4357416Smarkm    if (nfrontp + len < netobuf + BUFSIZ) {
4457416Smarkm	memmove(nfrontp, str, len);
4557416Smarkm	nfrontp += len;
4657416Smarkm	return(len);
4757416Smarkm    }
4857416Smarkm    return(0);
4957416Smarkm}
5057416Smarkm
5157416Smarkmvoid
5257416Smarkmnet_encrypt(void)
5357416Smarkm{
5457416Smarkm#ifdef ENCRYPTION
5557416Smarkm    char *s = (nclearto > nbackp) ? nclearto : nbackp;
5657416Smarkm    if (s < nfrontp && encrypt_output) {
5757416Smarkm	(*encrypt_output)((unsigned char *)s, nfrontp - s);
5857416Smarkm    }
5957416Smarkm    nclearto = nfrontp;
6057416Smarkm#endif
6157416Smarkm}
6257416Smarkm
6357416Smarkmint
6457416Smarkmtelnet_spin(void)
6557416Smarkm{
6657416Smarkm    return ttloop();
6757416Smarkm}
6857416Smarkm
6957416Smarkmchar *
7072445Sassartelnet_getenv(const char *val)
7157416Smarkm{
7257416Smarkm    return(getenv(val));
7357416Smarkm}
7457416Smarkm
7557416Smarkmchar *
7657416Smarkmtelnet_gets(char *prompt, char *result, int length, int echo)
7757416Smarkm{
7857416Smarkm    return NULL;
7957416Smarkm}
8057416Smarkm#endif
81