From 1de0ea4abd7153c6fcdbdbac6048a1e46f673fc2 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 31 Jan 2017 11:32:49 +0100 Subject: Sort out variable and function declarations. - Make static what can be made static. - Add declaration where they were missing. - Don't define variables in headers. - Move declaations to the proper locations. - Pick up declarations from the proper headers. Signed-off-by: Ralf Baechle --- ax25ipd/ax25ipd.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'ax25ipd/ax25ipd.c') diff --git a/ax25ipd/ax25ipd.c b/ax25ipd/ax25ipd.c index 65df46a..66bd47f 100644 --- a/ax25ipd/ax25ipd.c +++ b/ax25ipd/ax25ipd.c @@ -23,19 +23,36 @@ #include "../pathnames.h" #include "ax25ipd.h" -jmp_buf restart_env; +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 */ + +int dual_port; /* addition for dual port flag */ + +static jmp_buf restart_env; /* Prototypes */ void hupper(int); -int opt_version; -int opt_loglevel; -int opt_nofork; -int opt_help; -char opt_configfile[PATH_MAX]; -char opt_ttydevice[PATH_MAX]; +static int opt_version; +static int opt_loglevel; +static int opt_nofork; +static int opt_help; +static char opt_configfile[PATH_MAX]; +static char opt_ttydevice[PATH_MAX]; -struct option options[] = { +static struct option options[] = { {"version", 0, NULL, 'v'}, {"loglevel", 1, NULL, 'l'}, {"help", 0, NULL, 'h'}, -- cgit v1.2.3