---
name: "ax25"
section: "3"
platform: "linux"
package: "libax25-dev"
version: "0.0.12-rc5+git20230513+5581005-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ax25"
---

# ax25(3)

AX25 Address manipulation routines

## NAME

**ax25\_aton, ax25\_aton\_entry, ax25\_aton\_arglist,** **ax25\_ntoa, ax25\_cmp, ax25\_validate** - AX25 Address manipulation routines

## SYNOPSIS

```
#include <netax25/ax25.h>
```

**int ax25\_aton(const char \****cp***, struct full\_sockaddr\_ax25 \****fsap***);**

**int ax25\_aton\_arglist(const char \*\****cp***, struct full\_sockaddr\_ax25 \****fsap***);**

**int ax25\_aton\_entry(const char \****cp***, char \****axp***);**

**char \*ax25\_ntoa(ax25\_address \****axp***);**

**int ax25\_cmp(ax25\_address \****ax1***, ax25\_address \****ax2***);**

**int ax25\_validate(char \****axp***);**

**char \*ax25\_config\_file(const char \*filename);**

## DESCRIPTION

**ax25\_aton**() takes the ASCII string *cp* that is in the format *callsign* \[\[*V*\|*VIA*\]*callsign*...\] and stores it in *fsap* in network format.

**ax25\_aton\_entry**() takes the ASCII string of a callsign *cp* and stores it in network format in *axp.*

The **ax25\_aton\_arglist**() takes a NULL terminated array of strings *cp* and stores it in *fsap* in network format.

The **ax25\_ntoa**() takes a network format address *axp* and returns the ASCII representation. The string is returned in a statically allocated buffer, which subsequent calls will overwrite.

The **ax25\_cmp**() function compares the two ax25 addresses, *ax1* and *ax2*, that are in network format and determines whether they are identical, differ only by their SSIDs or are different.

The **ax25\_validate**() function checks to see if the address *axp* in network format is a correctly formatted address.

## RETURN VALUE

The **ax25\_aton**()**and** **ax25\_aton\_arglist**() functions return -1 if an error occurs otherwise the length of the returned structure.

The **ax25\_aton\_entry**() function returns -1 if an error occurs otherwise zero.

The **ax25\_cmp**() function returns 0 if the two addresses are identical, 1 if they are different or 2 is only the SSIDs are different.

The **ax25\_validate**() function returns TRUE if the callsign is valid or FALSE if it is not.

## SEE ALSO

[**ax25**(4)](/ax25/4.md), [**netrom**(4)](/netrom/4.md), [**rose**(4)](/rose/4.md)
