Deleted Added
full compact
main.c (39395) main.c (40561)
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 *
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.142 1998/08/09 09:13:54 brian Exp $
20 * $Id: main.c,v 1.143 1998/09/17 00:45:27 brian Exp $
21 *
22 * TODO:
23 */
24
25#include <sys/types.h>
26#include <netinet/in.h>
27#include <netinet/in_systm.h>
28#include <netinet/ip.h>

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

70#include "sig.h"
71#include "main.h"
72#include "server.h"
73#include "prompt.h"
74#include "chat.h"
75#include "chap.h"
76#include "cbcp.h"
77#include "datalink.h"
21 *
22 * TODO:
23 */
24
25#include <sys/types.h>
26#include <netinet/in.h>
27#include <netinet/in_systm.h>
28#include <netinet/ip.h>

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

70#include "sig.h"
71#include "main.h"
72#include "server.h"
73#include "prompt.h"
74#include "chat.h"
75#include "chap.h"
76#include "cbcp.h"
77#include "datalink.h"
78#include "iface.h"
78
79#ifndef O_NONBLOCK
80#ifdef O_NDELAY
81#define O_NONBLOCK O_NDELAY
82#endif
83#endif
84
85static void DoLoop(struct bundle *);

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

324 }
325
326 if ((bundle = bundle_Create(TUN_PREFIX, mode, (const char **)argv)) == NULL) {
327 log_Printf(LogWARN, "bundle_Create: %s\n", strerror(errno));
328 return EX_START;
329 }
330 if (prompt) {
331 prompt->bundle = bundle; /* couldn't do it earlier */
79
80#ifndef O_NONBLOCK
81#ifdef O_NDELAY
82#define O_NONBLOCK O_NDELAY
83#endif
84#endif
85
86static void DoLoop(struct bundle *);

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

325 }
326
327 if ((bundle = bundle_Create(TUN_PREFIX, mode, (const char **)argv)) == NULL) {
328 log_Printf(LogWARN, "bundle_Create: %s\n", strerror(errno));
329 return EX_START;
330 }
331 if (prompt) {
332 prompt->bundle = bundle; /* couldn't do it earlier */
332 prompt_Printf(prompt, "Using interface: %s\n", bundle->ifp.Name);
333 prompt_Printf(prompt, "Using interface: %s\n", bundle->iface->name);
333 }
334 SignalBundle = bundle;
335 bundle->AliasEnabled = alias;
334 }
335 SignalBundle = bundle;
336 bundle->AliasEnabled = alias;
337 if (alias)
338 bundle->cfg.opt |= OPT_IFACEALIAS;
336
337 if (system_Select(bundle, "default", CONFFILE, prompt, NULL) < 0)
338 prompt_Printf(prompt, "Warning: No default entry found in config file.\n");
339
340 sig_signal(SIGHUP, CloseSession);
341 sig_signal(SIGTERM, CloseSession);
342 sig_signal(SIGINT, CloseConnection);
343 sig_signal(SIGQUIT, CloseSession);

--- 216 unchanged lines hidden ---
339
340 if (system_Select(bundle, "default", CONFFILE, prompt, NULL) < 0)
341 prompt_Printf(prompt, "Warning: No default entry found in config file.\n");
342
343 sig_signal(SIGHUP, CloseSession);
344 sig_signal(SIGTERM, CloseSession);
345 sig_signal(SIGINT, CloseConnection);
346 sig_signal(SIGQUIT, CloseSession);

--- 216 unchanged lines hidden ---