1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * These are the public elements of the Linux kernel X.25 implementation.
6 * mar/20/00 Daniela Squassoni Disabling/enabling of facilities
8 * apr/02/05 Shaun Pereira Selective sub address matching with
15 #include <linux/types.h>
16 #include <linux/socket.h>
18 #define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0)
19 #define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1)
20 #define SIOCX25GFACILITIES (SIOCPROTOPRIVATE + 2)
21 #define SIOCX25SFACILITIES (SIOCPROTOPRIVATE + 3)
22 #define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4)
23 #define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5)
24 #define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6)
25 #define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7)
26 #define SIOCX25CALLACCPTAPPRV (SIOCPROTOPRIVATE + 8)
27 #define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9)
28 #define SIOCX25GDTEFACILITIES (SIOCPROTOPRIVATE + 10)
29 #define SIOCX25SDTEFACILITIES (SIOCPROTOPRIVATE + 11)
30 #define SIOCX25SCAUSEDIAG (SIOCPROTOPRIVATE + 12)
33 * Values for {get,set}sockopt.
35 #define X25_QBITINCL 1
38 * X.25 Packet Size values.
51 * An X.121 address, it is held as ASCII text, null terminated, up to 15
52 * digits and a null terminator.
59 * Linux X.25 Address structure, used for bind, and connect mostly.
62 __kernel_sa_family_t sx25_family
; /* Must be AF_X25 */
63 struct x25_address sx25_addr
; /* X.121 Address */
67 * DTE/DCE subscription options.
69 * As this is missing lots of options, user should expect major
70 * changes of this structure in 2.5.x which might break compatibilty.
71 * The somewhat ugly dimension 200-sizeof() is needed to maintain
72 * backward compatibility.
74 struct x25_subscrip_struct
{
75 char device
[200-sizeof(unsigned long)];
76 unsigned long global_facil_mask
; /* 0 to disable negotiation */
77 unsigned int extended
;
80 /* values for above global_facil_mask */
82 #define X25_MASK_REVERSE 0x01
83 #define X25_MASK_THROUGHPUT 0x02
84 #define X25_MASK_PACKET_SIZE 0x04
85 #define X25_MASK_WINDOW_SIZE 0x08
87 #define X25_MASK_CALLING_AE 0x10
88 #define X25_MASK_CALLED_AE 0x20
92 * Routing table control structure.
94 struct x25_route_struct
{
95 struct x25_address address
;
96 unsigned int sigdigits
;
101 * Facilities structure.
103 struct x25_facilities
{
104 unsigned int winsize_in
, winsize_out
;
105 unsigned int pacsize_in
, pacsize_out
;
106 unsigned int throughput
;
107 unsigned int reverse
;
112 * Only the called and calling address
113 * extension are currently implemented.
114 * The rest are in place to avoid the struct
115 * changing size if someone needs them later
118 struct x25_dte_facilities
{
131 * Call User Data structure.
133 struct x25_calluserdata
{
134 unsigned int cudlength
;
135 unsigned char cuddata
[128];
139 * Call clearing Cause and Diagnostic structure.
141 struct x25_causediag
{
143 unsigned char diagnostic
;
147 * Further optional call user data match length selection
150 unsigned int cudmatchlength
;