summaryrefslogtreecommitdiffstats
path: root/tcpip
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Update all references to the FSF's address.Ralf Baechle2019-04-111-1/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove useless casts from bind() pointer argument.Ralf Baechle2017-08-032-2/+2
| | | | | | | | | | | | | | | | | | | | | This is using the following semantic patch: @bind@ type T; expression A, C; struct sockaddr *B; @@ - bind(A, (struct sockaddr *) B, C) + bind(A, B, C) @bind_in@ type T; expression A, C; struct sockaddr_in *B; @@ - bind(A, (struct sockaddr *) B, C) + bind(A, B, C) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove useless casts of function return value to void.Ralf Baechle2017-08-031-3/+3
| | | | | | | | | | | | | | | | 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: Remove useless casts from sendto() pointer argument.Ralf Baechle2017-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is using the following semantic patch: @send@ type T; expression A, B, C, D; @@ - send(A, (T *)B, C, D) + send(A, B, C, D) @sendto1@ type T; expression A, B, C, D, E, F; @@ - sendto(A, (T *)B, C, D, E, F) + sendto(A, B, C, D, E, F) @sendto2@ type T; expression A, B, C, D, F; struct sockaddr *E; @@ - sendto(A, B, C, D, (struct sockaddr *) E, F) + sendto(A, B, C, D, E, F) @sendmsg@ type T; expression A, B, C; @@ - sendmsg(A, (T *)B, C) + sendmsg(A, B, C) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Remove useless casts from memset pointer argument.Ralf Baechle2017-08-034-8/+8
| | | | | | | | | | | | | 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: Remove useless casts from memcpy pointer arguments.Ralf Baechle2017-08-034-13/+18
| | | | | | | | | | | | | | | | | | | This is using the following semantic patch: @memcpy1@ type T; expression A, B, C; @@ - memcpy((T *)A, B, C) + memcpy(A, B, C) @memcpy2@ type T; expression A, B, C; @@ - memcpy(A, (T *)B, C) + memcpy(A, B, C) Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rip98d: Perform a crapectomy on hex2intrev().Ralf Baechle2017-08-031-46/+4
| | | | | | | | | | | | | hex2intrev is a hilariously complicated function which combine parsing a hexadecimal integer in network byte order and swapping the result to host byte order. Move the endianess swapping to the caller which allows to remove double endianess swapping. Now that hex2intrev no longer deals with byte order rename it to hex2int and replace its implementation with a simple invocation of strtoul. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rip98r: Use unsigned int to store IPv4 addresses and masks.Ralf Baechle2017-08-031-2/+2
| | | | | | Unsigned long is wasteful on 64 bit. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rip98d: Replace naive mask2bits and bits2mask implementations.Ralf Baechle2017-08-032-53/+10
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rip98d: Change bits2mask's return value from unsigned long to unsigned int.Ralf Baechle2017-08-012-2/+2
| | | | | | An IPv4 mask fit into an unsigned int. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rip98d: Change mask2bits's argument from unsigned long to unsigned int.Ralf Baechle2017-08-012-2/+2
| | | | | | An IPv4 address or mask fits into an unsigned int. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* treewide: Kill assignments in if conditions.Ralf Baechle2017-07-313-17/+34
| | | | | | | | | | | | | | | | | | | | 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>
* ttylinkd: 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>
* ttylinkd: Make several variables and functions static.Ralf Baechle2017-02-061-17/+18
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rip98d: Fix warning.Ralf Baechle2017-01-261-1/+2
| | | | | | | | | | 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 rip98d.o -MD -MP -MF .deps/rip98d.Tpo -c -o rip98d.o rip98d.c rip98d.c: In function ‘read_routes’: rip98d.c:189:33: warning: format ‘%X’ expects argument of type ‘unsigned int *’, but argument 6 has type ‘int *’ [-Wformat=] n = sscanf(buffer, "%s %s %s %X %d %d %d %s %d %d\n", ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use the right way to get the required feature set from glibc.Ralf Baechle2017-01-261-1/+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-242-2/+4
| | | | | | | This uses a setlocalversion script derived from the kernel's scripts/setlocalversion. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ttylinkd: Switch version number printed to ax25-tools version.Ralf Baechle2017-01-221-1/+1
| | | | | | | The version number has not been changed ever since ax25-tools 0.0.1 making the version useless for bug reporting. 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>
* Reformat consistently. Strictly whitespace changes only.Ralf Baechle2013-06-173-88/+88
| | | | | | | 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>
* Always have a space between if, for, switch, while and the following `('.Ralf Baechle2013-06-171-9/+9
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Use tabs for indentation, not spaces.Ralf Baechle2013-06-171-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove useless initializations to 0 or NULL.Ralf Baechle2013-06-172-3/+3
| | | | | | | 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-90/+90
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Nuke trailing blank lines.Ralf Baechle2013-06-173-3/+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/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove all definitions of docdir from makefiles.Ralf Baechle2013-06-041-1/+0
| | | | | | | This may result in docfiles getting installed in ${prefix}/doc/, not ${prefix}/share/doc which is the convention. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Convert .cvsignore files to .gitignoreRalf Baechle2013-06-041-3/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* renamed variable "restrict" to "route_restrict"Thomas Osterried2012-10-013-7/+7
| | | | | | | | debian Bug#689322: "restrict" is a keyword in C99 tcpip/rip98d.c uses "restrict" as a variable name. This collides with the fact that in C99 "restrict" is a keyword. Compilers that default to C99-mode, or gcc -std=c99, fail to compile this code.
* Remove use of backwards compatibility header name.Ralf Baechle2009-06-211-8/+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-567/+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 type of length argument to sockset syscalls.Ralf Baechle2009-06-142-3/+4
| | | | | | | | Various socket syscalls receive a length argument that should be a socklen_t rsp. a ptr to a socklen_t but instead int rsp. ptr to int were being passed. While in theory this was a bug it's harmless as dangerously large values would not be used but the issue manifested itself in a significant number of compilation warnings.
* Convert to autoconf 2.59. Delete junk from past centuries.Ralf Baechle2007-01-221-287/+398
|
* testCraig Small2003-02-221-1/+1
|
* added remaining sys/time.h includes for ppcCraig Small2002-06-193-457/+2
|
* removed some stuff that shouldnt be thereCraig Small2002-03-041-1/+1
|
* last checking for 0.0.8ax25-tools-0.0.8Craig Small2001-05-161-15/+51
|
* added cvsignore to tcpip directoryCraig Small2001-05-031-0/+4
|
* fixed sockaddr problem and moved b* to mem* functionsCraig Small2001-05-035-36/+498
|
* Import ax25-tools 0.0.6 from tarballax25-tools-0.0.6Ralf Baechle2001-04-119-14/+24
|
* Import ax25-tools 0.0.4 from tarballax25-tools-0.0.4Ralf Baechle1999-08-101-4/+1
|
* Import ax25-tools 0.0.3 from tarballax25-tools-0.0.3Ralf Baechle1999-07-084-25/+129
|
* Import ax25-tools 0.0.2 from tarballax25-tools-0.0.2Ralf Baechle1999-06-073-2/+19
|
* Import ax25-tools 0.0.1 from tarballax25-tools-0.0.1Ralf Baechle1999-04-2113-0/+2041