summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ax25ipd: Fix glibc feature selection macros.Ralf Baechle2017-07-261-0/+2
| | | | | | | | | | | | | | | | | | | | This fixes the following warnings: gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25"\" -g -O2 -Wall -MT io.o -MD -MP -MF .deps/io.Tpo -c -o io.o io.c io.c: In function ‘io_open’: io.c:324:18: warning: implicit declaration of function ‘ptsname’; did you mean ‘ttyname’? [-Wimplicit-function-declaration] if ((namepts = ptsname(ttyfd)) == NULL) { ^~~~~~~ ttyname io.c:324:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((namepts = ptsname(ttyfd)) == NULL) { ^ io.c:329:7: warning: implicit declaration of function ‘unlockpt’; did you mean ‘unlinkat’? [-Wimplicit-function-declaration] if (unlockpt(ttyfd) == -1) { ^~~~~~~~ unlinkat Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Cleanup header file inclusion.Ralf Baechle2017-07-267-54/+52
| | | | | | | | | | 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: Replace bzero use with memset.Ralf Baechle2017-07-251-4/+4
| | | | | | bzero is a mega-ancient use of bsdism. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Compress multiple blank lines into single lines.Ralf Baechle2017-07-2513-31/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Remove code for ICMP mode.Ralf Baechle2017-07-251-44/+0
| | | | | | Supposedly it didn't work and it was never being built anyway. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Remove USE_SGTTY ifdefery.Ralf Baechle2017-07-251-16/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: USE_TERMIO is always defined.Ralf Baechle2017-07-252-10/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: USE_TERMIOS is never defined.Ralf Baechle2017-07-251-12/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Get rid of __bsdi__ ifdefery.Ralf Baechle2017-07-251-3/+0
| | | | | | I don't think this was ever meant to run on a BSD/i386 or BSD/OS system. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototype for io_error().Ralf Baechle2017-07-252-158/+162
| | | | | | 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-252-10/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototypes for int_handler().Ralf Baechle2017-07-252-8/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Sort out prototypes for usr1_handler().Ralf Baechle2017-07-252-56/+55
| | | | | | | 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-252-10/+6
| | | | | | 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-252-12/+10
| | | | | | | 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-252-2/+1
| | | | | | It's only being used from within ax25ipd.c. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Fix stats.Ralf Baechle2017-07-252-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* listen: Remove code controlled by NEW_AX25_STACK.Ralf Baechle2017-07-251-8/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Listen: Move statement following if to separate line.Ralf Baechle2017-07-251-1/+2
| | | | | | Broken out from a larger patch submitted by Wietse Ruyg <pe1oez@dds.nl>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* the curses terminal connection displays the destination call inThomas Osterried2017-02-111-0/+3
| | | | | the upper left. call comes from commandline arg. Ensure to write it in upper case.
* call: Sort out initialization of t_win variables.Ralf Baechle2017-01-311-2/+6
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* call: Fix error check on iconv's return value.Ralf Baechle2017-01-311-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* listen: Fix comparison broken by limited range of types.Ralf Baechle2017-01-311-1/+1
| | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wextra -pedantic -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c utils.c: In function ‘lprintf’: utils.c:73:27: warning: comparison is always true due to limited range of data type [-Wtype-limits] || (*p > 126 && *p < 160 && sevenbit)) ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Sort out variable and function declarations.Ralf Baechle2017-01-3117-141/+186
| | | | | | | | | | - 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>
* call: Fix declaration of unix2yapp().Ralf Baechle2017-01-311-1/+1
| | | | | | It didn't match the actual function definition. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Fix further abuse of 0 as NULL pointer.Ralf Baechle2017-01-315-46/+46
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* call: Fix argument of time() to time(NULL).Ralf Baechle2017-01-311-3/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25mond: Switch version number printed to ax25-apps version.Ralf Baechle2017-01-231-1/+2
| | | | | | | | | | | The version number has not been changed ever since the oldest version of ax25-apps still available making it useless for bug reporting. Worse, using a symbol named VERSION is an autoconf-based package for anything but the autoconf-defined symbol is missleading. the version useless for bug reporting. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* gitignore: Ignore *~ files.Ralf Baechle2017-01-231-0/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25ipd: Switch version number printed to ax25-apps version.Ralf Baechle2017-01-232-3/+1
| | | | | | | 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>
* ax25rtd: Delete useless declaration of variable Version.Ralf Baechle2017-01-231-2/+0
| | | | | | There only is a declaration, no definition. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Fix typo Documentatioa -> Documentation.Ralf Baechle2017-01-212-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove definition for /proc/net/ax25_ports from pathnames.h.Ralf Baechle2017-01-191-1/+0
| | | | | | | | /proc/net/ax25_ports is a statistics file in invented for the NewAX25 stack. Nothing references PROC_AX25PORTS_FILE so just delete the definition. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Makefile.am: man page for ax25mond thought it's talking about "call"Thomas Osterried2016-11-161-2/+2
| | | | Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>
* remove listen.1Thomas Osterried2016-07-041-105/+0
|
* Improved timestamps. With code and -t -tt -ttt ... option behaviour from ↵Thomas Osterried2016-07-041-2/+16
| | | | | | | | tcpdump. -> Without -t, listen now shows a timestamp. Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>
* fixed segfault on -c option.root2016-07-041-2/+4
| | | | | | | has_colors() was called before initscr(). also added error message if terminal does not support colors (and then exit). Signed-off-by: root <root@db0fhn.ampr.org>
* Improved timestamps. With code and -t -tt -ttt ... option behaviour from ↵Thomas Osterried2016-07-044-22/+245
| | | | | | | | tcpdump. -> Without -t, listen now shows a timestamp. Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>
* Merge branch 'master' of git://git.linux-ax25.org/pub/scm/ax25-appsThomas Osterried2016-03-141-0/+28
|\
| * listen -a shows on segmented packets ok, but shows also the defragmented,Thomas Osterried2016-03-121-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | packet, but garbled: bpq2: fm DL9SAU to DL9SAU-15 ctl I00+ pid=8(segment) len 4 remain 0 0000 E2 E3 E4 | ... Reason: the defragmented packet is passed to netif_rx(skb). It has skb->protocol = htons(ETH_P_IP), but still belongs to ifr.ifr_hwaddr.sa_family == AF_AX25. listen -a looks for every iface with like ifr.ifr_hwaddr.sa_family == AF_AX25 and thus gets the desegmented packet. This desegmented packet has already lost his ax25 header information (it's the IP datagram that netif_rx sees), prefixed by AX25_P_IP = 0xcc: strace: recvfrom(3, "\0\210\230r\246\202\252\340\210\230r\246\202\252\177\314\10\201\314E\0\1\1\0\32\0\0?\1!\327,\200\200\n,\200\200\1\0\0\347\300\21\6\0\1\26\23\303V.. recvfrom(3, "\314E\0\1\1\0\32\0\0?\1!\327,\200\200\n,\200\200\1\0\0\347\300\21\6\0\1\26\23\303V.. \314 == 0xcc == AX25_P_IP We can make safely make the assumption for first byte == 0xcc and length > 2, that we safeley can detect those IP frames, and then ignore it. Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>
* | call: Remove unused definition of MAXCMDLEN.Ralf Baechle2016-02-121-1/+0
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Have exactly one empty line following functions.Ralf Baechle2016-02-121-12/+3
| | | | | | | | | | | | Replace sequences of multiple empty lines to just one. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Move statline() to make declaration unnecessary.Ralf Baechle2016-02-121-42/+41
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Put statements following if() or while on separate line.Ralf Baechle2016-02-121-48/+85
| | | | | | | | | | | | Put while of do {} while loop on the line of the closing brace. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Have a blank separate a closing parenthesis and opening brace.Ralf Baechle2016-02-121-39/+39
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Avoid multiple statements or definitions in one line.Ralf Baechle2016-02-121-13/+28
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Don't use C++ comments.Ralf Baechle2016-02-121-81/+131
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Format with tabs instead of blanks.Ralf Baechle2016-02-121-133/+133
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | call: Make static what can be made static.Ralf Baechle2016-02-121-31/+31
| | | | | | | | | | | | | | | | But leave remotecommand() to avoid a warning about the function being unused. It currently is unused because its sole caller is commented out. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>