1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 /* 2 /* 3 * These are the public elements of the Linux 3 * These are the public elements of the Linux kernel AX.25 code. A similar 4 * file netrom.h exists for the NET/ROM protoc 4 * file netrom.h exists for the NET/ROM protocol. 5 */ 5 */ 6 6 7 #ifndef AX25_KERNEL_H 7 #ifndef AX25_KERNEL_H 8 #define AX25_KERNEL_H 8 #define AX25_KERNEL_H 9 9 10 #include <linux/socket.h> 10 #include <linux/socket.h> 11 11 12 #define AX25_MTU 256 12 #define AX25_MTU 256 13 #define AX25_MAX_DIGIS 8 13 #define AX25_MAX_DIGIS 8 14 14 15 #define AX25_WINDOW 1 15 #define AX25_WINDOW 1 16 #define AX25_T1 2 16 #define AX25_T1 2 17 #define AX25_N2 3 17 #define AX25_N2 3 18 #define AX25_T3 4 18 #define AX25_T3 4 19 #define AX25_T2 5 19 #define AX25_T2 5 20 #define AX25_BACKOFF 6 20 #define AX25_BACKOFF 6 21 #define AX25_EXTSEQ 7 21 #define AX25_EXTSEQ 7 22 #define AX25_PIDINCL 8 22 #define AX25_PIDINCL 8 23 #define AX25_IDLE 9 23 #define AX25_IDLE 9 24 #define AX25_PACLEN 10 24 #define AX25_PACLEN 10 25 #define AX25_IAMDIGI 12 25 #define AX25_IAMDIGI 12 26 26 27 #define AX25_KILL 99 27 #define AX25_KILL 99 28 28 29 #define SIOCAX25GETUID (SIOCPROTOPRIV 29 #define SIOCAX25GETUID (SIOCPROTOPRIVATE+0) 30 #define SIOCAX25ADDUID (SIOCPROTOPRIV 30 #define SIOCAX25ADDUID (SIOCPROTOPRIVATE+1) 31 #define SIOCAX25DELUID (SIOCPROTOPRIV 31 #define SIOCAX25DELUID (SIOCPROTOPRIVATE+2) 32 #define SIOCAX25NOUID (SIOCPROTOPRIV 32 #define SIOCAX25NOUID (SIOCPROTOPRIVATE+3) 33 #define SIOCAX25OPTRT (SIOCPROTOPRIV 33 #define SIOCAX25OPTRT (SIOCPROTOPRIVATE+7) 34 #define SIOCAX25CTLCON (SIOCPROTOPRIV 34 #define SIOCAX25CTLCON (SIOCPROTOPRIVATE+8) 35 #define SIOCAX25GETINFOOLD (SIOCPROTOPRIV 35 #define SIOCAX25GETINFOOLD (SIOCPROTOPRIVATE+9) 36 #define SIOCAX25ADDFWD (SIOCPROTOPRIV 36 #define SIOCAX25ADDFWD (SIOCPROTOPRIVATE+10) 37 #define SIOCAX25DELFWD (SIOCPROTOPRIV 37 #define SIOCAX25DELFWD (SIOCPROTOPRIVATE+11) 38 #define SIOCAX25DEVCTL (SIOCPROTOPRIV 38 #define SIOCAX25DEVCTL (SIOCPROTOPRIVATE+12) 39 #define SIOCAX25GETINFO (SIOCPROTOPRIV 39 #define SIOCAX25GETINFO (SIOCPROTOPRIVATE+13) 40 40 41 #define AX25_SET_RT_IPMODE 2 41 #define AX25_SET_RT_IPMODE 2 42 42 43 #define AX25_NOUID_DEFAULT 0 43 #define AX25_NOUID_DEFAULT 0 44 #define AX25_NOUID_BLOCK 1 44 #define AX25_NOUID_BLOCK 1 45 45 46 typedef struct { 46 typedef struct { 47 char ax25_call[7]; /* 6 c 47 char ax25_call[7]; /* 6 call + SSID (shifted ascii!) */ 48 } ax25_address; 48 } ax25_address; 49 49 50 struct sockaddr_ax25 { 50 struct sockaddr_ax25 { 51 __kernel_sa_family_t sax25_family; 51 __kernel_sa_family_t sax25_family; 52 ax25_address sax25_call; 52 ax25_address sax25_call; 53 int sax25_ndigis; 53 int sax25_ndigis; 54 /* Digipeater ax25_address sets follow 54 /* Digipeater ax25_address sets follow */ 55 }; 55 }; 56 56 57 #define sax25_uid sax25_ndigis 57 #define sax25_uid sax25_ndigis 58 58 59 struct full_sockaddr_ax25 { 59 struct full_sockaddr_ax25 { 60 struct sockaddr_ax25 fsa_ax25; 60 struct sockaddr_ax25 fsa_ax25; 61 ax25_address fsa_digipeater[AX25_MA 61 ax25_address fsa_digipeater[AX25_MAX_DIGIS]; 62 }; 62 }; 63 63 64 struct ax25_routes_struct { 64 struct ax25_routes_struct { 65 ax25_address port_addr; 65 ax25_address port_addr; 66 ax25_address dest_addr; 66 ax25_address dest_addr; 67 unsigned char digi_count; 67 unsigned char digi_count; 68 ax25_address digi_addr[AX25_MAX_DIG 68 ax25_address digi_addr[AX25_MAX_DIGIS]; 69 }; 69 }; 70 70 71 struct ax25_route_opt_struct { 71 struct ax25_route_opt_struct { 72 ax25_address port_addr; 72 ax25_address port_addr; 73 ax25_address dest_addr; 73 ax25_address dest_addr; 74 int cmd; 74 int cmd; 75 int arg; 75 int arg; 76 }; 76 }; 77 77 78 struct ax25_ctl_struct { 78 struct ax25_ctl_struct { 79 ax25_address port_addr; 79 ax25_address port_addr; 80 ax25_address source_addr; 80 ax25_address source_addr; 81 ax25_address dest_addr; 81 ax25_address dest_addr; 82 unsigned int cmd; 82 unsigned int cmd; 83 unsigned long arg; 83 unsigned long arg; 84 unsigned char digi_count; 84 unsigned char digi_count; 85 ax25_address digi_addr[AX25 85 ax25_address digi_addr[AX25_MAX_DIGIS]; 86 }; 86 }; 87 87 88 /* this will go away. Please do not export to 88 /* this will go away. Please do not export to user land */ 89 struct ax25_info_struct_deprecated { 89 struct ax25_info_struct_deprecated { 90 unsigned int n2, n2count; 90 unsigned int n2, n2count; 91 unsigned int t1, t1timer; 91 unsigned int t1, t1timer; 92 unsigned int t2, t2timer; 92 unsigned int t2, t2timer; 93 unsigned int t3, t3timer; 93 unsigned int t3, t3timer; 94 unsigned int idle, idletimer; 94 unsigned int idle, idletimer; 95 unsigned int state; 95 unsigned int state; 96 unsigned int rcv_q, snd_q; 96 unsigned int rcv_q, snd_q; 97 }; 97 }; 98 98 99 struct ax25_info_struct { 99 struct ax25_info_struct { 100 unsigned int n2, n2count; 100 unsigned int n2, n2count; 101 unsigned int t1, t1timer; 101 unsigned int t1, t1timer; 102 unsigned int t2, t2timer; 102 unsigned int t2, t2timer; 103 unsigned int t3, t3timer; 103 unsigned int t3, t3timer; 104 unsigned int idle, idletimer; 104 unsigned int idle, idletimer; 105 unsigned int state; 105 unsigned int state; 106 unsigned int rcv_q, snd_q; 106 unsigned int rcv_q, snd_q; 107 unsigned int vs, vr, va, vs_max; 107 unsigned int vs, vr, va, vs_max; 108 unsigned int paclen; 108 unsigned int paclen; 109 unsigned int window; 109 unsigned int window; 110 }; 110 }; 111 111 112 struct ax25_fwd_struct { 112 struct ax25_fwd_struct { 113 ax25_address port_from; 113 ax25_address port_from; 114 ax25_address port_to; 114 ax25_address port_to; 115 }; 115 }; 116 116 117 #endif 117 #endif 118 118
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.