1/* 2 * User Process PPP 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan, Inc. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * |
20 * $Id: main.c,v 1.89 1997/11/09 06:22:43 brian Exp $ |
21 * 22 * TODO: 23 * o Add commands for traffic summary, version display, etc. 24 * o Add signal handler for misc controls. 25 */ 26#include <sys/param.h> 27#include <sys/socket.h> 28#include <netinet/in.h> --- 506 unchanged lines hidden (view full) --- 535 536static void 537ReadTty() 538{ 539 int n; 540 char ch; 541 static int ttystate; 542 FILE *oVarTerm; |
543 char linebuff[LINE_LEN]; |
544 |
545 LogPrintf(LogDEBUG, "termode = %d, netfd = %d, mode = %d\n", 546 TermMode, netfd, mode); 547 if (!TermMode) { 548 n = read(netfd, linebuff, sizeof(linebuff) - 1); 549 if (n > 0) { 550 aft_cmd = 1; 551 if (linebuff[n-1] == '\n') 552 linebuff[--n] = '\0'; --- 477 unchanged lines hidden --- |