Git Product home page Git Product logo

linuxax25's Introduction

ve7fet

Experimental repository for random projects and code.

linuxax25's People

Contributors

f6bvp avatar srl295 avatar ve7fet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linuxax25's Issues

Packet length for nodes broadcast frames is fixed at 256 bytes

Just noticed the packet length for nodes broadcast is fixed to 256 bytes. Therefore the nodes broadcasts aren't sent correctly, and throwing netromt errors in syslog, for AX.25 ports with a smaller packet length configured in axports. This produces incomplete nodes broadcasts on RF ports with a smaller paclen for example.

I resolved this by using the netromt.c patch attached. Also noticed NODES_PACLEN is used in the original source but I think it isn't correctly done and leading to incomplete nodes broadcasts.

netromt.patch.txt

Warning ax25tools axgetput.c: In function ‘main’: axgetput.c:222:2: warning: ‘strncpy’

When installing AX25apps with new Gcc

make[1] : on quitte le répertoire « /usr/local/src/ax25/linuxax25-master/ax25tools »
Compiling AX.25 tools
*
make all-recursive
make[1] : on entre dans le répertoire « /usr/local/src/ax25/linuxax25-master/ax25tools »
Making all in ax25
make[2] : on entre dans le répertoire « /usr/local/src/ax25/linuxax25-master/ax25tools/ax25 »
Making all in axgetput
make[3] : on entre dans le répertoire « /usr/local/src/ax25/linuxax25-master/ax25tools/ax25/axgetput »
gcc -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE -g -O2 -MT axgetput.o -MD -MP -MF .deps/axgetput.Tpo -c -o axgetput.o axgetput.c
gcc -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
gcc -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE -g -O2 -MT proto_bin.o -MD -MP -MF .deps/proto_bin.Tpo -c -o proto_bin.o proto_bin.c
axgetput.c: In function ‘main’:
axgetput.c:222:2: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
strncpy(myname, p, len);
^~~~~~~~~~~~~~~~~~~~~~~
axgetput.c:219:8: note: length computed here
len = strlen(p);
^~~~~~~~~

I suggest strncpy should be replaced by a fixed length copy according to array size declaration in #include file.

Bernard, f6bvp / ai7bg

need for development tools to be added in README

While installing AX25 on a brand new Raspberry OS I started to install AX25 libraries.
However a few utilities and libraries necessary for compilation and installation where missing.
Although Raspbian OS build-essential packages are already installed in raspbian OS it is not bad to check.

The following should be added more explicitely in README file.


Mandatory tools and libraries necessary for AX25 libraries, apps and tools installation :
sudo apt install build-essential libtool libncursesw5-dev libncurses5-dev autoconf make


73 de Bernard, f6bvp

thank you very much

He walks very well
Tested in slackware 14.2
Running fbb and node

73

-- LU9DCE Eduardo - argentina

