command.c (36285) | command.c (36465) |
---|---|
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.131.2.88 1998/05/21 01:13:26 brian Exp $ | 20 * $Id: command.c,v 1.135 1998/05/21 21:44:44 brian Exp $ |
21 * 22 */ 23#include <sys/types.h> 24#include <netinet/in_systm.h> 25#include <netinet/in.h> 26#include <netinet/ip.h> 27#include <arpa/inet.h> 28#include <sys/socket.h> --- 90 unchanged lines hidden (view full) --- 119#define NEG_PPPDDEFLATE 45 120#define NEG_PRED1 46 121#define NEG_PROTOCOMP 47 122#define NEG_SHORTSEQ 48 123#define NEG_VJCOMP 49 124#define NEG_DNS 50 125 126const char Version[] = "2.0-beta"; | 21 * 22 */ 23#include <sys/types.h> 24#include <netinet/in_systm.h> 25#include <netinet/in.h> 26#include <netinet/ip.h> 27#include <arpa/inet.h> 28#include <sys/socket.h> --- 90 unchanged lines hidden (view full) --- 119#define NEG_PPPDDEFLATE 45 120#define NEG_PRED1 46 121#define NEG_PROTOCOMP 47 122#define NEG_SHORTSEQ 48 123#define NEG_VJCOMP 49 124#define NEG_DNS 50 125 126const char Version[] = "2.0-beta"; |
127const char VersionDate[] = "$Date: 1998/05/21 01:13:26 $"; | 127const char VersionDate[] = "$Date: 1998/05/21 21:44:44 $"; |
128 129static int ShowCommand(struct cmdargs const *); 130static int TerminalCommand(struct cmdargs const *); 131static int QuitCommand(struct cmdargs const *); 132static int OpenCommand(struct cmdargs const *); 133static int CloseCommand(struct cmdargs const *); 134static int DownCommand(struct cmdargs const *); 135static int AllowCommand(struct cmdargs const *); --- 155 unchanged lines hidden (view full) --- 291 return 1; 292} 293 294static int 295DialCommand(struct cmdargs const *arg) 296{ 297 int res; 298 | 128 129static int ShowCommand(struct cmdargs const *); 130static int TerminalCommand(struct cmdargs const *); 131static int QuitCommand(struct cmdargs const *); 132static int OpenCommand(struct cmdargs const *); 133static int CloseCommand(struct cmdargs const *); 134static int DownCommand(struct cmdargs const *); 135static int AllowCommand(struct cmdargs const *); --- 155 unchanged lines hidden (view full) --- 291 return 1; 292} 293 294static int 295DialCommand(struct cmdargs const *arg) 296{ 297 int res; 298 |
299 if ((arg->cx && !(arg->cx->physical->type & (PHYS_MANUAL|PHYS_DEMAND))) 300 || (!arg->cx && (arg->bundle->phys_type & ~(PHYS_MANUAL|PHYS_DEMAND)))) { | 299 if ((arg->cx && !(arg->cx->physical->type & (PHYS_INTERACTIVE|PHYS_AUTO))) 300 || (!arg->cx && 301 (arg->bundle->phys_type & ~(PHYS_INTERACTIVE|PHYS_AUTO)))) { |
301 log_Printf(LogWARN, "Manual dial is only available for auto and" 302 " interactive links\n"); 303 return 1; 304 } 305 306 if (arg->argc > arg->argn && (res = LoadCommand(arg)) != 0) 307 return res; 308 --- 826 unchanged lines hidden (view full) --- 1135 ipcp->my_ip.s_addr = ipcp->cfg.my_range.ipaddr.s_addr; 1136 1137 if (ipcp->cfg.peer_range.ipaddr.s_addr == INADDR_ANY) { 1138 ipcp->cfg.peer_range.mask.s_addr = INADDR_ANY; 1139 ipcp->cfg.peer_range.width = 0; 1140 } 1141 1142 if (hisaddr && !ipcp_UseHisaddr(arg->bundle, hisaddr, | 302 log_Printf(LogWARN, "Manual dial is only available for auto and" 303 " interactive links\n"); 304 return 1; 305 } 306 307 if (arg->argc > arg->argn && (res = LoadCommand(arg)) != 0) 308 return res; 309 --- 826 unchanged lines hidden (view full) --- 1136 ipcp->my_ip.s_addr = ipcp->cfg.my_range.ipaddr.s_addr; 1137 1138 if (ipcp->cfg.peer_range.ipaddr.s_addr == INADDR_ANY) { 1139 ipcp->cfg.peer_range.mask.s_addr = INADDR_ANY; 1140 ipcp->cfg.peer_range.width = 0; 1141 } 1142 1143 if (hisaddr && !ipcp_UseHisaddr(arg->bundle, hisaddr, |
1143 arg->bundle->phys_type & PHYS_DEMAND)) | 1144 arg->bundle->phys_type & PHYS_AUTO)) |
1144 return 4; 1145 1146 return 0; 1147} 1148 1149static int 1150SetVariable(struct cmdargs const *arg) 1151{ --- 879 unchanged lines hidden --- | 1145 return 4; 1146 1147 return 0; 1148} 1149 1150static int 1151SetVariable(struct cmdargs const *arg) 1152{ --- 879 unchanged lines hidden --- |