Debian Codegraph @

ax25.3

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 .TH INET 3 "2008-Feb-04" "Linux" "Linux Programmer's Manual"
2 .SH NAME
3 .B ax25_aton, ax25_aton_entry, ax25_aton_arglist,
4 .B ax25_ntoa, ax25_cmp, ax25_validate
5 \- AX25 Address manipulation routines
6 .SH SYNOPSIS
7 .nf
8 .B #include <netax25/ax25.h>
9 .PP
10 .BI "int ax25_aton(const char *" cp ", struct full_sockaddr_ax25 *" fsap ");"
11 .PP
12 .BI "int ax25_aton_arglist(const char **" cp ", struct full_sockaddr_ax25 *" fsap ");"
13 .PP
14 .BI "int ax25_aton_entry(const char *" cp ", char *" axp ");"
15 .PP
16 .BI "char *ax25_ntoa(ax25_address *" axp ");"
17 .PP
18 .BI "int ax25_cmp(ax25_address *" ax1 ", ax25_address *" ax2 ");"
19 .PP
20 .BI "int ax25_validate(char *" axp ");"
21 .PP
22 .BI "char *ax25_config_file(const char *filename);"
23 .fi
24
25 .SH DESCRIPTION
26 .BR ax25_aton ()
27 takes the ASCII string
28 .I cp
29 that is in the format
30 .I callsign
31 .RI [[ V | VIA ] callsign "...]"
32 and stores it in
33 .I fsap
34 in network format.
35 .PP
36 .BR ax25_aton_entry ()
37 takes the ASCII string of a callsign
38 .I cp
39 and stores it in network format in
40 .I axp.
41 .PP
42 The
43 .BR ax25_aton_arglist ()
44 takes a NULL terminated array of strings
45 .I cp
46 and stores it in
47 .I fsap
48 in network format.
49 .PP
50 The
51 .BR ax25_ntoa ()
52 takes a network format address
53 .I axp
54 and returns the ASCII representation.
55 The string is returned in a statically allocated buffer, which
56 subsequent calls will overwrite.
57 .PP
58 The
59 .BR ax25_cmp ()
60 function compares the two ax25 addresses,
61 .I ax1
62 and
63 .IR ax2 ,
64 that are in network format and determines wether they are identical,
65 differ only by their SSIDs or are different.
66 .PP
67 The
68 .BR ax25_validate ()
69 function checks to see if the address
70 .I axp
71 in network format is a correctly formatted address.
72 .SH "RETURN VALUE"
73 The
74 .BR ax25_aton () and
75 .BR ax25_aton_arglist ()
76 functions return -1 if an error occurs otherwise the length of
77 the returned structure.
78 .PP
79 The
80 .BR ax25_aton_entry ()
81 function returns -1 if an error occurs otherwise zero.
82 .PP
83 The
84 .BR ax25_cmp ()
85 function returns 0 if the two addresses are identical, 1 if they are
86 different or 2 is only the SSIDs are different.
87 .PP
88 The
89 .BR ax25_validate ()
90 function returns TRUE if the callsign is valid or FALSE if it is not.
91 .SH "SEE ALSO"
92 .BR ax25 "(4), " netrom "(4), " rose "(4)"