Back to index

glibc  2.9
rose.h
Go to the documentation of this file.
00001 /* Definitions for Rose packet radio address family.
00002    Copyright (C) 1998, 1999 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 /* What follows is copied from the 2.1.93 <linux/rose.h>.  */
00021 
00022 #ifndef _NETROSE_ROSE_H
00023 #define _NETROSE_ROSE_H 1
00024 
00025 /* Socket level values.  */
00026 #define SOL_ROSE        260
00027 
00028 
00029 /* These are the public elements of the Linux kernel Rose
00030    implementation.  For kernel AX.25 see the file ax25.h. This file
00031    requires ax25.h for the definition of the ax25_address structure.  */
00032 #define ROSE_MTU     251
00033 
00034 #define ROSE_MAX_DIGIS      6
00035 
00036 #define       ROSE_DEFER    1
00037 #define       ROSE_T1              2
00038 #define       ROSE_T2              3
00039 #define       ROSE_T3              4
00040 #define       ROSE_IDLE     5
00041 #define       ROSE_QBITINCL 6
00042 #define       ROSE_HOLDBACK 7
00043 
00044 #define       SIOCRSGCAUSE         (SIOCPROTOPRIVATE + 0)
00045 #define       SIOCRSSCAUSE         (SIOCPROTOPRIVATE + 1)
00046 #define       SIOCRSL2CALL         (SIOCPROTOPRIVATE + 2)
00047 #define       SIOCRSSL2CALL        (SIOCPROTOPRIVATE + 2)
00048 #define       SIOCRSACCEPT         (SIOCPROTOPRIVATE + 3)
00049 #define       SIOCRSCLRRT          (SIOCPROTOPRIVATE + 4)
00050 #define       SIOCRSGL2CALL        (SIOCPROTOPRIVATE + 5)
00051 #define       SIOCRSGFACILITIES    (SIOCPROTOPRIVATE + 6)
00052 
00053 #define       ROSE_DTE_ORIGINATED  0x00
00054 #define       ROSE_NUMBER_BUSY     0x01
00055 #define       ROSE_INVALID_FACILITY       0x03
00056 #define       ROSE_NETWORK_CONGESTION     0x05
00057 #define       ROSE_OUT_OF_ORDER    0x09
00058 #define       ROSE_ACCESS_BARRED   0x0B
00059 #define       ROSE_NOT_OBTAINABLE  0x0D
00060 #define       ROSE_REMOTE_PROCEDURE       0x11
00061 #define       ROSE_LOCAL_PROCEDURE 0x13
00062 #define       ROSE_SHIP_ABSENT     0x39
00063 
00064 
00065 typedef struct
00066 {
00067   char rose_addr[5];
00068 } rose_address;
00069 
00070 struct sockaddr_rose
00071 {
00072   sa_family_t srose_family;
00073   rose_address srose_addr;
00074   ax25_address srose_call;
00075   int srose_ndigis;
00076   ax25_address       srose_digi;
00077 };
00078 
00079 struct full_sockaddr_rose
00080 {
00081   sa_family_t srose_family;
00082   rose_address srose_addr;
00083   ax25_address srose_call;
00084   unsigned int srose_ndigis;
00085   ax25_address srose_digis[ROSE_MAX_DIGIS];
00086 };
00087 
00088 struct rose_route_struct
00089 {
00090   rose_address address;
00091   unsigned short int mask;
00092   ax25_address       neighbour;
00093   char device[16];
00094   unsigned char      ndigis;
00095   ax25_address digipeaters[AX25_MAX_DIGIS];
00096 };
00097 
00098 struct rose_cause_struct
00099 {
00100   unsigned char      cause;
00101   unsigned char      diagnostic;
00102 };
00103 
00104 struct rose_facilities_struct
00105 {
00106   rose_address source_addr,   dest_addr;
00107   ax25_address source_call,   dest_call;
00108   unsigned char source_ndigis, dest_ndigis;
00109   ax25_address source_digis[ROSE_MAX_DIGIS];
00110   ax25_address dest_digis[ROSE_MAX_DIGIS];
00111   unsigned int rand;
00112   rose_address fail_addr;
00113   ax25_address fail_call;
00114 };
00115 
00116 #endif /* netrose/rose.h */