netrom.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* Copyright (C) 1997 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. #ifndef _NETROM_NETROM_H
  16. #define _NETROM_NETROM_H 1
  17. #include <netax25/ax25.h>
  18. /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx. */
  19. #define SOL_NETROM 259
  20. /* NetRom control values: */
  21. #define NETROM_T1 1
  22. #define NETROM_T2 2
  23. #define NETROM_N2 3
  24. #define NETROM_PACLEN 5
  25. #define NETROM_T4 6
  26. #define NETROM_IDLE 7
  27. #define NETROM_KILL 99
  28. /* Type of route: */
  29. #define NETROM_NEIGH 0
  30. #define NETROM_NODE 1
  31. struct nr_route_struct
  32. {
  33. int type;
  34. ax25_address callsign;
  35. char device[16];
  36. unsigned int quality;
  37. char mnemonic[7];
  38. ax25_address neighbour;
  39. unsigned int obs_count;
  40. unsigned int ndigis;
  41. ax25_address digipeaters[AX25_MAX_DIGIS];
  42. };
  43. /* NetRom socket ioctls: */
  44. #define SIOCNRGETPARMS (SIOCPROTOPRIVATE+0)
  45. #define SIOCNRSETPARMS (SIOCPROTOPRIVATE+1)
  46. #define SIOCNRDECOBS (SIOCPROTOPRIVATE+2)
  47. #define SIOCNRRTCTL (SIOCPROTOPRIVATE+3)
  48. #define SIOCNRCTLCON (SIOCPROTOPRIVATE+4)
  49. /* NetRom parameter structure: */
  50. struct nr_parms_struct
  51. {
  52. unsigned int quality;
  53. unsigned int obs_count;
  54. unsigned int ttl;
  55. unsigned int timeout;
  56. unsigned int ack_delay;
  57. unsigned int busy_delay;
  58. unsigned int tries;
  59. unsigned int window;
  60. unsigned int paclen;
  61. };
  62. /* NetRom control structure: */
  63. struct nr_ctl_struct
  64. {
  65. unsigned char index;
  66. unsigned char id;
  67. unsigned int cmd;
  68. unsigned long arg;
  69. };
  70. #endif /* netrom/netrom.h */