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