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.h | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'ax25ipd/ax25ipd.h') diff --git a/ax25ipd/ax25ipd.h b/ax25ipd/ax25ipd.h index 841df0a..37e3a7a 100644 --- a/ax25ipd/ax25ipd.h +++ b/ax25ipd/ax25ipd.h @@ -70,24 +70,24 @@ #include #include -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 unsigned 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 { +static struct { int kiss_in; /* # packets received */ int kiss_toobig; /* packet too large */ int kiss_badtype; /* control byte non-zero */ @@ -184,6 +184,7 @@ void term_handler(int); /* io.c */ extern int ttyfd_bpq; +extern int ttyfd; /* bpqether.c */ int send_bpq(unsigned char *buf, int len); -- cgit v1.2.3