Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * These are the public elements of the Linux kernel X.25 implementation. | |
3 | * | |
4 | * History | |
5 | * mar/20/00 Daniela Squassoni Disabling/enabling of facilities | |
6 | * negotiation. | |
cb65d506 SP |
7 | * apr/02/05 Shaun Pereira Selective sub address matching with |
8 | * call user data | |
1da177e4 LT |
9 | */ |
10 | ||
11 | #ifndef X25_KERNEL_H | |
12 | #define X25_KERNEL_H | |
13 | ||
14 | #define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0) | |
15 | #define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1) | |
16 | #define SIOCX25GFACILITIES (SIOCPROTOPRIVATE + 2) | |
17 | #define SIOCX25SFACILITIES (SIOCPROTOPRIVATE + 3) | |
18 | #define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4) | |
19 | #define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5) | |
20 | #define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6) | |
cb65d506 | 21 | #define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7) |
1da177e4 LT |
22 | |
23 | /* | |
24 | * Values for {get,set}sockopt. | |
25 | */ | |
26 | #define X25_QBITINCL 1 | |
27 | ||
28 | /* | |
29 | * X.25 Packet Size values. | |
30 | */ | |
31 | #define X25_PS16 4 | |
32 | #define X25_PS32 5 | |
33 | #define X25_PS64 6 | |
34 | #define X25_PS128 7 | |
35 | #define X25_PS256 8 | |
36 | #define X25_PS512 9 | |
37 | #define X25_PS1024 10 | |
38 | #define X25_PS2048 11 | |
39 | #define X25_PS4096 12 | |
40 | ||
41 | /* | |
42 | * An X.121 address, it is held as ASCII text, null terminated, up to 15 | |
43 | * digits and a null terminator. | |
44 | */ | |
45 | struct x25_address { | |
46 | char x25_addr[16]; | |
47 | }; | |
48 | ||
49 | /* | |
50 | * Linux X.25 Address structure, used for bind, and connect mostly. | |
51 | */ | |
52 | struct sockaddr_x25 { | |
53 | sa_family_t sx25_family; /* Must be AF_X25 */ | |
54 | struct x25_address sx25_addr; /* X.121 Address */ | |
55 | }; | |
56 | ||
57 | /* | |
58 | * DTE/DCE subscription options. | |
59 | * | |
60 | * As this is missing lots of options, user should expect major | |
61 | * changes of this structure in 2.5.x which might break compatibilty. | |
62 | * The somewhat ugly dimension 200-sizeof() is needed to maintain | |
63 | * backward compatibility. | |
64 | */ | |
65 | struct x25_subscrip_struct { | |
66 | char device[200-sizeof(unsigned long)]; | |
67 | unsigned long global_facil_mask; /* 0 to disable negotiation */ | |
68 | unsigned int extended; | |
69 | }; | |
70 | ||
71 | /* values for above global_facil_mask */ | |
72 | ||
73 | #define X25_MASK_REVERSE 0x01 | |
74 | #define X25_MASK_THROUGHPUT 0x02 | |
75 | #define X25_MASK_PACKET_SIZE 0x04 | |
76 | #define X25_MASK_WINDOW_SIZE 0x08 | |
77 | ||
78 | ||
79 | ||
80 | /* | |
81 | * Routing table control structure. | |
82 | */ | |
83 | struct x25_route_struct { | |
84 | struct x25_address address; | |
85 | unsigned int sigdigits; | |
86 | char device[200]; | |
87 | }; | |
88 | ||
89 | /* | |
90 | * Facilities structure. | |
91 | */ | |
92 | struct x25_facilities { | |
93 | unsigned int winsize_in, winsize_out; | |
94 | unsigned int pacsize_in, pacsize_out; | |
95 | unsigned int throughput; | |
96 | unsigned int reverse; | |
97 | }; | |
98 | ||
99 | /* | |
100 | * Call User Data structure. | |
101 | */ | |
102 | struct x25_calluserdata { | |
103 | unsigned int cudlength; | |
104 | unsigned char cuddata[128]; | |
105 | }; | |
106 | ||
107 | /* | |
108 | * Call clearing Cause and Diagnostic structure. | |
109 | */ | |
110 | struct x25_causediag { | |
111 | unsigned char cause; | |
112 | unsigned char diagnostic; | |
113 | }; | |
114 | ||
cb65d506 SP |
115 | /* |
116 | * Further optional call user data match length selection | |
117 | */ | |
118 | struct x25_subaddr { | |
119 | unsigned int cudmatchlength; | |
120 | }; | |
121 | ||
1da177e4 | 122 | #endif |