summaryrefslogtreecommitdiffstats
path: root/kiss
Commit message (Collapse)AuthorAgeFilesLines
* Fixed spelling errors.HEADmasterThomas Osterried2023-05-131-2/+2
| | | | Signed-off-by: Thomas Osterried <dl9sau@darc.de>
* Fixed speeling errors in man pages and programs.Thomas Osterried2023-05-133-4/+4
| | | | | | | 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>
* treewide: Update all references to the FSF's address.Ralf Baechle2019-04-111-1/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Man pages: Update with date from last non-trivial change.Ralf Baechle2019-03-285-5/+5
| | | | | | | | | 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>
* Kissattach: Document -6 option for spattach, too.Ralf Baechle2019-03-281-2/+2
| | | | | | | The option may be a no-op for spattach but as long as the code does accept it, it should be documented. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Kissattach: Document -i option in synopsis section of manpage.Ralf Baechle2019-03-281-2/+2
| | | | | | | The -i option may be deprecated but still it should be documented as long as it still exists in the code. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Treewide: Delete duplicate #includes.Ralf Baechle2017-08-082-2/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* net2kiss: Switch from private openpty() implementation to libutil.Ralf Baechle2017-08-082-48/+2
| | | | | | | | In particular the openpty() implementation was still using only the old BSD terminals so not working on modern distributions which ship their kernels with CONFIG_LEGACY_PTYS disabled. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* kissattach.8, spattach.8: Fix references to non-existing man page.Ralf Baechle2017-08-031-2/+2
| | | | | | There is no axparms(4) man page but axparms(8) would make sense. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* kissnetd: Fix swapped calloc arguments.Ralf Baechle2017-08-031-1/+1
| | | | | | Fortunately this is a harmless issue. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove useless casts of function return value to void.Ralf Baechle2017-08-031-11/+8
| | | | | | | | | | | | | | | | Arguably useful in documenting the return value is intentionally ignored I think it's just cluttering the screen. This is using the following semantic patch: @castvoid@ expression F; @@ - (void) F + F (...) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Kill assignments in if conditions.Ralf Baechle2017-07-315-26/+51
| | | | | | | | | | | | | | | | | | | | 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>
* kissnetd: Fix possible buffer overflow.Ralf Baechle2017-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When printing an error message for configurations using particularly long file names a buffer overflow may occur potencially resulting in malfunction or crash. This fixes the following GCC 7.1.1 warnings: 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 kissnetd.o -MD -MP -MF .deps/kissnetd.Tpo -c -o kissnetd.o kissnetd.c kissnetd.c: In function ‘main’: kissnetd.c:124:38: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 66 [-Wformat-overflow=] sprintf(MyString, "cannot reopen %s", PortList[PortNumber]->Name); ^~ kissnetd.c:124:5: note: ‘sprintf’ output between 15 and 4110 bytes into a destination of size 80 sprintf(MyString, "cannot reopen %s", PortList[PortNumber]->Name); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kissnetd.c:143:49: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 55 [-Wformat-overflow=] sprintf(MyString, "Cannot unlock pts-device %s\n", PortList[PortNumber]->namepts); ^~ kissnetd.c:143:5: note: ‘sprintf’ output between 27 and 4122 bytes into a destination of size 80 sprintf(MyString, "Cannot unlock pts-device %s\n", PortList[PortNumber]->namepts); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kissnetd.c:154:50: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 54 [-Wformat-overflow=] sprintf(MyString, "cannot reopen ptmx (slave %s).", PortList[PortNumber]->namepts); ^~ kissnetd.c:154:5: note: ‘sprintf’ output between 29 and 4124 bytes into a destination of size 80 sprintf(MyString, "cannot reopen ptmx (slave %s).", PortList[PortNumber]->namepts); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mkiss: Change type of buffer[] to fix warning.Ralf Baechle2017-02-061-1/+1
| | | | | | | | | | | | | | | | | | | 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 mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c mkiss.c: In function ‘poll’: mkiss.c:67:15: warning: overflow in implicit constant conversion [-Woverflow] #define FEND 0300 /* Frame End (0xC0) */ ^ mkiss.c:148:14: note: in expansion of macro ‘FEND’ buffer[0] = FEND; ^~~~ mkiss.c:67:15: warning: overflow in implicit constant conversion [-Woverflow] #define FEND 0300 /* Frame End (0xC0) */ ^ mkiss.c:150:14: note: in expansion of macro ‘FEND’ buffer[2] = FEND; ^~~~ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mkiss: Fix use of 0 instead of NULL as a pointer value.Ralf Baechle2017-02-061-3/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove support for !defined(__GLIBC__) and __GLIBC__ != 2.Ralf Baechle2017-02-062-8/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use the right way to get the required feature set from glibc.Ralf Baechle2017-01-265-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __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>
* Add a git suffix to the version number used by all programs.Ralf Baechle2017-01-244-8/+12
| | | | | | | This uses a setlocalversion script derived from the kernel's scripts/setlocalversion. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* kissnet: Switch version number printed to ax25-tools version.Ralf Baechle2017-01-221-3/+7
| | | | | | | | | | The version number has not been changed ever since ax25-tools 0.0.1 making the version useless for bug reporting. Make sure the banner printed by kissnetd stays properly formatted even if the version string's length changes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mkiss: Fix harmless -Werror=format-security build error.Ralf Baechle2015-05-181-3/+3
| | | | | | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c mkiss.c: In function ‘main’: mkiss.c:469:4: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ mkiss.c:475:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ mkiss.c:480:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ cc1: some warnings being treated as errors The strings are constants in the application code itself so no security issues. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* automake: Replace use of deprecated automake macro INCLUDES.Ralf Baechle2015-05-171-2/+2
| | | | | | | | | | | | | | | | | This fixes the automake warnings: 6pack/Makefile.am:10: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') Makefile.am:9: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') ax25/Makefile.am:26: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') hdlcutil/Makefile.am:16: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') kiss/Makefile.am:11: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') netrom/Makefile.am:28: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') rose/Makefile.am:15: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') tcpip/Makefile.am:27: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') INCLUDES has been deprecated since automake 1.5. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Insert space between `)' and a following `{'.Ralf Baechle2013-06-171-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Reformat consistently. Strictly whitespace changes only.Ralf Baechle2013-06-174-107/+107
| | | | | | | Indentation by tabs only. Move case labels in switches are on the same level as the switch keyword. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove pointless return statements at the end of void functions.Ralf Baechle2013-06-172-2/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Always have a space between if, for, switch, while and the following `('.Ralf Baechle2013-06-172-5/+5
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove parenthesis around arguments of return statements.Ralf Baechle2013-06-171-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use tabs for indentation, not spaces.Ralf Baechle2013-06-174-20/+20
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove useless initializations to 0 or NULL.Ralf Baechle2013-06-174-23/+23
| | | | | | | They only inflate the .data section of the binary. Initializations to FALSE are still left to do. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Nuke trailing whitespace.Ralf Baechle2013-06-177-119/+119
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Nuke trailing blank lines.Ralf Baechle2013-06-171-1/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use dist_ prefix in Makefile.am rather than EXTRA_DIST where possible.Ralf Baechle2013-06-171-3/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Convert .cvsignore files to .gitignoreRalf Baechle2013-06-041-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* kissattach and it's sisters are parsing axports on their own.Thomas Osterried2012-10-281-1/+1
| | | | | | | they handled lines starting with '#' correctly, but complain (and refuse to work) if the lines are empty (-- this is in contrast to programs like call which use libax25 and work with empty lines). this small patch fixes this issue.
* Added support for multiport tncs like the KPC-9612 (use of only the secondThomas Osterried2010-04-132-12/+43
| | | | port). Example: This is done by "mkiss /dev/ttyUSB0 none /dev/ptmx
* Added help for arguments n* /dev/ptmxThomas Osterried2010-03-312-1/+2
|
* Fix parallel installation bugs.Ralf Baechle2009-09-231-1/+1
| | | | | | | | install-exec-local hooks may be run in parallel. This may result in the attempted installation of files into directories before they have been created. Fixed by using install-exec-hook instead. Reported and axgetput-only patch by Thomas Beierlein <tb@forth-ev.de>.
* Remove use of backwards compatibility header name.Ralf Baechle2009-06-212-16/+0
| | | | | | Glibc as old as 2.2 provides working headers under the right name and if not libax25 would install headers under the right name so this has become redundant and ugly.
* Ignore a few more generated files.Ralf Baechle2009-06-191-0/+1
|
* Remove all generated files.Ralf Baechle2009-06-191-507/+0
| | | | | | | | | | | | | | Keeping generated files in CVS doesn't only tend to produce large and cluttered files it also may result in build problems due to timestamps in the wrong order. So dump everything, update .cvsignore to ignore these files and resolve all warnings generated by autoreconf. From now on users of a CVS checkout should run the command autoreconf --install --force after having done a CVS checkout. For this to succeed automake, autoconf and libtool will have to be installed.
* Fix build error caused by variable definition after statement.Ralf Baechle2009-06-061-2/+1
|
* Unix98 support.Thomas Osterried2009-01-202-5/+5
| | | | Thanks to dk2crn.
* Unix98 PTY support for mkiss and m6pack.Thomas Osterried2009-01-202-18/+86
|
* Support for Unix98-pty's. Thanks to Christoph <dk2crn>.Thomas Osterried2009-01-152-19/+63
| | | | | Syslog logging. Bugfixes: buffer-length assurances; do never change char *foo = "bar".
* kissnetd now supports unix98 pty's (new option: -p num).Thomas Osterried2009-01-092-45/+171
| | | | | | | | | The num devices are written to stdout and could easily used in startp scripts. Introduced PATH_MAX for the pty name. Kiss header for crc smack and rmnc are now supported. write return code is now honoured. Thanks to dk2crn for contriution.
* #include <string.h> in order to make the compiler happyThomas Osterried2008-10-221-0/+1
|
* fflush stdout and stderr before close. just to be sureThomas Osterried2008-10-101-0/+2
|
* forked child now closes stdin, stdout, stderr.Thomas Osterried2008-10-011-0/+4
| | | | | Now it does not block on PTY=$(./kissattach /dev/ptmx ax4 2>&1|tail -1)
* kissattach now supports Unix98 pseudo terminals (/dev/ptmx).Thomas Osterried2008-09-262-14/+48
| | | | Thanks to Christoph Rueckert <dk2crn>.
* changed mail addressesThomas Osterried2008-04-273-4/+4
|
* consistent names (tty instead of ttyinterface)Thomas Osterried2007-04-161-1/+1
|