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 ROSE_KERNEL_H |
| 20 | #define ROSE_KERNEL_H |
| 21 | #include <linux/socket.h> |
| 22 | #include <linux/ax25.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define ROSE_MTU 251 |
| 24 | #define ROSE_MAX_DIGIS 6 |
| 25 | #define ROSE_DEFER 1 |
| 26 | #define ROSE_T1 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define ROSE_T2 3 |
| 28 | #define ROSE_T3 4 |
| 29 | #define ROSE_IDLE 5 |
| 30 | #define ROSE_QBITINCL 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define ROSE_HOLDBACK 7 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 32 | #define SIOCRSGCAUSE (SIOCPROTOPRIVATE + 0) |
| 33 | #define SIOCRSSCAUSE (SIOCPROTOPRIVATE + 1) |
| 34 | #define SIOCRSL2CALL (SIOCPROTOPRIVATE + 2) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | #define SIOCRSSL2CALL (SIOCPROTOPRIVATE + 2) |
| 36 | #define SIOCRSACCEPT (SIOCPROTOPRIVATE + 3) |
| 37 | #define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4) |
| 38 | #define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | #define SIOCRSGFACILITIES (SIOCPROTOPRIVATE + 6) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | #define ROSE_DTE_ORIGINATED 0x00 |
| 41 | #define ROSE_NUMBER_BUSY 0x01 |
| 42 | #define ROSE_INVALID_FACILITY 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define ROSE_NETWORK_CONGESTION 0x05 |
| 44 | #define ROSE_OUT_OF_ORDER 0x09 |
| 45 | #define ROSE_ACCESS_BARRED 0x0B |
| 46 | #define ROSE_NOT_OBTAINABLE 0x0D |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define ROSE_REMOTE_PROCEDURE 0x11 |
| 48 | #define ROSE_LOCAL_PROCEDURE 0x13 |
| 49 | #define ROSE_SHIP_ABSENT 0x39 |
| 50 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | char rose_addr[5]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | } rose_address; |
| 53 | struct sockaddr_rose { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 | __kernel_sa_family_t srose_family; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | rose_address srose_addr; |
| 56 | ax25_address srose_call; |
| 57 | int srose_ndigis; |
| 58 | ax25_address srose_digi; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | }; |
| 60 | struct full_sockaddr_rose { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 61 | __kernel_sa_family_t srose_family; |
| 62 | rose_address srose_addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | ax25_address srose_call; |
| 64 | unsigned int srose_ndigis; |
| 65 | ax25_address srose_digis[ROSE_MAX_DIGIS]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 66 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | struct rose_route_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 68 | rose_address address; |
| 69 | unsigned short mask; |
| 70 | ax25_address neighbour; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | char device[16]; |
| 72 | unsigned char ndigis; |
| 73 | ax25_address digipeaters[AX25_MAX_DIGIS]; |
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 rose_cause_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | unsigned char cause; |
| 77 | unsigned char diagnostic; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 79 | struct rose_facilities_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 80 | rose_address source_addr, dest_addr; |
| 81 | ax25_address source_call, dest_call; |
| 82 | unsigned char source_ndigis, dest_ndigis; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | ax25_address source_digis[ROSE_MAX_DIGIS]; |
| 84 | ax25_address dest_digis[ROSE_MAX_DIGIS]; |
| 85 | unsigned int rand; |
| 86 | rose_address fail_addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | ax25_address fail_call; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | }; |
| 89 | #endif |