1/* Copyright (C) 1997 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, write to the Free 16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 17 02111-1307 USA. */ 18 19#ifndef _NETROM_NETROM_H 20#define _NETROM_NETROM_H 1 21 22#include <netax25/ax25.h> 23 24/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx. */ 25#define SOL_NETROM 259 26 27/* NetRom control values: */ 28#define NETROM_T1 1 29#define NETROM_T2 2 30#define NETROM_N2 3 31#define NETROM_PACLEN 5 32#define NETROM_T4 6 33#define NETROM_IDLE 7 34 35#define NETROM_KILL 99 36 37/* Type of route: */ 38#define NETROM_NEIGH 0 39#define NETROM_NODE 1 40 41struct nr_route_struct 42 { 43 int type; 44 ax25_address callsign; 45 char device[16]; 46 unsigned int quality; 47 char mnemonic[7]; 48 ax25_address neighbour; 49 unsigned int obs_count; 50 unsigned int ndigis; 51 ax25_address digipeaters[AX25_MAX_DIGIS]; 52 }; 53 54/* NetRom socket ioctls: */ 55#define SIOCNRGETPARMS (SIOCPROTOPRIVATE+0) 56#define SIOCNRSETPARMS (SIOCPROTOPRIVATE+1) 57#define SIOCNRDECOBS (SIOCPROTOPRIVATE+2) 58#define SIOCNRRTCTL (SIOCPROTOPRIVATE+3) 59#define SIOCNRCTLCON (SIOCPROTOPRIVATE+4) 60 61/* NetRom parameter structure: */ 62struct nr_parms_struct 63 { 64 unsigned int quality; 65 unsigned int obs_count; 66 unsigned int ttl; 67 unsigned int timeout; 68 unsigned int ack_delay; 69 unsigned int busy_delay; 70 unsigned int tries; 71 unsigned int window; 72 unsigned int paclen; 73 }; 74 75/* NetRom control structure: */ 76struct nr_ctl_struct 77 { 78 unsigned char index; 79 unsigned char id; 80 unsigned int cmd; 81 unsigned long arg; 82 }; 83 84#endif /* netrom/netrom.h */ 85