undefined reference to `Fl

make[2]: Entering directory /usr/local/src/ax25/linuxax25-master/ax25tools/hdlcutil/fl' g++ -std=gnu++11 -g -O2 -lX11 -lfltk -lGL -lSM -lICE -lXi -lXext -lX11 ../hdrvcomm.o -o xfsmmixer xfsmmixer.o xfsmmixer_main.o xfsmmixer_main.o: In functionmain':
/usr/local/src/ax25/linuxax25-master/ax25tools/hdlcutil/fl/xfsmmixer_main.cxx:321: undefined reference to Fl::arg(int, char**, int&)' /usr/local/src/ax25/linuxax25-master/ax25tools/hdlcutil/fl/xfsmmixer_main.cxx:416: undefined reference toFl_Slider::bounds(double, double)'

lots of them ... looks like
ax25tools/hdlcutil/fl/xfsmmixer is the root ...

Im on Odroid-X2 Ubuntu 14.04 Linux odroid 3.8.13.303 #1 SMP PREEMPT Mon May 9 12:02:41 PDT 2016 armv7l armv7l armv7l GNU/Linux

looks like it compiled fine on my Intel based system, but not my arm ....

Im kinda stuck with that version of kernel, Odroid has not updated it in over 2 years ...

After upAX25.sh simlink Libax25.so.0

When I used updAX25.sh. I encountered a problem. There was a problem finding libax25.so.0. I have to make a simlink. Also with libax25io.so.0

pd2lt@pi1lap:/usr/local/src/ax25# fbb -s -a
Checking fbb tree.... Ok
Checking fbb configuration :
/usr/local/sbin/xfbbd: error while loading shared libraries: libax25.so.0: cannot open shared object file: No such file or directory
Configuration error ! Giving up.
Please read file /usr/local/var/ax25/fbb/ERROR.SYS

Escape character is '^]'.
uronode: error while loading shared libraries: libax25io.so.0: cannot open shared object file: No such file or directory
Connection closed by foreign host.

Simlink
ln -s /usr/local/lib/libax25.so.1 /usr/lib/libax25.so.0
ln -s /usr/local/lib/libax25io.so.1 /usr/lib/libax25.io.so.0

No problem, but it's worth mentioning.
Maybe it's known, but I've never read it.
Thanks for the work, works perfectly.
Using Debian Wheezy 3.2.0-4-686-pae

73 Niels PD2LT

Error installing libax25-devel due to header conflicts with glibc-headers

I'm considering moving the Fedora packages over to your fork and was doing to local builds for testing when I ran into this issue.

Error: Transaction check error:
  file /usr/include/netax25/ax25.h from install of libax25-devel-1.0.5-1.fc21.x86_64 conflicts with file from package glibc-headers-2.20-8.fc21.x86_64
  file /usr/include/netrom/netrom.h from install of libax25-devel-1.0.5-1.fc21.x86_64 conflicts with file from package glibc-headers-2.20-8.fc21.x86_64
  file /usr/include/netrose/rose.h from install of libax25-devel-1.0.5-1.fc21.x86_64 conflicts with file from package glibc-headers-2.20-8.fc21.x86_64

Quesion: AX.25 socket data corruption

Hello,

I'm writting a proxy programme to pass-through raw binary data between AX.25 socket and a TCP socket.

In fact, to not to reinvent the wheel, I took a simple TCP proxy source and converted the server TCP socket to AX.25 socket on one side and a client TCP socket to AX.25 socket on another side of AX.25 link.

Here is the snippet of the programme:

/* Forward data between sockets */
void forward_data(int source_sock, int destination_sock, const char *name) {
    ssize_t n;
    fd_set read_fd;
    int s = source_sock;
#define BUF_SIZE 16384
    char buffer[BUF_SIZE];

    if (fcntl(s, F_SETFL, O_NONBLOCK) < 0) {
        perror("socket");
        close(s);
        return;
    }

    while (1) {
        FD_ZERO(&read_fd);
        FD_SET(s, &read_fd);
        select(s + 1, &read_fd, NULL, NULL, NULL);
        if (FD_ISSET(s, &read_fd)) {
            n = recv(source_sock, buffer, BUF_SIZE, 0);
        }
        if (n < 0) break;
        write(destination_sock, buffer, n); // send data to output socket
    }

On one side of AX.25 link it accepts TCP connections on port 6789 and initiates an AX.25 connection to UR5VIB-8. On the other side of the link proxy accepts AX.25 connections on UR5VIB-8 and forwards data to local TCP port 22.

It generally works. For a while. You can log in by SSH (or telnet) via proxied link to the remote site. The overal interactivity (reaction on packet loss) is far better than in IP encapsulation mode. But after a while you've got a connection reset from SSH with message:

Bad packet length 573483957.
ssh_dispatch_run_fatal: Connection to 127.0.0.1 port 6789: Connection corrupted

(For telnet connection you will just get a connection reset.)

I tried to figure out what is the problem with axlisten and tcpdump, and I'm not 100% sure, but I think I found that there is data duplication in the middle of the transfer. The inserted data makes SSH confused.

May be someone can shed a light on what am I missing here?
I though it should be starighforward to pass the data between two reliable sequential sockets.
Thanks!

Ivan,
UR5VIB

Fix for ax25app's call program not compiling on 02/10/19 Git commit

ax25app's call.c program no longer compiles with the newest 02/10/2019 commit on Centos6/7 with the following errors. Below is both the errors and a proposed patch that fixes the issue.

--
call.c: In function 'cmd_call':
call.c:2133:19: error: storage size of 'tv' isn't known
struct timespec tv, *timeout;
^
call.c:2136:4: error: invalid use of undefined type 'struct timespec'
tv.tv_sec = inactivity_timeout.tv_sec;
^
call.c:2137:4: error: invalid use of undefined type 'struct timespec'
tv.tv_nsec = inactivity_timeout.tv_nsec;
^
call.c:2908:5: error: invalid use of undefined type 'struct timespec'
inactivity_timeout.tv_sec = f;
^
call.c:2909:5: error: invalid use of undefined type 'struct timespec'
inactivity_timeout.tv_nsec = (f - (long) f) * 1000000000;
^

Here is a confirmed working patch that works on Centos 6 and 7 and F6BVP has confirmed it doesn't hurt anything on Raspbian Stretch:

--- call/call.c.orig 2019-06-11 07:32:01.980862003 -0700
+++ call/call.c 2019-06-12 15:07:13.037146241 -0700
@@ -24,7 +24,6 @@
#include <sys/types.h>
#include <utime.h>
#include <limits.h>
-#include <time.h>
#include <stdio.h>
#include <ctype.h>
#include <dirent.h>
@@ -37,6 +36,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <time.h> /* 6/12/19: dranch: needs to be AFTER sys/time.h include for older GCCs */
#include <sys/wait.h>
#include <termios.h>
#include <unistd.h>

--

"Releases" link not found

In README

Building from Source
See the "Releases" link on this page to download the current source tarballs.

should be replaced by :

Building from Source
See README files in libax25, ax25tools, ax25apps directories

debuild -us -uc error

Hi! Sorry, I'm new. I try to build this and give me this error.
I'm trying to create a packet stadion with a KPC3 and an Armbian Inovato Quadra box.
Any help will be very appreciated!
Jorge VE3EAD

dpkg-buildpackage -us -uc -ui
dpkg-buildpackage: info: source package libax25
dpkg-buildpackage: info: source version 1.2.2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Lee Woldanski [email protected]
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture arm64
dpkg-checkbuilddeps: error: Unmet build dependencies: dh-exec
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed

Compile fail for ax25tools at axgetput.c under latest Xubuntu (stretch)

root@fig:/home/chris/ve7fet/ax25tools# make
make all-recursive
make[1]: Entering directory '/home/chris/ve7fet/ax25tools'
Making all in ax25
make[2]: Entering directory '/home/chris/ve7fet/ax25tools/ax25'
Making all in axgetput
make[3]: Entering directory '/home/chris/ve7fet/ax25tools/ax25/axgetput'
gcc -DHAVE_CONFIG_H -I. -I../.. -D_GNU_SOURCE -g -O2 -MT axgetput.o -MD -MP -MF .deps/axgetput.Tpo -c -o axgetput.o axgetput.c
In file included from axgetput.c:18:
../../config.h:308:16: error: two or more data types in declaration specifiers
308 | #define mode_t int
| ^~~
../../config.h:311:15: error: two or more data types in declaration specifiers
311 | #define pid_t int
| ^~~
axgetput.c: In function ‘eol_convention’:
axgetput.c:113:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
113 | write(fderr, BIN_ON, strlen(BIN_ON));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
axgetput.c:116:17: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
116 | write(fderr, BIN_OFF, strlen(BIN_OFF));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:380: axgetput.o] Error 1
make[3]: Leaving directory '/home/chris/ve7fet/ax25tools/ax25/axgetput'
make[2]: *** [Makefile:595: all-recursive] Error 1
make[2]: Leaving directory '/home/chris/ve7fet/ax25tools/ax25'
make[1]: *** [Makefile:392: all-recursive] Error 1
make[1]: Leaving directory '/home/chris/ve7fet/ax25tools'
make: *** [Makefile:331: all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.