Deleted Added
full compact
main.c (36465) main.c (36467)
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.127 1998/05/28 23:17:48 brian Exp $
20 * $Id: main.c,v 1.128 1998/05/29 18:32:11 brian Exp $
21 *
22 * TODO:
23 */
24
25#include <sys/types.h>
26#include <sys/socket.h>
27#include <netinet/in.h>
28#include <netinet/in_systm.h>

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

255 * `fd_set's get too big when select()ing !
256 */
257 while (--nfds > 2)
258 close(nfds);
259
260 name = strrchr(argv[0], '/');
261 log_Open(name ? name + 1 : argv[0]);
262
21 *
22 * TODO:
23 */
24
25#include <sys/types.h>
26#include <sys/socket.h>
27#include <netinet/in.h>
28#include <netinet/in_systm.h>

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

255 * `fd_set's get too big when select()ing !
256 */
257 while (--nfds > 2)
258 close(nfds);
259
260 name = strrchr(argv[0], '/');
261 log_Open(name ? name + 1 : argv[0]);
262
263 argc--;
264 argv++;
265 label = ProcessArgs(argc, argv, &mode);
263 label = ProcessArgs(argc - 1, argv + 1, &mode);
266
267#ifdef __FreeBSD__
268 /*
269 * A FreeBSD hack to dodge a bug in the tty driver that drops output
270 * occasionally.... I must find the real reason some time. To display
271 * the dodgy behaviour, comment out this bit, make yourself a large
272 * routing table and then run ppp in interactive mode. The `show route'
273 * command will drop chunks of data !!!

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

311 const char *l;
312 l = label ? label : "default";
313 log_Printf(LogWARN, "Label %s rejected -direct connection\n", l);
314 }
315 log_Close();
316 return 1;
317 }
318
264
265#ifdef __FreeBSD__
266 /*
267 * A FreeBSD hack to dodge a bug in the tty driver that drops output
268 * occasionally.... I must find the real reason some time. To display
269 * the dodgy behaviour, comment out this bit, make yourself a large
270 * routing table and then run ppp in interactive mode. The `show route'
271 * command will drop chunks of data !!!

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

309 const char *l;
310 l = label ? label : "default";
311 log_Printf(LogWARN, "Label %s rejected -direct connection\n", l);
312 }
313 log_Close();
314 return 1;
315 }
316
319 if ((bundle = bundle_Create(TUN_PREFIX, mode)) == NULL) {
317 if ((bundle = bundle_Create(TUN_PREFIX, mode, (const char **)argv)) == NULL) {
320 log_Printf(LogWARN, "bundle_Create: %s\n", strerror(errno));
321 return EX_START;
322 }
323 if (prompt) {
324 prompt->bundle = bundle; /* couldn't do it earlier */
325 prompt_Printf(prompt, "Using interface: %s\n", bundle->ifp.Name);
326 }
327 SignalBundle = bundle;

--- 201 unchanged lines hidden ---
318 log_Printf(LogWARN, "bundle_Create: %s\n", strerror(errno));
319 return EX_START;
320 }
321 if (prompt) {
322 prompt->bundle = bundle; /* couldn't do it earlier */
323 prompt_Printf(prompt, "Using interface: %s\n", bundle->ifp.Name);
324 }
325 SignalBundle = bundle;

--- 201 unchanged lines hidden ---