18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * DLCI/FRAD Definitions for Frame Relay Access Devices. DLCI devices are 48c2ecf20Sopenharmony_ci * created for each DLCI associated with a FRAD. The FRAD driver 58c2ecf20Sopenharmony_ci * is not truly a network device, but the lower level device 68c2ecf20Sopenharmony_ci * handler. This allows other FRAD manufacturers to use the DLCI 78c2ecf20Sopenharmony_ci * code, including its RFC1490 encapsulation alongside the current 88c2ecf20Sopenharmony_ci * implementation for the Sangoma cards. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * Version: @(#)if_ifrad.h 0.15 31 Mar 96 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * Author: Mike McLagan <mike.mclagan@linux.org> 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * Changes: 158c2ecf20Sopenharmony_ci * 0.15 Mike McLagan changed structure defs (packed) 168c2ecf20Sopenharmony_ci * re-arranged flags 178c2ecf20Sopenharmony_ci * added DLCI_RET vars 188c2ecf20Sopenharmony_ci * 198c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or 208c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License 218c2ecf20Sopenharmony_ci * as published by the Free Software Foundation; either version 228c2ecf20Sopenharmony_ci * 2 of the License, or (at your option) any later version. 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#ifndef _UAPI_FRAD_H_ 268c2ecf20Sopenharmony_ci#define _UAPI_FRAD_H_ 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#include <linux/if.h> 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* Structures and constants associated with the DLCI device driver */ 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_cistruct dlci_add 338c2ecf20Sopenharmony_ci{ 348c2ecf20Sopenharmony_ci char devname[IFNAMSIZ]; 358c2ecf20Sopenharmony_ci short dlci; 368c2ecf20Sopenharmony_ci}; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#define DLCI_GET_CONF (SIOCDEVPRIVATE + 2) 398c2ecf20Sopenharmony_ci#define DLCI_SET_CONF (SIOCDEVPRIVATE + 3) 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* 428c2ecf20Sopenharmony_ci * These are related to the Sangoma SDLA and should remain in order. 438c2ecf20Sopenharmony_ci * Code within the SDLA module is based on the specifics of this 448c2ecf20Sopenharmony_ci * structure. Change at your own peril. 458c2ecf20Sopenharmony_ci */ 468c2ecf20Sopenharmony_cistruct dlci_conf { 478c2ecf20Sopenharmony_ci short flags; 488c2ecf20Sopenharmony_ci short CIR_fwd; 498c2ecf20Sopenharmony_ci short Bc_fwd; 508c2ecf20Sopenharmony_ci short Be_fwd; 518c2ecf20Sopenharmony_ci short CIR_bwd; 528c2ecf20Sopenharmony_ci short Bc_bwd; 538c2ecf20Sopenharmony_ci short Be_bwd; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci/* these are part of the status read */ 568c2ecf20Sopenharmony_ci short Tc_fwd; 578c2ecf20Sopenharmony_ci short Tc_bwd; 588c2ecf20Sopenharmony_ci short Tf_max; 598c2ecf20Sopenharmony_ci short Tb_max; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci/* add any new fields here above is a mirror of sdla_dlci_conf */ 628c2ecf20Sopenharmony_ci}; 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define DLCI_GET_SLAVE (SIOCDEVPRIVATE + 4) 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci/* configuration flags for DLCI */ 678c2ecf20Sopenharmony_ci#define DLCI_IGNORE_CIR_OUT 0x0001 688c2ecf20Sopenharmony_ci#define DLCI_ACCOUNT_CIR_IN 0x0002 698c2ecf20Sopenharmony_ci#define DLCI_BUFFER_IF 0x0008 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci#define DLCI_VALID_FLAGS 0x000B 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci/* defines for the actual Frame Relay hardware */ 748c2ecf20Sopenharmony_ci#define FRAD_GET_CONF (SIOCDEVPRIVATE) 758c2ecf20Sopenharmony_ci#define FRAD_SET_CONF (SIOCDEVPRIVATE + 1) 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define FRAD_LAST_IOCTL FRAD_SET_CONF 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci/* 808c2ecf20Sopenharmony_ci * Based on the setup for the Sangoma SDLA. If changes are 818c2ecf20Sopenharmony_ci * necessary to this structure, a routine will need to be 828c2ecf20Sopenharmony_ci * added to that module to copy fields. 838c2ecf20Sopenharmony_ci */ 848c2ecf20Sopenharmony_cistruct frad_conf 858c2ecf20Sopenharmony_ci{ 868c2ecf20Sopenharmony_ci short station; 878c2ecf20Sopenharmony_ci short flags; 888c2ecf20Sopenharmony_ci short kbaud; 898c2ecf20Sopenharmony_ci short clocking; 908c2ecf20Sopenharmony_ci short mtu; 918c2ecf20Sopenharmony_ci short T391; 928c2ecf20Sopenharmony_ci short T392; 938c2ecf20Sopenharmony_ci short N391; 948c2ecf20Sopenharmony_ci short N392; 958c2ecf20Sopenharmony_ci short N393; 968c2ecf20Sopenharmony_ci short CIR_fwd; 978c2ecf20Sopenharmony_ci short Bc_fwd; 988c2ecf20Sopenharmony_ci short Be_fwd; 998c2ecf20Sopenharmony_ci short CIR_bwd; 1008c2ecf20Sopenharmony_ci short Bc_bwd; 1018c2ecf20Sopenharmony_ci short Be_bwd; 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci/* Add new fields here, above is a mirror of the sdla_conf */ 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci}; 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci#define FRAD_STATION_CPE 0x0000 1088c2ecf20Sopenharmony_ci#define FRAD_STATION_NODE 0x0001 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci#define FRAD_TX_IGNORE_CIR 0x0001 1118c2ecf20Sopenharmony_ci#define FRAD_RX_ACCOUNT_CIR 0x0002 1128c2ecf20Sopenharmony_ci#define FRAD_DROP_ABORTED 0x0004 1138c2ecf20Sopenharmony_ci#define FRAD_BUFFERIF 0x0008 1148c2ecf20Sopenharmony_ci#define FRAD_STATS 0x0010 1158c2ecf20Sopenharmony_ci#define FRAD_MCI 0x0100 1168c2ecf20Sopenharmony_ci#define FRAD_AUTODLCI 0x8000 1178c2ecf20Sopenharmony_ci#define FRAD_VALID_FLAGS 0x811F 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#define FRAD_CLOCK_INT 0x0001 1208c2ecf20Sopenharmony_ci#define FRAD_CLOCK_EXT 0x0000 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci#endif /* _UAPI_FRAD_H_ */ 124