Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef ROSE_KERNEL_H |
| 8 | #define ROSE_KERNEL_H |
| 9 | #include <linux/socket.h> |
| 10 | #include <linux/ax25.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define ROSE_MTU 251 |
| 12 | #define ROSE_MAX_DIGIS 6 |
| 13 | #define ROSE_DEFER 1 |
| 14 | #define ROSE_T1 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define ROSE_T2 3 |
| 16 | #define ROSE_T3 4 |
| 17 | #define ROSE_IDLE 5 |
| 18 | #define ROSE_QBITINCL 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | #define ROSE_HOLDBACK 7 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 20 | #define SIOCRSGCAUSE (SIOCPROTOPRIVATE + 0) |
| 21 | #define SIOCRSSCAUSE (SIOCPROTOPRIVATE + 1) |
| 22 | #define SIOCRSL2CALL (SIOCPROTOPRIVATE + 2) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | #define SIOCRSSL2CALL (SIOCPROTOPRIVATE + 2) |
| 24 | #define SIOCRSACCEPT (SIOCPROTOPRIVATE + 3) |
| 25 | #define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4) |
| 26 | #define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | #define SIOCRSGFACILITIES (SIOCPROTOPRIVATE + 6) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | #define ROSE_DTE_ORIGINATED 0x00 |
| 29 | #define ROSE_NUMBER_BUSY 0x01 |
| 30 | #define ROSE_INVALID_FACILITY 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define ROSE_NETWORK_CONGESTION 0x05 |
| 32 | #define ROSE_OUT_OF_ORDER 0x09 |
| 33 | #define ROSE_ACCESS_BARRED 0x0B |
| 34 | #define ROSE_NOT_OBTAINABLE 0x0D |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define ROSE_REMOTE_PROCEDURE 0x11 |
| 36 | #define ROSE_LOCAL_PROCEDURE 0x13 |
| 37 | #define ROSE_SHIP_ABSENT 0x39 |
| 38 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | char rose_addr[5]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | } rose_address; |
| 41 | struct sockaddr_rose { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 42 | __kernel_sa_family_t srose_family; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | rose_address srose_addr; |
| 44 | ax25_address srose_call; |
| 45 | int srose_ndigis; |
| 46 | ax25_address srose_digi; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | }; |
| 48 | struct full_sockaddr_rose { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 49 | __kernel_sa_family_t srose_family; |
| 50 | rose_address srose_addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | ax25_address srose_call; |
| 52 | unsigned int srose_ndigis; |
| 53 | ax25_address srose_digis[ROSE_MAX_DIGIS]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | struct rose_route_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | rose_address address; |
| 57 | unsigned short mask; |
| 58 | ax25_address neighbour; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | char device[16]; |
| 60 | unsigned char ndigis; |
| 61 | ax25_address digipeaters[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 rose_cause_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 64 | unsigned char cause; |
| 65 | unsigned char diagnostic; |
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_facilities_struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 68 | rose_address source_addr, dest_addr; |
| 69 | ax25_address source_call, dest_call; |
| 70 | unsigned char source_ndigis, dest_ndigis; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | ax25_address source_digis[ROSE_MAX_DIGIS]; |
| 72 | ax25_address dest_digis[ROSE_MAX_DIGIS]; |
| 73 | unsigned int rand; |
| 74 | rose_address fail_addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | ax25_address fail_call; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | }; |
| 77 | #endif |