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 Rose implementation. 4 * For kernel AX.25 see the file ax25.h. This 4 * For kernel AX.25 see the file ax25.h. This file requires ax25.h for the 5 * definition of the ax25_address structure. 5 * definition of the ax25_address structure. 6 */ 6 */ 7 7 8 #ifndef ROSE_KERNEL_H 8 #ifndef ROSE_KERNEL_H 9 #define ROSE_KERNEL_H 9 #define ROSE_KERNEL_H 10 10 11 #include <linux/socket.h> 11 #include <linux/socket.h> 12 #include <linux/ax25.h> 12 #include <linux/ax25.h> 13 13 14 #define ROSE_MTU 251 14 #define ROSE_MTU 251 15 15 16 #define ROSE_MAX_DIGIS 6 16 #define ROSE_MAX_DIGIS 6 17 17 18 #define ROSE_DEFER 1 18 #define ROSE_DEFER 1 19 #define ROSE_T1 2 19 #define ROSE_T1 2 20 #define ROSE_T2 3 20 #define ROSE_T2 3 21 #define ROSE_T3 4 21 #define ROSE_T3 4 22 #define ROSE_IDLE 5 22 #define ROSE_IDLE 5 23 #define ROSE_QBITINCL 6 23 #define ROSE_QBITINCL 6 24 #define ROSE_HOLDBACK 7 24 #define ROSE_HOLDBACK 7 25 25 26 #define SIOCRSGCAUSE (SIOCPROTOPRIV 26 #define SIOCRSGCAUSE (SIOCPROTOPRIVATE+0) 27 #define SIOCRSSCAUSE (SIOCPROTOPRIV 27 #define SIOCRSSCAUSE (SIOCPROTOPRIVATE+1) 28 #define SIOCRSL2CALL (SIOCPROTOPRIV 28 #define SIOCRSL2CALL (SIOCPROTOPRIVATE+2) 29 #define SIOCRSSL2CALL (SIOCPROTOPRIV 29 #define SIOCRSSL2CALL (SIOCPROTOPRIVATE+2) 30 #define SIOCRSACCEPT (SIOCPROTOPRIV 30 #define SIOCRSACCEPT (SIOCPROTOPRIVATE+3) 31 #define SIOCRSCLRRT (SIOCPROTOPRIV 31 #define SIOCRSCLRRT (SIOCPROTOPRIVATE+4) 32 #define SIOCRSGL2CALL (SIOCPROTOPRIV 32 #define SIOCRSGL2CALL (SIOCPROTOPRIVATE+5) 33 #define SIOCRSGFACILITIES (SIOCPROTOPRIV 33 #define SIOCRSGFACILITIES (SIOCPROTOPRIVATE+6) 34 34 35 #define ROSE_DTE_ORIGINATED 0x00 35 #define ROSE_DTE_ORIGINATED 0x00 36 #define ROSE_NUMBER_BUSY 0x01 36 #define ROSE_NUMBER_BUSY 0x01 37 #define ROSE_INVALID_FACILITY 0x03 37 #define ROSE_INVALID_FACILITY 0x03 38 #define ROSE_NETWORK_CONGESTION 0x05 38 #define ROSE_NETWORK_CONGESTION 0x05 39 #define ROSE_OUT_OF_ORDER 0x09 39 #define ROSE_OUT_OF_ORDER 0x09 40 #define ROSE_ACCESS_BARRED 0x0B 40 #define ROSE_ACCESS_BARRED 0x0B 41 #define ROSE_NOT_OBTAINABLE 0x0D 41 #define ROSE_NOT_OBTAINABLE 0x0D 42 #define ROSE_REMOTE_PROCEDURE 0x11 42 #define ROSE_REMOTE_PROCEDURE 0x11 43 #define ROSE_LOCAL_PROCEDURE 0x13 43 #define ROSE_LOCAL_PROCEDURE 0x13 44 #define ROSE_SHIP_ABSENT 0x39 44 #define ROSE_SHIP_ABSENT 0x39 45 45 46 typedef struct { 46 typedef struct { 47 char rose_addr[5]; 47 char rose_addr[5]; 48 } rose_address; 48 } rose_address; 49 49 50 struct sockaddr_rose { 50 struct sockaddr_rose { 51 __kernel_sa_family_t srose_family; 51 __kernel_sa_family_t srose_family; 52 rose_address srose_addr; 52 rose_address srose_addr; 53 ax25_address srose_call; 53 ax25_address srose_call; 54 int srose_ndigis; 54 int srose_ndigis; 55 ax25_address srose_digi; 55 ax25_address srose_digi; 56 }; 56 }; 57 57 58 struct full_sockaddr_rose { 58 struct full_sockaddr_rose { 59 __kernel_sa_family_t srose_family; 59 __kernel_sa_family_t srose_family; 60 rose_address srose_addr; 60 rose_address srose_addr; 61 ax25_address srose_call; 61 ax25_address srose_call; 62 unsigned int srose_ndigis; 62 unsigned int srose_ndigis; 63 ax25_address srose_digis[ROSE_MAX_D 63 ax25_address srose_digis[ROSE_MAX_DIGIS]; 64 }; 64 }; 65 65 66 struct rose_route_struct { 66 struct rose_route_struct { 67 rose_address address; 67 rose_address address; 68 unsigned short mask; 68 unsigned short mask; 69 ax25_address neighbour; 69 ax25_address neighbour; 70 char device[16]; 70 char device[16]; 71 unsigned char ndigis; 71 unsigned char ndigis; 72 ax25_address digipeaters[AX25_MAX_D 72 ax25_address digipeaters[AX25_MAX_DIGIS]; 73 }; 73 }; 74 74 75 struct rose_cause_struct { 75 struct rose_cause_struct { 76 unsigned char cause; 76 unsigned char cause; 77 unsigned char diagnostic; 77 unsigned char diagnostic; 78 }; 78 }; 79 79 80 struct rose_facilities_struct { 80 struct rose_facilities_struct { 81 rose_address source_addr, dest_ad 81 rose_address source_addr, dest_addr; 82 ax25_address source_call, dest_ca 82 ax25_address source_call, dest_call; 83 unsigned char source_ndigis, dest_nd 83 unsigned char source_ndigis, dest_ndigis; 84 ax25_address source_digis[ROSE_MAX_ 84 ax25_address source_digis[ROSE_MAX_DIGIS]; 85 ax25_address dest_digis[ROSE_MAX_DI 85 ax25_address dest_digis[ROSE_MAX_DIGIS]; 86 unsigned int rand; 86 unsigned int rand; 87 rose_address fail_addr; 87 rose_address fail_addr; 88 ax25_address fail_call; 88 ax25_address fail_call; 89 }; 89 }; 90 90 91 #endif 91 #endif 92 92
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.