netrom.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* Copyright (C) 1997-2020 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, see
  13. <https://www.gnu.org/licenses/>. */
  14. #ifndef _NETROM_NETROM_H
  15. #define _NETROM_NETROM_H 1
  16. #include <netax25/ax25.h>
  17. /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx. */
  18. #define SOL_NETROM 259
  19. /* NetRom control values: */
  20. #define NETROM_T1 1
  21. #define NETROM_T2 2
  22. #define NETROM_N2 3
  23. #define NETROM_PACLEN 5
  24. #define NETROM_T4 6
  25. #define NETROM_IDLE 7
  26. #define NETROM_KILL 99
  27. /* Type of route: */
  28. #define NETROM_NEIGH 0
  29. #define NETROM_NODE 1
  30. struct nr_route_struct
  31. {
  32. int type;
  33. ax25_address callsign;
  34. char device[16];
  35. unsigned int quality;
  36. char mnemonic[7];
  37. ax25_address neighbour;
  38. unsigned int obs_count;
  39. unsigned int ndigis;
  40. ax25_address digipeaters[AX25_MAX_DIGIS];
  41. };
  42. /* NetRom socket ioctls: */
  43. #define SIOCNRGETPARMS (SIOCPROTOPRIVATE+0)
  44. #define SIOCNRSETPARMS (SIOCPROTOPRIVATE+1)
  45. #define SIOCNRDECOBS (SIOCPROTOPRIVATE+2)
  46. #define SIOCNRRTCTL (SIOCPROTOPRIVATE+3)
  47. #define SIOCNRCTLCON (SIOCPROTOPRIVATE+4)
  48. /* NetRom parameter structure: */
  49. struct nr_parms_struct
  50. {
  51. unsigned int quality;
  52. unsigned int obs_count;
  53. unsigned int ttl;
  54. unsigned int timeout;
  55. unsigned int ack_delay;
  56. unsigned int busy_delay;
  57. unsigned int tries;
  58. unsigned int window;
  59. unsigned int paclen;
  60. };
  61. /* NetRom control structure: */
  62. struct nr_ctl_struct
  63. {
  64. unsigned char index;
  65. unsigned char id;
  66. unsigned int cmd;
  67. unsigned long arg;
  68. };
  69. #endif /* netrom/netrom.h */