Back to index

glibc  2.9
netrom.h
Go to the documentation of this file.
00001 /* Copyright (C) 1997 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef _NETROM_NETROM_H
00020 #define _NETROM_NETROM_H    1
00021 
00022 #include <netax25/ax25.h>
00023 
00024 /* Setsockoptions(2) level.  Thanks to BSD these must match IPPROTO_xxx.  */
00025 #define SOL_NETROM   259
00026 
00027 /* NetRom control values: */
00028 #define NETROM_T1    1
00029 #define NETROM_T2    2
00030 #define NETROM_N2    3
00031 #define NETROM_PACLEN       5
00032 #define       NETROM_T4     6
00033 #define NETROM_IDLE  7
00034 
00035 #define NETROM_KILL  99
00036 
00037 /* Type of route: */
00038 #define NETROM_NEIGH    0
00039 #define NETROM_NODE     1
00040 
00041 struct nr_route_struct
00042   {
00043     int type;
00044     ax25_address callsign;
00045     char device[16];
00046     unsigned int quality;
00047     char mnemonic[7];
00048     ax25_address neighbour;
00049     unsigned int obs_count;
00050     unsigned int ndigis;
00051     ax25_address digipeaters[AX25_MAX_DIGIS];
00052   };
00053 
00054 /* NetRom socket ioctls: */
00055 #define       SIOCNRGETPARMS              (SIOCPROTOPRIVATE+0)
00056 #define       SIOCNRSETPARMS              (SIOCPROTOPRIVATE+1)
00057 #define       SIOCNRDECOBS         (SIOCPROTOPRIVATE+2)
00058 #define       SIOCNRRTCTL          (SIOCPROTOPRIVATE+3)
00059 #define       SIOCNRCTLCON         (SIOCPROTOPRIVATE+4)
00060 
00061 /* NetRom parameter structure: */
00062 struct nr_parms_struct
00063   {
00064     unsigned int quality;
00065     unsigned int obs_count;
00066     unsigned int ttl;
00067     unsigned int timeout;
00068     unsigned int ack_delay;
00069     unsigned int busy_delay;
00070     unsigned int tries;
00071     unsigned int window;
00072     unsigned int paclen;
00073   };
00074 
00075 /* NetRom control structure: */
00076 struct nr_ctl_struct
00077   {
00078     unsigned char index;
00079     unsigned char id;
00080     unsigned int cmd;
00081     unsigned long arg;
00082   };
00083 
00084 #endif /* netrom/netrom.h */