| 1 | /* Copyright (C) 1997-2024 Free Software Foundation, Inc. |
| 2 | This file is part of the GNU C Library. |
| 3 | |
| 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 | |
| 9 | The GNU C Library is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | Lesser General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public |
| 15 | License along with the GNU C Library; if not, see |
| 16 | <https://www.gnu.org/licenses/>. */ |
| 17 | |
| 18 | #ifndef _NETROM_NETROM_H |
| 19 | #define _NETROM_NETROM_H 1 |
| 20 | |
| 21 | #include <netax25/ax25.h> |
| 22 | |
| 23 | /* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx. */ |
| 24 | #define SOL_NETROM 259 |
| 25 | |
| 26 | /* NetRom control values: */ |
| 27 | #define NETROM_T1 1 |
| 28 | #define NETROM_T2 2 |
| 29 | #define NETROM_N2 3 |
| 30 | #define NETROM_PACLEN 5 |
| 31 | #define NETROM_T4 6 |
| 32 | #define NETROM_IDLE 7 |
| 33 | |
| 34 | #define NETROM_KILL 99 |
| 35 | |
| 36 | /* Type of route: */ |
| 37 | #define NETROM_NEIGH 0 |
| 38 | #define NETROM_NODE 1 |
| 39 | |
| 40 | struct nr_route_struct |
| 41 | { |
| 42 | int type; |
| 43 | ax25_address callsign; |
| 44 | char device[16]; |
| 45 | unsigned int quality; |
| 46 | char mnemonic[7]; |
| 47 | ax25_address neighbour; |
| 48 | unsigned int obs_count; |
| 49 | unsigned int ndigis; |
| 50 | ax25_address digipeaters[AX25_MAX_DIGIS]; |
| 51 | }; |
| 52 | |
| 53 | /* NetRom socket ioctls: */ |
| 54 | #define SIOCNRGETPARMS (SIOCPROTOPRIVATE+0) |
| 55 | #define SIOCNRSETPARMS (SIOCPROTOPRIVATE+1) |
| 56 | #define SIOCNRDECOBS (SIOCPROTOPRIVATE+2) |
| 57 | #define SIOCNRRTCTL (SIOCPROTOPRIVATE+3) |
| 58 | #define SIOCNRCTLCON (SIOCPROTOPRIVATE+4) |
| 59 | |
| 60 | /* NetRom parameter structure: */ |
| 61 | struct nr_parms_struct |
| 62 | { |
| 63 | unsigned int quality; |
| 64 | unsigned int obs_count; |
| 65 | unsigned int ttl; |
| 66 | unsigned int timeout; |
| 67 | unsigned int ack_delay; |
| 68 | unsigned int busy_delay; |
| 69 | unsigned int tries; |
| 70 | unsigned int window; |
| 71 | unsigned int paclen; |
| 72 | }; |
| 73 | |
| 74 | /* NetRom control structure: */ |
| 75 | struct nr_ctl_struct |
| 76 | { |
| 77 | unsigned char index; |
| 78 | unsigned char id; |
| 79 | unsigned int cmd; |
| 80 | unsigned long arg; |
| 81 | }; |
| 82 | |
| 83 | #endif /* netrom/netrom.h */ |
| 84 | |