Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef AX25_KERNEL_H |
| 20 | #define AX25_KERNEL_H |
| 21 | #include <linux/socket.h> |
| 22 | #define AX25_MTU 256 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define AX25_MAX_DIGIS 8 |
| 24 | #define AX25_WINDOW 1 |
| 25 | #define AX25_T1 2 |
| 26 | #define AX25_N2 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define AX25_T3 4 |
| 28 | #define AX25_T2 5 |
| 29 | #define AX25_BACKOFF 6 |
| 30 | #define AX25_EXTSEQ 7 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define AX25_PIDINCL 8 |
| 32 | #define AX25_IDLE 9 |
| 33 | #define AX25_PACLEN 10 |
| 34 | #define AX25_IAMDIGI 12 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define AX25_KILL 99 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 | #define SIOCAX25GETUID (SIOCPROTOPRIVATE + 0) |
| 37 | #define SIOCAX25ADDUID (SIOCPROTOPRIVATE + 1) |
| 38 | #define SIOCAX25DELUID (SIOCPROTOPRIVATE + 2) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | #define SIOCAX25NOUID (SIOCPROTOPRIVATE + 3) |
| 40 | #define SIOCAX25OPTRT (SIOCPROTOPRIVATE + 7) |
| 41 | #define SIOCAX25CTLCON (SIOCPROTOPRIVATE + 8) |
| 42 | #define SIOCAX25GETINFOOLD (SIOCPROTOPRIVATE + 9) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | #define SIOCAX25ADDFWD (SIOCPROTOPRIVATE + 10) |
| 44 | #define SIOCAX25DELFWD (SIOCPROTOPRIVATE + 11) |
| 45 | #define SIOCAX25DEVCTL (SIOCPROTOPRIVATE + 12) |
| 46 | #define SIOCAX25GETINFO (SIOCPROTOPRIVATE + 13) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define AX25_SET_RT_IPMODE 2 |
| 48 | #define AX25_NOUID_DEFAULT 0 |
| 49 | #define AX25_NOUID_BLOCK 1 |
| 50 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | char ax25_call[7]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | } ax25_address; |
| 53 | struct sockaddr_ax25 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 | __kernel_sa_family_t sax25_family; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | ax25_address sax25_call; |
| 56 | int sax25_ndigis; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | }; |
| 58 | #define sax25_uid sax25_ndigis |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | struct full_sockaddr_ax25 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 | struct sockaddr_ax25 fsa_ax25; |
| 61 | ax25_address fsa_digipeater[AX25_MAX_DIGIS]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | struct ax25_routes_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 64 | ax25_address port_addr; |
| 65 | ax25_address dest_addr; |
| 66 | unsigned char digi_count; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | ax25_address digi_addr[AX25_MAX_DIGIS]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | }; |
| 69 | struct ax25_route_opt_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 70 | ax25_address port_addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | ax25_address dest_addr; |
| 72 | int cmd; |
| 73 | int arg; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | struct ax25_ctl_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | ax25_address port_addr; |
| 77 | ax25_address source_addr; |
| 78 | ax25_address dest_addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | unsigned int cmd; |
| 80 | unsigned long arg; |
| 81 | unsigned char digi_count; |
| 82 | ax25_address digi_addr[AX25_MAX_DIGIS]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | }; |
| 84 | struct ax25_info_struct_deprecated { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 85 | unsigned int n2, n2count; |
| 86 | unsigned int t1, t1timer; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | unsigned int t2, t2timer; |
| 88 | unsigned int t3, t3timer; |
| 89 | unsigned int idle, idletimer; |
| 90 | unsigned int state; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | unsigned int rcv_q, snd_q; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 92 | }; |
| 93 | struct ax25_info_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 94 | unsigned int n2, n2count; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | unsigned int t1, t1timer; |
| 96 | unsigned int t2, t2timer; |
| 97 | unsigned int t3, t3timer; |
| 98 | unsigned int idle, idletimer; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | unsigned int state; |
| 100 | unsigned int rcv_q, snd_q; |
| 101 | unsigned int vs, vr, va, vs_max; |
| 102 | unsigned int paclen; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 103 | unsigned int window; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 104 | }; |
| 105 | struct ax25_fwd_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 106 | ax25_address port_from; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 107 | ax25_address port_to; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | }; |
| 109 | #endif |