summaryrefslogtreecommitdiffstats
path: root/ax25
Commit message (Collapse)AuthorAgeFilesLines
* Fixed spelling errors.HEADmasterThomas Osterried2023-05-135-5/+5
| | | | Signed-off-by: Thomas Osterried <dl9sau@darc.de>
* Fixed speeling errors in man pages and programs.Thomas Osterried2023-05-1311-17/+17
| | | | | | | Author: colint@debian.org Author: Dave Hibberd <d@vehibberd.com> Signed-off-by: Daniele Forsi <iu5hkx@gmail.com> Signed-off-by: Thomas Osterried <dl9sau@darc.de>
* ax25(4): Capitalize the acronym ASCII and make it bold.Ralf Baechle2021-08-061-1/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rxecho: Increase space allocated for network interface name to IFNAMSIZ.Ralf Baechle2021-07-271-2/+2
| | | | | | | | | | | | | | | The previous hardcoded value was ok when used with the old SOCK_PACKET which was truncating network interface names to 14 bytes anyway. When support for the new-fangled PF_PACKET was added this became a bug. While technically a buffer overflow it is something that could only be exploited by root himself. Even more, due to alignment rules used by all Linux architectures the two bytes following the overflowed arrays would be unused anyway because an int is following, so this would actually end up working as intended, not as coded. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Fixes: 5415c1237782
* rxecho: rip out support for PF_INET, SOCK_PACKET sockets.Ralf Baechle2021-07-271-59/+0
| | | | | | | The kernel warns of those since Linux 2.1.68 which was released on 1997-11-30. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25.4: Remove recommendation for PF_INET, SOCK_PACKET sockets.Ralf Baechle2021-07-271-8/+1
| | | | | | | | | | The practice results in a kernel warning since Linux 2.1.68 which was released on 1997-11-30 and is deprecated for even longer so maybe, just maybe we should stop recommending it. Use socket(PF_SOCKET, SOCK_RAW, ...) instead, see packet(7). Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25.4: Use .B nroff highliting as is common practice for man pages.Ralf Baechle2021-07-271-17/+38
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Update all references to the FSF's address.Ralf Baechle2019-04-113-3/+6
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Fix transformation by bad cleanupRalf Baechle2019-03-281-3/+2
| | | | | | | | | 6afad7276402 ("Delete more assignments in if conditions.") has a manual edit and that promptly went wrong. Fixes: 6afad7276402 ("Delete more assignments in if conditions.") Reported-by: Thomas Osterried <ax25@x-berg.in-berlin.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Man pages: Update with date from last non-trivial change.Ralf Baechle2019-03-2813-13/+13
| | | | | | | | | In some of these pages the content was changed relativly recently but the date in the man page itself was never updated so dates were off by decades. Update all man pages to last non-trival change recorded in git since imported. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Rename README file to README.axgetput.Ralf Baechle2019-03-282-1/+1
| | | | | | | | The README file was conflicting with the README files in the root directory so only the of the files ended up getting installed on "make install" or when packaging. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25getput: Distribute TIPS.txt.Ralf Baechle2019-03-201-0/+1
| | | | | | | While add it force the distribution of README and TODO in the same directory instead of relying on automake's default behaviour. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Delete duplicate inclusion of <sys/types.h>Ralf Baechle2017-08-081-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25.4: Fix reference to non-existing man page.Ralf Baechle2017-08-031-2/+2
| | | | | | There is no axparms(5) man page but axports(5) would make sense. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Delete more assignments in if conditions.Ralf Baechle2017-08-034-32/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on below coccinelle script with a bad transformation fixed up manually. @if1@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S @if2@ expression E, F, G; binary operator X; statement S; @@ - if (G X (E = F)) + E = F; + if (E X G) S @if3@ expression E, F; statement S; @@ - if (!(E = F)) + E = F; + if (!E) S @if4@ expression E, F; statement S; @@ - if ((E = F)) + E = F; + if (E) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove casts of a type to the same type.Ralf Baechle2017-08-031-1/+1
| | | | | | | | | | | | | This is using the following semantic patch: @identitycast@ type T; T *A; @@ - (T *) A + A Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove useless casts from memset pointer argument.Ralf Baechle2017-08-032-5/+5
| | | | | | | | | | | | | This is using the following semantic patch: @memset@ type T; expression A, B, C; @@ - memset((T *)A, B, C) + memset(A, B, C) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Kill assignments in if conditions.Ralf Baechle2017-07-3112-87/+181
| | | | | | | | | | | | | | | | | | | | Somewhat hard to read and the code base already has many overlong lines. Found with below spatch file and some manual editing in ax25/access.c to restore a comment lost by spatch. @parens@ expression E, F, G; binary operator X; statement S; @@ - if ((E = F) X G) + E = F; + if (E X G) S Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Compute nfds argument of select() instead of using a constant.Ralf Baechle2017-07-261-1/+10
| | | | | | | In particular this remove reliance on how file descriptors are assigned and ensures we don't pass an unnecessarily high nfds argument to select. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Remove unused code resulting in warning.Ralf Baechle2017-07-261-7/+0
| | | | | | | | | | | | | | | | | gcc -g -O2 -Wall -o axspawn axspawn.o access.o md5.o -lax25 -lutil gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/us r/local/var/ax25/"\" -g -O2 -Wall -MT axwrapper.o -MD -MP -MF .deps/axwrapper.Tpo -c -o axwrapper.o axwrapper.c axwrapper.c:49:13: warning: ‘sigchld_handler’ defined but not used [-Wunused-function] static void sigchld_handler(int sig) ^~~~~~~~~~~~~~~ Since 71918b7d4e95 ("axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.") made sigchld_handler() static gcc was warning about the function being unused. No point in keeping this around; SIGCHLD is perfectly fine. Fixes: 71918b7d4e95 ("axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.") Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Handle EINTR error return from select().Ralf Baechle2017-07-261-0/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Delete FILES section from man page.Ralf Baechle2017-07-261-1/+0
| | | | | | No files were listed in the FILES section. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25: Delete useless casts of malloc's return value.Ralf Baechle2017-02-062-17/+17
| | | | | | | | | | | | | | | malloc returns a void pointer so no cast is necessary when assigning to a pointer type. Found with below coccinelle script: @malloccast@ type T; @@ - (T *) malloc(...) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Don't check for negative return from strlen.Ralf Baechle2017-02-061-1/+1
| | | | | | | | For one strlen does not return any errors. By its very nature strlen does not return negative results and its return type is size_t which happens to be unsigned. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mheard: Drop unsatisfiable conditions.Ralf Baechle2017-02-061-2/+2
| | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -Wextra -MT mheard.o -MD -MP -MF .deps/mheard.Tpo -c -o mheard.o mheard.c [...] mheard.c:135:22: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (pr->entry.type < 0 || pr->entry.type > sizeof(types)) ^ mheard.c:168:22: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (pr->entry.type < 0 || pr->entry.type > sizeof(types)) ^ [...] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25d: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-6/+6
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-11/+12
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-7/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mheard: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-5/+5
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Make function calc_crc static.Ralf Baechle2017-02-061-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Include util.h into utilc for the prototypes.Ralf Baechle2017-02-061-0/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Make do_version static.Ralf Baechle2017-02-061-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axgetput: Move definition of several array from a .h to a .c file.Ralf Baechle2017-02-062-3/+7
| | | | | | And add proper declarations to the header file. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25d: Reorder code to avoid the need for forward declarations.Ralf Baechle2017-02-061-461/+454
| | | | | | And then delete those now useless declarations. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25d: Make several functions static.Ralf Baechle2017-02-061-4/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axparms: Make several functions static.Ralf Baechle2017-02-061-9/+9
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Remove unused function Xtoupper().Ralf Baechle2017-02-061-9/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Sort out homebrew declaration of forkpty(3).Ralf Baechle2017-02-061-9/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Make many functions and variables static.Ralf Baechle2017-02-061-42/+38
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Move calc_md5_pw to eleminate need for declaration and make static.Ralf Baechle2017-02-061-30/+29
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Make several functions and variables static.Ralf Baechle2017-02-061-11/+8
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.Ralf Baechle2017-02-061-3/+3
| | | | | | | | This results in a new warning about sigchld_handler() being unused which is because the caller is currently commented out which we leave to be sorted out later. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* bpqparms: Fix excessive indentation in usage().Ralf Baechle2017-02-061-4/+4
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* bpqparms: Make functions usage and get_hwaddr static.Ralf Baechle2017-02-061-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove support for !defined(__GLIBC__) and __GLIBC__ != 2.Ralf Baechle2017-02-063-14/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Sort out pointer signedness mess.Ralf Baechle2017-01-261-3/+4
| | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT axspawn.o -MD -MP -MF .deps/axspawn.Tpo -c -o axspawn.o axspawn.c axspawn.c: In function ‘encstathuf’: axspawn.c:555:15: warning: overflow in implicit constant conversion [-Woverflow] dest[0] = 255; ^~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use the right way to get the required feature set from glibc.Ralf Baechle2017-01-262-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __USE_XOPEN doesn't work to get ptsname() etc. from libc. This is Linux-specific software so convert to _GNU_SOURCE. make[2]: Entering directory '/home/ralf/src/ax25/ax25-tools/kiss' gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O 2 -Wall -pedantic -MT kissattach.o -MD -MP -MF .deps/kissattach.Tpo -c -o kissattach.o kissattach.c kissattach.c: In function ‘main’: kissattach.c:312:18: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((namepts = ptsname(fd)) == NULL) { ^~~~~~~ kissattach.c:312:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((namepts = ptsname(fd)) == NULL) { ^ kissattach.c:317:7: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(fd) == -1) { ^~~~~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT kissnetd.o -MD -MP -MF .deps/kissnetd.Tpo -c -o kissnetd.o kissnetd.c kissnetd.c: In function ‘ReopenPort’: kissnetd.c:134:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) { ^~~~~~~ kissnetd.c:134:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((npts = ptsname(PortList[PortNumber]->Fd)) == NULL) { ^ kissnetd.c:143:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(PortList[PortNumber]->Fd) == -1) { ^~~~~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c mkiss.c: In function ‘poll’: mkiss.c:68:15: warning: overflow in implicit constant conversion [-Woverflow] #define FEND 0300 /* Frame End (0xC0) */ ^ mkiss.c:149:14: note: in expansion of macro ‘FEND’ buffer[0] = FEND; ^~~~ mkiss.c:68:15: warning: overflow in implicit constant conversion [-Woverflow] #define FEND 0300 /* Frame End (0xC0) */ ^ mkiss.c:151:14: note: in expansion of macro ‘FEND’ buffer[2] = FEND; ^~~~ mkiss.c: In function ‘main’: mkiss.c:568:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^~~~~~~ mkiss.c:568:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^ mkiss.c:578:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(pty[i]->fd) == -1) { ^~~~~~~~ mkiss.c:672:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] syslog(LOG_ERR, "tty->fd: %m"); ^ mkiss.c:698:38: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] syslog(LOG_ERR, "pty[%d]->fd: %m\n", i); [...] ^ gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT net2kiss.o -MD -MP -MF .deps/net2kiss.Tpo -c -o net2kiss.o net2kiss.c net2kiss.c: In function ‘main’: net2kiss.c:630:18: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((namepts = ptsname(fdpty)) == NULL) { ^~~~~~~ net2kiss.c:630:16: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((namepts = ptsname(fdpty)) == NULL) { ^ net2kiss.c:635:7: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(fdpty) == -1) { ^~~~~~~~ [...] gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -Wall -pedantic -MT m6pack.o -MD -MP -MF .deps/m6pack.Tpo -c -o m6pack.o m6pack.c m6pack.c: In function ‘main’: m6pack.c:537:16: warning: implicit declaration of function ‘ptsname’ [-Wimplicit-function-declaration] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^~~~~~~ m6pack.c:537:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion] if ((npts = ptsname(pty[i]->fd)) == NULL) { ^ m6pack.c:545:8: warning: implicit declaration of function ‘unlockpt’ [-Wimplicit-function-declaration] if (unlockpt(pty[i]->fd) == -1) { ^~~~~~~~ m6pack.c:626:33: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] syslog(LOG_ERR, "tty->fd: %m"); ^ m6pack.c:658:29: warning: ISO C does not support the ‘%m’ gnu_printf format [-Wformat=] "pty[%d]->fd: %m\n",i); ^ [...] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>