Deleted Added
full compact
command.c (27089) command.c (27346)
1/*
2 * PPP User command processing module
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 *
1/*
2 * PPP User command processing module
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: command.c,v 1.64 1997/06/28 01:34:02 brian Exp $
20 * $Id: command.c,v 1.65 1997/06/30 03:03:29 brian Exp $
21 *
22 */
23#include <sys/types.h>
24#include <sys/stat.h>
25#include <ctype.h>
26#include <termios.h>
27#include <sys/wait.h>
28#include <time.h>

--- 828 unchanged lines hidden (view full) ---

857 mode_t mask;
858 umask(mask = umask(0));
859 if (argc == 2) {
860 unsigned m;
861 if (sscanf(argv[1], "%o", &m) == 1)
862 mask = m;
863 }
864 res = ServerLocalOpen(argv[0], mask);
21 *
22 */
23#include <sys/types.h>
24#include <sys/stat.h>
25#include <ctype.h>
26#include <termios.h>
27#include <sys/wait.h>
28#include <time.h>

--- 828 unchanged lines hidden (view full) ---

857 mode_t mask;
858 umask(mask = umask(0));
859 if (argc == 2) {
860 unsigned m;
861 if (sscanf(argv[1], "%o", &m) == 1)
862 mask = m;
863 }
864 res = ServerLocalOpen(argv[0], mask);
865 } else if (strspn(argv[0], "0123456789") == strlen(argv[0]))
866 res = ServerTcpOpen(atoi(argv[0]));
865 } else {
866 int port;
867 if (strspn(argv[0], "0123456789") != strlen(argv[0])) {
868 struct servent *s;
869 if ((s = getservbyname(argv[0], "tcp")) == NULL) {
870 port = 0;
871 LogPrintf(LogWARN, "%s: Invalid port or service\n", argv[0]);
872 } else
873 port = ntohs(s->s_port);
874 } else
875 port = atoi(argv[0]);
876 if (port)
877 res = ServerTcpOpen(port);
878 }
867
868 return res;
869}
870
871static int
872SetModemParity(list, argc, argv)
873struct cmdtab *list;
874int argc;

--- 599 unchanged lines hidden ---
879
880 return res;
881}
882
883static int
884SetModemParity(list, argc, argv)
885struct cmdtab *list;
886int argc;

--- 599 unchanged lines hidden ---