command.c (102500) | command.c (102558) |
---|---|
1/*- 2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org> 3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp> 4 * Internet Initiative Japan, Inc (IIJ) 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org> 3 * based on work by Toshiharu OHNO <tony-o@iij.ad.jp> 4 * Internet Initiative Japan, Inc (IIJ) 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/usr.sbin/ppp/command.c 102500 2002-08-27 20:11:58Z brian $ | 28 * $FreeBSD: head/usr.sbin/ppp/command.c 102558 2002-08-29 02:44:58Z brian $ |
29 */ 30 31#include <sys/param.h> 32#include <netinet/in_systm.h> 33#include <netinet/in.h> 34#include <netinet/ip.h> 35#include <arpa/inet.h> 36#include <sys/socket.h> --- 99 unchanged lines hidden (view full) --- 136#define VAR_RADIUS 29 137#define VAR_CD 30 138#define VAR_PARITY 31 139#define VAR_CRTSCTS 32 140#define VAR_URGENTPORTS 33 141#define VAR_LOGOUT 34 142#define VAR_IFQUEUE 35 143#define VAR_MPPE 36 | 29 */ 30 31#include <sys/param.h> 32#include <netinet/in_systm.h> 33#include <netinet/in.h> 34#include <netinet/ip.h> 35#include <arpa/inet.h> 36#include <sys/socket.h> --- 99 unchanged lines hidden (view full) --- 136#define VAR_RADIUS 29 137#define VAR_CD 30 138#define VAR_PARITY 31 139#define VAR_CRTSCTS 32 140#define VAR_URGENTPORTS 33 141#define VAR_LOGOUT 34 142#define VAR_IFQUEUE 35 143#define VAR_MPPE 36 |
144#define VAR_IPV6CPRETRY 37 |
|
144 145/* ``accept|deny|disable|enable'' masks */ 146#define NEG_HISMASK (1) 147#define NEG_MYMASK (2) 148 149/* ``accept|deny|disable|enable'' values */ 150#define NEG_ACFCOMP 40 151#define NEG_CHAP05 41 --- 1889 unchanged lines hidden (view full) --- 2041 2042 case VAR_IPCPRETRY: 2043 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn, 2044 &arg->bundle->ncp.ipcp.cfg.fsm.timeout, 2045 &arg->bundle->ncp.ipcp.cfg.fsm.maxreq, 2046 &arg->bundle->ncp.ipcp.cfg.fsm.maxtrm, DEF_FSMTRIES); 2047 break; 2048 | 145 146/* ``accept|deny|disable|enable'' masks */ 147#define NEG_HISMASK (1) 148#define NEG_MYMASK (2) 149 150/* ``accept|deny|disable|enable'' values */ 151#define NEG_ACFCOMP 40 152#define NEG_CHAP05 41 --- 1889 unchanged lines hidden (view full) --- 2042 2043 case VAR_IPCPRETRY: 2044 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn, 2045 &arg->bundle->ncp.ipcp.cfg.fsm.timeout, 2046 &arg->bundle->ncp.ipcp.cfg.fsm.maxreq, 2047 &arg->bundle->ncp.ipcp.cfg.fsm.maxtrm, DEF_FSMTRIES); 2048 break; 2049 |
2050 case VAR_IPV6CPRETRY: 2051 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn, 2052 &arg->bundle->ncp.ipv6cp.cfg.fsm.timeout, 2053 &arg->bundle->ncp.ipv6cp.cfg.fsm.maxreq, 2054 &arg->bundle->ncp.ipv6cp.cfg.fsm.maxtrm, DEF_FSMTRIES); 2055 break; 2056 |
|
2049 case VAR_NBNS: 2050 case VAR_DNS: 2051 if (param == VAR_DNS) { 2052 ipaddr = arg->bundle->ncp.ipcp.cfg.ns.dns; 2053 ipaddr[0].s_addr = ipaddr[1].s_addr = INADDR_NONE; 2054 } else { 2055 ipaddr = arg->bundle->ncp.ipcp.cfg.ns.nbns; 2056 ipaddr[0].s_addr = ipaddr[1].s_addr = INADDR_ANY; --- 242 unchanged lines hidden (view full) --- 2299 {"hangup", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, 2300 "hangup script", "set hangup chat-script", (const void *) VAR_HANGUP}, 2301 {"ifaddr", NULL, SetInterfaceAddr, LOCAL_AUTH, "destination address", 2302 "set ifaddr [src-addr [dst-addr [netmask [trg-addr]]]]"}, 2303 {"ifqueue", NULL, SetVariable, LOCAL_AUTH, "interface queue", 2304 "set ifqueue packets", (const void *)VAR_IFQUEUE}, 2305 {"ipcpretry", "ipcpretries", SetVariable, LOCAL_AUTH, "IPCP retries", 2306 "set ipcpretry value [attempts]", (const void *)VAR_IPCPRETRY}, | 2057 case VAR_NBNS: 2058 case VAR_DNS: 2059 if (param == VAR_DNS) { 2060 ipaddr = arg->bundle->ncp.ipcp.cfg.ns.dns; 2061 ipaddr[0].s_addr = ipaddr[1].s_addr = INADDR_NONE; 2062 } else { 2063 ipaddr = arg->bundle->ncp.ipcp.cfg.ns.nbns; 2064 ipaddr[0].s_addr = ipaddr[1].s_addr = INADDR_ANY; --- 242 unchanged lines hidden (view full) --- 2307 {"hangup", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, 2308 "hangup script", "set hangup chat-script", (const void *) VAR_HANGUP}, 2309 {"ifaddr", NULL, SetInterfaceAddr, LOCAL_AUTH, "destination address", 2310 "set ifaddr [src-addr [dst-addr [netmask [trg-addr]]]]"}, 2311 {"ifqueue", NULL, SetVariable, LOCAL_AUTH, "interface queue", 2312 "set ifqueue packets", (const void *)VAR_IFQUEUE}, 2313 {"ipcpretry", "ipcpretries", SetVariable, LOCAL_AUTH, "IPCP retries", 2314 "set ipcpretry value [attempts]", (const void *)VAR_IPCPRETRY}, |
2315 {"ipv6cpretry", "ipv6cpretries", SetVariable, LOCAL_AUTH, "IPV6CP retries", 2316 "set ipv6cpretry value [attempts]", (const void *)VAR_IPV6CPRETRY}, |
|
2307 {"lcpretry", "lcpretries", SetVariable, LOCAL_AUTH | LOCAL_CX, "LCP retries", 2308 "set lcpretry value [attempts]", (const void *)VAR_LCPRETRY}, 2309 {"log", NULL, log_SetLevel, LOCAL_AUTH, "log level", 2310 "set log [local] [+|-]all|async|cbcp|ccp|chat|command|connect|debug|dns|hdlc|" 2311 "id0|ipcp|lcp|lqm|phase|physical|sync|tcp/ip|timer|tun..."}, 2312 {"login", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, 2313 "login script", "set login chat-script", (const void *) VAR_LOGIN}, 2314 {"logout", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, --- 847 unchanged lines hidden --- | 2317 {"lcpretry", "lcpretries", SetVariable, LOCAL_AUTH | LOCAL_CX, "LCP retries", 2318 "set lcpretry value [attempts]", (const void *)VAR_LCPRETRY}, 2319 {"log", NULL, log_SetLevel, LOCAL_AUTH, "log level", 2320 "set log [local] [+|-]all|async|cbcp|ccp|chat|command|connect|debug|dns|hdlc|" 2321 "id0|ipcp|lcp|lqm|phase|physical|sync|tcp/ip|timer|tun..."}, 2322 {"login", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, 2323 "login script", "set login chat-script", (const void *) VAR_LOGIN}, 2324 {"logout", NULL, SetVariable, LOCAL_AUTH | LOCAL_CX, --- 847 unchanged lines hidden --- |