blob: 3b4142fe6ac3c048ce947cf8efbed5a07434997a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* $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();
}
}
|