Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


if_frad.h
001: /*
002:  * DLCI/FRAD    Definitions for Frame Relay Access Devices.  DLCI devices are
003:  *              created for each DLCI associated with a FRAD.  The FRAD driver
004:  *              is not truly a network device, but the lower level device
005:  *              handler.  This allows other FRAD manufacturers to use the DLCI
006:  *              code, including its RFC1490 encapsulation alongside the current
007:  *              implementation for the Sangoma cards.
008:  *
009:  * Version:     @(#)if_ifrad.h  0.15    31 Mar 96
010:  *
011:  * Author:      Mike McLagan <mike.mclagan@linux.org>
012:  *
013:  * Changes:
014:  *              0.15    Mike McLagan    changed structure defs (packed)
015:  *                                      re-arranged flags
016:  *                                      added DLCI_RET vars
017:  *
018:  *              This program is free software; you can redistribute it and/or
019:  *              modify it under the terms of the GNU General Public License
020:  *              as published by the Free Software Foundation; either version
021:  *              2 of the License, or (at your option) any later version.
022:  */
023: 
024: #ifndef _FRAD_H_
025: #define _FRAD_H_
026: 
027: #include <linux/if.h>
028: 
029: /* Structures and constants associated with the DLCI device driver */
030: 
031: struct dlci_add
032: {
033:    char  devname[IFNAMSIZ];
034:    short dlci;
035: };
036: 
037: #define DLCI_GET_CONF   (SIOCDEVPRIVATE + 2)
038: #define DLCI_SET_CONF   (SIOCDEVPRIVATE + 3)
039: 
040: /* 
041:  * These are related to the Sangoma SDLA and should remain in order. 
042:  * Code within the SDLA module is based on the specifics of this 
043:  * structure.  Change at your own peril.
044:  */
045: struct dlci_conf {
046:    short flags;
047:    short CIR_fwd;
048:    short Bc_fwd;
049:    short Be_fwd;
050:    short CIR_bwd;
051:    short Bc_bwd;
052:    short Be_bwd; 
053: 
054: /* these are part of the status read */
055:    short Tc_fwd;
056:    short Tc_bwd;
057:    short Tf_max;
058:    short Tb_max;
059: 
060: /* add any new fields here above is a mirror of sdla_dlci_conf */
061: };
062: 
063: #define DLCI_GET_SLAVE  (SIOCDEVPRIVATE + 4)
064: 
065: /* configuration flags for DLCI */
066: #define DLCI_IGNORE_CIR_OUT     0x0001
067: #define DLCI_ACCOUNT_CIR_IN     0x0002
068: #define DLCI_BUFFER_IF          0x0008
069: 
070: #define DLCI_VALID_FLAGS        0x000B
071: 
072: /* defines for the actual Frame Relay hardware */
073: #define FRAD_GET_CONF   (SIOCDEVPRIVATE)
074: #define FRAD_SET_CONF   (SIOCDEVPRIVATE + 1)
075: 
076: #define FRAD_LAST_IOCTL FRAD_SET_CONF
077: 
078: /*
079:  * Based on the setup for the Sangoma SDLA.  If changes are 
080:  * necessary to this structure, a routine will need to be 
081:  * added to that module to copy fields.
082:  */
083: struct frad_conf 
084: {
085:    short station;
086:    short flags;
087:    short kbaud;
088:    short clocking;
089:    short mtu;
090:    short T391;
091:    short T392;
092:    short N391;
093:    short N392;
094:    short N393;
095:    short CIR_fwd;
096:    short Bc_fwd;
097:    short Be_fwd;
098:    short CIR_bwd;
099:    short Bc_bwd;
100:    short Be_bwd;
101: 
102: /* Add new fields here, above is a mirror of the sdla_conf */
103: 
104: };
105: 
106: #define FRAD_STATION_CPE        0x0000
107: #define FRAD_STATION_NODE       0x0001
108: 
109: #define FRAD_TX_IGNORE_CIR      0x0001
110: #define FRAD_RX_ACCOUNT_CIR     0x0002
111: #define FRAD_DROP_ABORTED       0x0004
112: #define FRAD_BUFFERIF           0x0008
113: #define FRAD_STATS              0x0010
114: #define FRAD_MCI                0x0100
115: #define FRAD_AUTODLCI           0x8000
116: #define FRAD_VALID_FLAGS        0x811F
117: 
118: #define FRAD_CLOCK_INT          0x0001
119: #define FRAD_CLOCK_EXT          0x0000
120: 
121: 
122: #endif
123: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/