summaryrefslogtreecommitdiffstats
path: root/ax25ipd/ax25ipd.h
Commit message (Collapse)AuthorAgeFilesLines
* ax25ipd: Cleanup header file inclusion.Ralf Baechle2017-07-261-29/+1
| | | | | | | | | | We were including way too many system header files, some even multiple times and it wasn't immediately visible. Clean this. This also drops the definitions of __USE_XOPEN which never had the desired effect with glibc. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototype for io_error().Ralf Baechle2017-07-251-1/+0
| | | | | | io_error() has no callers outside its defining file. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototype for term_handler().Ralf Baechle2017-07-251-3/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototypes for int_handler().Ralf Baechle2017-07-251-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototypes for usr1_handler().Ralf Baechle2017-07-251-1/+0
| | | | | | | make usr1_handler() static, remove its prototype from the header and reorder code to avoid prototypes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototypes for hupper().Ralf Baechle2017-07-251-1/+0
| | | | | | There were two - and they can be avoided entirely. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Remoe pointless prototype for main().Ralf Baechle2017-07-251-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Make function greet_world() static.Ralf Baechle2017-07-251-1/+0
| | | | | | | It's only being used from within ax25ipd.c. To avoid the need for a prototype within ax25ipd.c move the function above its first caller. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Make function do_stats() static.Ralf Baechle2017-07-251-1/+0
| | | | | | It's only being used from within ax25ipd.c. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Fix stats.Ralf Baechle2017-07-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stats structure was defined in the ax25ipd.h header as a static variable resulting in each compilation unit having its own stats variable. The sole reader, the do_stats() function would thus only see and print all-zero stats. This also fixes the following warnings: make[2]: Entering directory '/home/ralf/src/ax25/ax25-apps/ax25ipd' gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT crc.o -MD -MP -MF .deps/crc.Tpo -c -o crc.o crc.c In file included from crc.c:3:0: ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable] } stats; ^~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT routing.o -MD -MP -MF .deps/routing.Tpo -c -o routing.o routing.c In file included from routing.c:10:0: ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable] } stats; ^~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT syslog.o -MD -MP -MF .deps/syslog.Tpo -c -o syslog.o syslog.c In file included from syslog.c:4:0: ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable] } stats; ^~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -DUSE_TERMIO -g -O2 -Wall -MT bpqether.o -MD -MP -MF .deps/bpqether.Tpo -c -o bpqether.o bpqether.c In file included from bpqether.c:39:0: ax25ipd.h:108:3: warning: ‘stats’ defined but not used [-Wunused-variable] } stats; ^~~~~ [...] make[2]: Leaving directory '/home/ralf/src/ax25/ax25-apps/ax25ipd' Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Sort out variable and function declarations.Ralf Baechle2017-01-311-16/+17
| | | | | | | | | | - 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 <ralf@linux-mips.org>
* ax25ipd: Switch version number printed to ax25-apps version.Ralf Baechle2017-01-231-2/+0
| | | | | | | The version number has not been changed ever since ax25-apps 0.0.1 making the version useless for bug reporting. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Nuke trailing whitespace.Ralf Baechle2015-05-021-3/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Make LOGx() macros bulletproof.Ralf Baechle2013-06-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LOGL1..LOGL4 macros were defined like: Now consider an invocation like: if (condition) LOGL1(...); else something_different(); CPP will expand this like: if (condition) if (loglevel>0) syslog(LOG_DAEMON | LOG_WARNING, ...); else something_different(); That is the else would now be considered associated with the wrong if. Macro arguments may also not have been evaluated on every invocation making the use of these function-like looking macros not function like. For example: LOGL1("%d", i++); would be expanded to if (loglevel>0) syslog(LOG_DAEMON | LOG_WARNING, i++); That is depending on the value of loglevel i++ would only be incremented if syslog was actually being called. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Eleminate use of register keywordRalf Baechle2009-06-141-1/+1
| | | | | Any modern C compiler will just ignore register so it's just cluttering the screen.
* Added some includes. This fixes compilation problems in gentoo,Thomas Osterried2009-04-221-0/+1
| | | | and warnings.
* Better integration in unix98 PTY environments.Thomas Osterried2009-01-311-1/+1
| | | | | | Revised the getopt_long() part. Assured strcpy cases. Thanks to Christoph <dk2crn> for contribution.
* contact updateThomas Osterried2009-01-191-1/+1
|
* Support for unix98 ptys ("/dev/ptmx"). Thanks to dk2crn.Thomas Osterried2008-10-111-0/+1
|
* io.c: io_error(): patch from testing upstream version.Thomas Osterried2006-06-101-1/+1
| | | | fixes problem that it tends to terminate even if it need not to
* - tun/tap support for ax25ipdThomas Osterried2005-10-301-0/+9
| | | | | | | | | | | - fclose() fix in config.c description of tun/tap: added a new fast and efficient link to the linux kernel ax25 stack, via the ethertap interface. ax25 goes directly to the bpqether interface in the kernel via ethertap/tuntap interfaces, which is a much better way than traditional kissattach to a ttyp/ptyp pair.
* merged my changes with terry indent, daemon can now optionally not forkCraig Small2001-11-271-4/+4
|
* updated libtool, uniformly indented source, corrected small ax25mond ↵Terry Dawson VK2KTJ2001-09-121-0/+3
| | | | Makefile bug
* Import ax25-apps 0.0.1 from tarballax25-apps-0.0.1Ralf Baechle1999-06-071-0/+182