JFIF$        dd7 

Viewing File: /usr/src/kernels/5.14.0-570.30.1.el9_6.x86_64/include/uapi/linux/gsmmux.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/* Copyright (c) 2022/23 Siemens Mobility GmbH */
#ifndef _LINUX_GSMMUX_H
#define _LINUX_GSMMUX_H

#include <linux/const.h>
#include <linux/if.h>
#include <linux/ioctl.h>
#include <linux/types.h>

/*
 * flags definition for n_gsm
 *
 * Used by:
 * struct gsm_config_ext.flags
 * struct gsm_dlci_config.flags
 */
/* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if
 * incompatible settings were provided. Always cleared on retrieval.
 */
#define GSM_FL_RESTART	_BITUL(0)

/**
 * struct gsm_config - n_gsm basic configuration parameters
 *
 * This structure is used in combination with GSMIOC_GETCONF and GSMIOC_SETCONF
 * to retrieve and set the basic parameters of an n_gsm ldisc.
 * struct gsm_config_ext can be used to configure extended ldisc parameters.
 *
 * All timers are in units of 1/100th of a second.
 *
 * @adaption:      Convergence layer type
 * @encapsulation: Framing (0 = basic option, 1 = advanced option)
 * @initiator:     Initiator or responder
 * @t1:            Acknowledgment timer
 * @t2:            Response timer for multiplexer control channel
 * @t3:            Response timer for wake-up procedure
 * @n2:            Maximum number of retransmissions
 * @mru:           Maximum incoming frame payload size
 * @mtu:           Maximum outgoing frame payload size
 * @k:             Window size
 * @i:             Frame type (1 = UIH, 2 = UI)
 * @unused:        Can not be used
 */
struct gsm_config
{
	unsigned int adaption;
	unsigned int encapsulation;
	unsigned int initiator;
	unsigned int t1;
	unsigned int t2;
	unsigned int t3;
	unsigned int n2;
	unsigned int mru;
	unsigned int mtu;
	unsigned int k;
	unsigned int i;
	unsigned int unused[8];
};

#define GSMIOC_GETCONF		_IOR('G', 0, struct gsm_config)
#define GSMIOC_SETCONF		_IOW('G', 1, struct gsm_config)

/**
 * struct gsm_netconfig - n_gsm network configuration parameters
 *
 * This structure is used in combination with GSMIOC_ENABLE_NET and
 * GSMIOC_DISABLE_NET to enable or disable a network data connection
 * over a mux virtual tty channel. This is for modems that support
 * data connections with raw IP frames instead of PPP.
 *
 * @adaption: Adaption to use in network mode.
 * @protocol: Protocol to use - only ETH_P_IP supported.
 * @unused2:  Can not be used.
 * @if_name:  Interface name format string.
 * @unused:   Can not be used.
 */
struct gsm_netconfig {
	unsigned int adaption;
	unsigned short protocol;
	unsigned short unused2;
	char if_name[IFNAMSIZ];
	__u8 unused[28];
};

#define GSMIOC_ENABLE_NET      _IOW('G', 2, struct gsm_netconfig)
#define GSMIOC_DISABLE_NET     _IO('G', 3)

/* get the base tty number for a configured gsmmux tty */
#define GSMIOC_GETFIRST		_IOR('G', 4, __u32)

/**
 * struct gsm_config_ext - n_gsm extended configuration parameters
 *
 * This structure is used in combination with GSMIOC_GETCONF_EXT and
 * GSMIOC_SETCONF_EXT to retrieve and set the extended parameters of an
 * n_gsm ldisc.
 *
 * All timers are in units of 1/100th of a second.
 *
 * @keep_alive:  Control channel keep-alive in 1/100th of a second (0 to disable).
 * @wait_config: Wait for DLCI config before opening virtual link?
 * @flags:       Mux specific flags.
 * @reserved:    For future use, must be initialized to zero.
 */
struct gsm_config_ext {
	__u32 keep_alive;
	__u32 wait_config;
	__u32 flags;
	__u32 reserved[5];
};

#define GSMIOC_GETCONF_EXT	_IOR('G', 5, struct gsm_config_ext)
#define GSMIOC_SETCONF_EXT	_IOW('G', 6, struct gsm_config_ext)

/**
 * struct gsm_dlci_config - n_gsm channel configuration parameters
 *
 * This structure is used in combination with GSMIOC_GETCONF_DLCI and
 * GSMIOC_SETCONF_DLCI to retrieve and set the channel specific parameters
 * of an n_gsm ldisc.
 *
 * Set the channel accordingly before calling GSMIOC_GETCONF_DLCI.
 *
 * @channel:  DLCI (0 for the associated DLCI).
 * @adaption: Convergence layer type.
 * @mtu:      Maximum transfer unit.
 * @priority: Priority (0 for default value).
 * @i:        Frame type (1 = UIH, 2 = UI).
 * @k:        Window size (0 for default value).
 * @flags:    DLCI specific flags.
 * @reserved: For future use, must be initialized to zero.
 */
struct gsm_dlci_config {
	__u32 channel;
	__u32 adaption;
	__u32 mtu;
	__u32 priority;
	__u32 i;
	__u32 k;
	__u32 flags;
	__u32 reserved[7];
};

#define GSMIOC_GETCONF_DLCI	_IOWR('G', 7, struct gsm_dlci_config)
#define GSMIOC_SETCONF_DLCI	_IOW('G', 8, struct gsm_dlci_config)

#endif
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6YݾlCuhquympǦ GjhsǜNlɻ}o7#S6aw4!OSrD57%|?x>L |/nD6?/8w#[)L7+6〼T ATg!%5MmZ/c-{1_Je"|^$'O&ޱմTrb$w)R$& N1EtdU3Uȉ1pM"N*(DNyd96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