rose.h 3.1 KB

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