~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/gsmmux.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 /* Copyright (c) 2022/23 Siemens Mobility GmbH */
  3 #ifndef _LINUX_GSMMUX_H
  4 #define _LINUX_GSMMUX_H
  5 
  6 #include <linux/const.h>
  7 #include <linux/if.h>
  8 #include <linux/ioctl.h>
  9 #include <linux/types.h>
 10 
 11 /*
 12  * flags definition for n_gsm
 13  *
 14  * Used by:
 15  * struct gsm_config_ext.flags
 16  * struct gsm_dlci_config.flags
 17  */
 18 /* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if
 19  * incompatible settings were provided. Always cleared on retrieval.
 20  */
 21 #define GSM_FL_RESTART  _BITUL(0)
 22 
 23 /**
 24  * struct gsm_config - n_gsm basic configuration parameters
 25  *
 26  * This structure is used in combination with GSMIOC_GETCONF and GSMIOC_SETCONF
 27  * to retrieve and set the basic parameters of an n_gsm ldisc.
 28  * struct gsm_config_ext can be used to configure extended ldisc parameters.
 29  *
 30  * All timers are in units of 1/100th of a second.
 31  *
 32  * @adaption:      Convergence layer type
 33  * @encapsulation: Framing (0 = basic option, 1 = advanced option)
 34  * @initiator:     Initiator or responder
 35  * @t1:            Acknowledgment timer
 36  * @t2:            Response timer for multiplexer control channel
 37  * @t3:            Response timer for wake-up procedure
 38  * @n2:            Maximum number of retransmissions
 39  * @mru:           Maximum incoming frame payload size
 40  * @mtu:           Maximum outgoing frame payload size
 41  * @k:             Window size
 42  * @i:             Frame type (1 = UIH, 2 = UI)
 43  * @unused:        Can not be used
 44  */
 45 struct gsm_config
 46 {
 47         unsigned int adaption;
 48         unsigned int encapsulation;
 49         unsigned int initiator;
 50         unsigned int t1;
 51         unsigned int t2;
 52         unsigned int t3;
 53         unsigned int n2;
 54         unsigned int mru;
 55         unsigned int mtu;
 56         unsigned int k;
 57         unsigned int i;
 58         unsigned int unused[8];
 59 };
 60 
 61 #define GSMIOC_GETCONF          _IOR('G', 0, struct gsm_config)
 62 #define GSMIOC_SETCONF          _IOW('G', 1, struct gsm_config)
 63 
 64 /**
 65  * struct gsm_netconfig - n_gsm network configuration parameters
 66  *
 67  * This structure is used in combination with GSMIOC_ENABLE_NET and
 68  * GSMIOC_DISABLE_NET to enable or disable a network data connection
 69  * over a mux virtual tty channel. This is for modems that support
 70  * data connections with raw IP frames instead of PPP.
 71  *
 72  * @adaption: Adaption to use in network mode.
 73  * @protocol: Protocol to use - only ETH_P_IP supported.
 74  * @unused2:  Can not be used.
 75  * @if_name:  Interface name format string.
 76  * @unused:   Can not be used.
 77  */
 78 struct gsm_netconfig {
 79         unsigned int adaption;
 80         unsigned short protocol;
 81         unsigned short unused2;
 82         char if_name[IFNAMSIZ];
 83         __u8 unused[28];
 84 };
 85 
 86 #define GSMIOC_ENABLE_NET      _IOW('G', 2, struct gsm_netconfig)
 87 #define GSMIOC_DISABLE_NET     _IO('G', 3)
 88 
 89 /* get the base tty number for a configured gsmmux tty */
 90 #define GSMIOC_GETFIRST         _IOR('G', 4, __u32)
 91 
 92 /**
 93  * struct gsm_config_ext - n_gsm extended configuration parameters
 94  *
 95  * This structure is used in combination with GSMIOC_GETCONF_EXT and
 96  * GSMIOC_SETCONF_EXT to retrieve and set the extended parameters of an
 97  * n_gsm ldisc.
 98  *
 99  * All timers are in units of 1/100th of a second.
100  *
101  * @keep_alive:  Control channel keep-alive in 1/100th of a second (0 to disable).
102  * @wait_config: Wait for DLCI config before opening virtual link?
103  * @flags:       Mux specific flags.
104  * @reserved:    For future use, must be initialized to zero.
105  */
106 struct gsm_config_ext {
107         __u32 keep_alive;
108         __u32 wait_config;
109         __u32 flags;
110         __u32 reserved[5];
111 };
112 
113 #define GSMIOC_GETCONF_EXT      _IOR('G', 5, struct gsm_config_ext)
114 #define GSMIOC_SETCONF_EXT      _IOW('G', 6, struct gsm_config_ext)
115 
116 /**
117  * struct gsm_dlci_config - n_gsm channel configuration parameters
118  *
119  * This structure is used in combination with GSMIOC_GETCONF_DLCI and
120  * GSMIOC_SETCONF_DLCI to retrieve and set the channel specific parameters
121  * of an n_gsm ldisc.
122  *
123  * Set the channel accordingly before calling GSMIOC_GETCONF_DLCI.
124  *
125  * @channel:  DLCI (0 for the associated DLCI).
126  * @adaption: Convergence layer type.
127  * @mtu:      Maximum transfer unit.
128  * @priority: Priority (0 for default value).
129  * @i:        Frame type (1 = UIH, 2 = UI).
130  * @k:        Window size (0 for default value).
131  * @flags:    DLCI specific flags.
132  * @reserved: For future use, must be initialized to zero.
133  */
134 struct gsm_dlci_config {
135         __u32 channel;
136         __u32 adaption;
137         __u32 mtu;
138         __u32 priority;
139         __u32 i;
140         __u32 k;
141         __u32 flags;
142         __u32 reserved[7];
143 };
144 
145 #define GSMIOC_GETCONF_DLCI     _IOWR('G', 7, struct gsm_dlci_config)
146 #define GSMIOC_SETCONF_DLCI     _IOW('G', 8, struct gsm_dlci_config)
147 
148 #endif
149 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php