1 /* Definitions for Rose packet radio address family. 2 Copyright (C) 1998, 1999 Free Software Foundation, Inc. 3 This file is part of the GNU C Library. 4 5 The GNU C Library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 The GNU C Library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with the GNU C Library; if not, see 17 <http://www.gnu.org/licenses/>. */ 18 19 /* What follows is copied from the 2.1.93 <linux/rose.h>. */ 20 21 #ifndef _NETROSE_ROSE_H 22 #define _NETROSE_ROSE_H 1 23 24 /* Socket level values. */ 25 #define SOL_ROSE 260 26 27 28 /* These are the public elements of the Linux kernel Rose 29 implementation. For kernel AX.25 see the file ax25.h. This file 30 requires ax25.h for the definition of the ax25_address structure. */ 31 #define ROSE_MTU 251 32 33 #define ROSE_MAX_DIGIS 6 34 35 #define ROSE_DEFER 1 36 #define ROSE_T1 2 37 #define ROSE_T2 3 38 #define ROSE_T3 4 39 #define ROSE_IDLE 5 40 #define ROSE_QBITINCL 6 41 #define ROSE_HOLDBACK 7 42 43 #define SIOCRSGCAUSE (SIOCPROTOPRIVATE + 0) 44 #define SIOCRSSCAUSE (SIOCPROTOPRIVATE + 1) 45 #define SIOCRSL2CALL (SIOCPROTOPRIVATE + 2) 46 #define SIOCRSSL2CALL (SIOCPROTOPRIVATE + 2) 47 #define SIOCRSACCEPT (SIOCPROTOPRIVATE + 3) 48 #define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4) 49 #define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5) 50 #define SIOCRSGFACILITIES (SIOCPROTOPRIVATE + 6) 51 52 #define ROSE_DTE_ORIGINATED 0x00 53 #define ROSE_NUMBER_BUSY 0x01 54 #define ROSE_INVALID_FACILITY 0x03 55 #define ROSE_NETWORK_CONGESTION 0x05 56 #define ROSE_OUT_OF_ORDER 0x09 57 #define ROSE_ACCESS_BARRED 0x0B 58 #define ROSE_NOT_OBTAINABLE 0x0D 59 #define ROSE_REMOTE_PROCEDURE 0x11 60 #define ROSE_LOCAL_PROCEDURE 0x13 61 #define ROSE_SHIP_ABSENT 0x39 62 63 64 typedef struct 65 { 66 char rose_addr[5]; 67 } rose_address; 68 69 struct sockaddr_rose 70 { 71 sa_family_t srose_family; 72 rose_address srose_addr; 73 ax25_address srose_call; 74 int srose_ndigis; 75 ax25_address srose_digi; 76 }; 77 78 struct full_sockaddr_rose 79 { 80 sa_family_t srose_family; 81 rose_address srose_addr; 82 ax25_address srose_call; 83 unsigned int srose_ndigis; 84 ax25_address srose_digis[ROSE_MAX_DIGIS]; 85 }; 86 87 struct rose_route_struct 88 { 89 rose_address address; 90 unsigned short int mask; 91 ax25_address neighbour; 92 char device[16]; 93 unsigned char ndigis; 94 ax25_address digipeaters[AX25_MAX_DIGIS]; 95 }; 96 97 struct rose_cause_struct 98 { 99 unsigned char cause; 100 unsigned char diagnostic; 101 }; 102 103 struct rose_facilities_struct 104 { 105 rose_address source_addr, dest_addr; 106 ax25_address source_call, dest_call; 107 unsigned char source_ndigis, dest_ndigis; 108 ax25_address source_digis[ROSE_MAX_DIGIS]; 109 ax25_address dest_digis[ROSE_MAX_DIGIS]; 110 unsigned int rand; 111 rose_address fail_addr; 112 ax25_address fail_call; 113 }; 114 115 #endif /* netrose/rose.h */ 116