0001
0002
0003
0004
0005
0006
0007
0008 #ifndef ROSE_KERNEL_H
0009 #define ROSE_KERNEL_H
0010
0011 #include <linux/socket.h>
0012 #include <linux/ax25.h>
0013
0014 #define ROSE_MTU 251
0015
0016 #define ROSE_MAX_DIGIS 6
0017
0018 #define ROSE_DEFER 1
0019 #define ROSE_T1 2
0020 #define ROSE_T2 3
0021 #define ROSE_T3 4
0022 #define ROSE_IDLE 5
0023 #define ROSE_QBITINCL 6
0024 #define ROSE_HOLDBACK 7
0025
0026 #define SIOCRSGCAUSE (SIOCPROTOPRIVATE+0)
0027 #define SIOCRSSCAUSE (SIOCPROTOPRIVATE+1)
0028 #define SIOCRSL2CALL (SIOCPROTOPRIVATE+2)
0029 #define SIOCRSSL2CALL (SIOCPROTOPRIVATE+2)
0030 #define SIOCRSACCEPT (SIOCPROTOPRIVATE+3)
0031 #define SIOCRSCLRRT (SIOCPROTOPRIVATE+4)
0032 #define SIOCRSGL2CALL (SIOCPROTOPRIVATE+5)
0033 #define SIOCRSGFACILITIES (SIOCPROTOPRIVATE+6)
0034
0035 #define ROSE_DTE_ORIGINATED 0x00
0036 #define ROSE_NUMBER_BUSY 0x01
0037 #define ROSE_INVALID_FACILITY 0x03
0038 #define ROSE_NETWORK_CONGESTION 0x05
0039 #define ROSE_OUT_OF_ORDER 0x09
0040 #define ROSE_ACCESS_BARRED 0x0B
0041 #define ROSE_NOT_OBTAINABLE 0x0D
0042 #define ROSE_REMOTE_PROCEDURE 0x11
0043 #define ROSE_LOCAL_PROCEDURE 0x13
0044 #define ROSE_SHIP_ABSENT 0x39
0045
0046 typedef struct {
0047 char rose_addr[5];
0048 } rose_address;
0049
0050 struct sockaddr_rose {
0051 __kernel_sa_family_t srose_family;
0052 rose_address srose_addr;
0053 ax25_address srose_call;
0054 int srose_ndigis;
0055 ax25_address srose_digi;
0056 };
0057
0058 struct full_sockaddr_rose {
0059 __kernel_sa_family_t srose_family;
0060 rose_address srose_addr;
0061 ax25_address srose_call;
0062 unsigned int srose_ndigis;
0063 ax25_address srose_digis[ROSE_MAX_DIGIS];
0064 };
0065
0066 struct rose_route_struct {
0067 rose_address address;
0068 unsigned short mask;
0069 ax25_address neighbour;
0070 char device[16];
0071 unsigned char ndigis;
0072 ax25_address digipeaters[AX25_MAX_DIGIS];
0073 };
0074
0075 struct rose_cause_struct {
0076 unsigned char cause;
0077 unsigned char diagnostic;
0078 };
0079
0080 struct rose_facilities_struct {
0081 rose_address source_addr, dest_addr;
0082 ax25_address source_call, dest_call;
0083 unsigned char source_ndigis, dest_ndigis;
0084 ax25_address source_digis[ROSE_MAX_DIGIS];
0085 ax25_address dest_digis[ROSE_MAX_DIGIS];
0086 unsigned int rand;
0087 rose_address fail_addr;
0088 ax25_address fail_call;
0089 };
0090
0091 #endif