xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/netrose/rose.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
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, write to the Free
17    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18    02111-1307 USA.  */
19 
20 /* What follows is copied from the 2.1.93 <linux/rose.h>.  */
21 
22 #ifndef _NETROSE_ROSE_H
23 #define _NETROSE_ROSE_H 1
24 
25 /* Socket level values.  */
26 #define SOL_ROSE        260
27 
28 
29 /* These are the public elements of the Linux kernel Rose
30    implementation.  For kernel AX.25 see the file ax25.h. This file
31    requires ax25.h for the definition of the ax25_address structure.  */
32 #define ROSE_MTU	251
33 
34 #define ROSE_MAX_DIGIS	6
35 
36 #define	ROSE_DEFER	1
37 #define	ROSE_T1		2
38 #define	ROSE_T2		3
39 #define	ROSE_T3		4
40 #define	ROSE_IDLE	5
41 #define	ROSE_QBITINCL	6
42 #define	ROSE_HOLDBACK	7
43 
44 #define	SIOCRSGCAUSE		(SIOCPROTOPRIVATE + 0)
45 #define	SIOCRSSCAUSE		(SIOCPROTOPRIVATE + 1)
46 #define	SIOCRSL2CALL		(SIOCPROTOPRIVATE + 2)
47 #define	SIOCRSSL2CALL		(SIOCPROTOPRIVATE + 2)
48 #define	SIOCRSACCEPT		(SIOCPROTOPRIVATE + 3)
49 #define	SIOCRSCLRRT		(SIOCPROTOPRIVATE + 4)
50 #define	SIOCRSGL2CALL		(SIOCPROTOPRIVATE + 5)
51 #define	SIOCRSGFACILITIES	(SIOCPROTOPRIVATE + 6)
52 
53 #define	ROSE_DTE_ORIGINATED	0x00
54 #define	ROSE_NUMBER_BUSY	0x01
55 #define	ROSE_INVALID_FACILITY	0x03
56 #define	ROSE_NETWORK_CONGESTION	0x05
57 #define	ROSE_OUT_OF_ORDER	0x09
58 #define	ROSE_ACCESS_BARRED	0x0B
59 #define	ROSE_NOT_OBTAINABLE	0x0D
60 #define	ROSE_REMOTE_PROCEDURE	0x11
61 #define	ROSE_LOCAL_PROCEDURE	0x13
62 #define	ROSE_SHIP_ABSENT	0x39
63 
64 
65 typedef struct
66 {
67   char rose_addr[5];
68 } rose_address;
69 
70 struct sockaddr_rose
71 {
72   sa_family_t srose_family;
73   rose_address srose_addr;
74   ax25_address srose_call;
75   int srose_ndigis;
76   ax25_address	srose_digi;
77 };
78 
79 struct full_sockaddr_rose
80 {
81   sa_family_t srose_family;
82   rose_address srose_addr;
83   ax25_address srose_call;
84   unsigned int srose_ndigis;
85   ax25_address srose_digis[ROSE_MAX_DIGIS];
86 };
87 
88 struct rose_route_struct
89 {
90   rose_address address;
91   unsigned short int mask;
92   ax25_address	neighbour;
93   char device[16];
94   unsigned char	ndigis;
95   ax25_address digipeaters[AX25_MAX_DIGIS];
96 };
97 
98 struct rose_cause_struct
99 {
100   unsigned char	cause;
101   unsigned char	diagnostic;
102 };
103 
104 struct rose_facilities_struct
105 {
106   rose_address source_addr,   dest_addr;
107   ax25_address source_call,   dest_call;
108   unsigned char source_ndigis, dest_ndigis;
109   ax25_address source_digis[ROSE_MAX_DIGIS];
110   ax25_address dest_digis[ROSE_MAX_DIGIS];
111   unsigned int rand;
112   rose_address fail_addr;
113   ax25_address fail_call;
114 };
115 
116 #endif	/* netrose/rose.h */
117