mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
12ef29a81a
o Add "allow" command: "allow users a b c" gives access to users a, b and c. "allow modes auto" gives those users access to auto mode only. "allow users *" and "allow modes *" are accepted. No users and all modes are allowed by default. UID 0 can do anything. o Set the current label with the "load" and "dial" commands so that the call to ppp.linkdown makes sense. o Up the verison number. o Don't OR MODE_AUTO for -background and -ddial. o Don't OR MODE_INTER when we get a diagnostic connection. o Allow up to 40 args per line (was 20). o "set ifaddr" only changes the interface in AUTO mode (with other modes, it happens after IPCP negotiation). o Sort command descriptions in the man page. o Support -dedicated mode where we just talk ppp forever (no login etc).
44 lines
573 B
C
44 lines
573 B
C
/*
|
|
* $Id: defs.c,v 1.1 1997/10/26 01:02:30 brian Exp $
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "defs.h"
|
|
|
|
int mode = MODE_INTER;
|
|
int BGFiledes[2] = { -1, -1 };
|
|
int modem = -1;
|
|
int tun_in = -1;
|
|
int tun_out = -1;
|
|
int netfd = -1;
|
|
|
|
static char dstsystem[50];
|
|
|
|
void
|
|
SetLabel(const char *label)
|
|
{
|
|
if (label)
|
|
strncpy(dstsystem, label, sizeof dstsystem);
|
|
else
|
|
*dstsystem = '\0';
|
|
}
|
|
|
|
const char *
|
|
GetLabel()
|
|
{
|
|
return *dstsystem ? dstsystem : NULL;
|
|
}
|
|
|
|
void
|
|
randinit()
|
|
{
|
|
static int initdone;
|
|
|
|
if (!initdone) {
|
|
initdone = 1;
|
|
srandomdev();
|
|
}
|
|
}
|