summaryrefslogtreecommitdiff
blob: 1ea5c779ff38042e9fd56c358fff3b17886f4d4f (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
diff --git a/ax25ipd/ax25ipd.c b/ax25ipd/ax25ipd.c
index 461147d..e85b44d 100644
--- a/ax25ipd/ax25ipd.c
+++ b/ax25ipd/ax25ipd.c
@@ -35,6 +35,25 @@ int opt_help = 0;
 char opt_configfile[PATH_MAX];
 char opt_ttydevice[PATH_MAX];
 
+struct stats_s stats;
+
+int udp_mode;
+int ip_mode;
+unsigned short my_udp;
+char ttydevice[PATH_MAX];
+int ttyspeed;
+signed char mycallsign[7];
+unsigned char mycallsign2[7];
+unsigned char myalias[7];
+unsigned char myalias2[7];
+char bc_text[128];
+int bc_interval;
+int bc_every;
+
+int digi;
+int loglevel;
+int dual_port;
+
 struct option options[] = {
 	{"version", 0, NULL, 'v'},
 	{"loglevel", 1, NULL, 'l'},
diff --git a/ax25ipd/ax25ipd.h b/ax25ipd/ax25ipd.h
index b088247..367024b 100644
--- a/ax25ipd/ax25ipd.h
+++ b/ax25ipd/ax25ipd.h
@@ -72,24 +72,25 @@
 #include	<sys/types.h>
 #include	<netax25/daemon.h>
 
-int udp_mode;                   /* true if we need a UDP socket */
-int ip_mode;                    /* true if we need the raw IP socket */
-unsigned short my_udp;          /* the UDP port to use (network byte order) */
-char ttydevice[PATH_MAX];       /* the tty device for serial comms */
-int ttyspeed;                   /* The baud rate on the tty device */
-unsigned char mycallsign[7];    /* My callsign, shifted ASCII with SSID */
-unsigned char mycallsign2[7];   /* My seconds port callsign, shifted ASCII with SSID */
-unsigned char myalias[7];       /* An alias to use */
-unsigned char myalias2[7];      /* An alias for second port */
-char bc_text[128];              /* The text for beacon messages */
-int bc_interval;                /* The interval, in seconds, between beacons */
-int bc_every;                   /* true=every, false=after */
-int digi;                       /* True if we are connected to a TNC */
-int loglevel;                   /* Verbosity level */
+extern int udp_mode;            /* true if we need a UDP socket */
+extern int ip_mode;             /* true if we need the raw IP socket */
+extern unsigned short my_udp;   /* the UDP port to use (network byte order) */
+extern char ttydevice[PATH_MAX]; /* the tty device for serial comms */
+extern int ttyspeed;            /* The baud rate on the tty device */
+extern signed char mycallsign[7];    /* My callsign, shifted ASCII with SSID */
+extern unsigned char mycallsign2[7]; /* My seconds port callsign, shifted ASCII with SSID */
+extern unsigned char myalias[7];  /* An alias to use */
+extern unsigned char myalias2[7]; /* An alias for second port */
+extern char bc_text[128];       /* The text for beacon messages */
+extern int bc_interval;         /* The interval, in seconds, between beacons */
+extern int bc_every;            /* true=every, false=after */
+
+extern int digi;                /* True if we are connected to a TNC */
+extern int loglevel;            /* Verbosity level */
 /* addition for dual port flag */
-int dual_port;
+extern int dual_port;
 
-struct {
+struct stats_s {
 	int kiss_in;            /* # packets received */
 	int kiss_toobig;        /* packet too large */
 	int kiss_badtype;       /* control byte non-zero */
@@ -107,7 +108,9 @@ struct {
 	int ip_tooshort;        /* packet too short to be a valid frame */
 	int ip_not_for_me;      /* packet not for me (in digi mode) */
 	int ip_i_am_dest;       /* I am destination (in digi mode) */
-} stats;
+};
+
+extern struct stats_s stats;
 
 #define MAX_FRAME 2048