Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


x25.h
001: /*
002:  * These are the public elements of the Linux kernel X.25 implementation.
003:  *
004:  *      History
005:  *      mar/20/00       Daniela Squassoni Disabling/enabling of facilities 
006:  *                                        negotiation.
007:  *      apr/02/05       Shaun Pereira Selective sub address matching with
008:  *                                      call user data
009:  */
010: 
011: #ifndef X25_KERNEL_H
012: #define X25_KERNEL_H
013: 
014: #include <linux/types.h>
015: #include <linux/socket.h>
016: 
017: #define SIOCX25GSUBSCRIP        (SIOCPROTOPRIVATE + 0)
018: #define SIOCX25SSUBSCRIP        (SIOCPROTOPRIVATE + 1)
019: #define SIOCX25GFACILITIES      (SIOCPROTOPRIVATE + 2)
020: #define SIOCX25SFACILITIES      (SIOCPROTOPRIVATE + 3)
021: #define SIOCX25GCALLUSERDATA    (SIOCPROTOPRIVATE + 4)
022: #define SIOCX25SCALLUSERDATA    (SIOCPROTOPRIVATE + 5)
023: #define SIOCX25GCAUSEDIAG       (SIOCPROTOPRIVATE + 6)
024: #define SIOCX25SCUDMATCHLEN     (SIOCPROTOPRIVATE + 7)
025: #define SIOCX25CALLACCPTAPPRV   (SIOCPROTOPRIVATE + 8)
026: #define SIOCX25SENDCALLACCPT    (SIOCPROTOPRIVATE + 9)
027: #define SIOCX25GDTEFACILITIES (SIOCPROTOPRIVATE + 10)
028: #define SIOCX25SDTEFACILITIES (SIOCPROTOPRIVATE + 11)
029: #define SIOCX25SCAUSEDIAG       (SIOCPROTOPRIVATE + 12)
030: 
031: /*
032:  *      Values for {get,set}sockopt.
033:  */
034: #define X25_QBITINCL            1
035: 
036: /*
037:  *      X.25 Packet Size values.
038:  */
039: #define X25_PS16                4
040: #define X25_PS32                5
041: #define X25_PS64                6
042: #define X25_PS128               7
043: #define X25_PS256               8
044: #define X25_PS512               9
045: #define X25_PS1024              10
046: #define X25_PS2048              11
047: #define X25_PS4096              12
048: 
049: /*
050:  * An X.121 address, it is held as ASCII text, null terminated, up to 15
051:  * digits and a null terminator.
052:  */
053: struct x25_address {
054:         char x25_addr[16];
055: };
056: 
057: /*
058:  *      Linux X.25 Address structure, used for bind, and connect mostly.
059:  */
060: struct sockaddr_x25 {
061:         __kernel_sa_family_t sx25_family;       /* Must be AF_X25 */
062:         struct x25_address sx25_addr;           /* X.121 Address */
063: };
064: 
065: /*
066:  *      DTE/DCE subscription options.
067:  *
068:  *      As this is missing lots of options, user should expect major
069:  *      changes of this structure in 2.5.x which might break compatibilty.
070:  *      The somewhat ugly dimension 200-sizeof() is needed to maintain
071:  *      backward compatibility.
072:  */
073: struct x25_subscrip_struct {
074:         char device[200-sizeof(unsigned long)];
075:         unsigned long   global_facil_mask;      /* 0 to disable negotiation */
076:         unsigned int    extended;
077: };
078: 
079: /* values for above global_facil_mask */
080: 
081: #define X25_MASK_REVERSE        0x01    
082: #define X25_MASK_THROUGHPUT     0x02
083: #define X25_MASK_PACKET_SIZE    0x04
084: #define X25_MASK_WINDOW_SIZE    0x08
085: 
086: #define X25_MASK_CALLING_AE 0x10
087: #define X25_MASK_CALLED_AE 0x20
088: 
089: 
090: /*
091:  *      Routing table control structure.
092:  */
093: struct x25_route_struct {
094:         struct x25_address address;
095:         unsigned int       sigdigits;
096:         char               device[200];
097: };
098: 
099: /*
100:  *      Facilities structure.
101:  */
102: struct x25_facilities {
103:         unsigned int    winsize_in, winsize_out;
104:         unsigned int    pacsize_in, pacsize_out;
105:         unsigned int    throughput;
106:         unsigned int    reverse;
107: };
108: 
109: /*
110: * ITU DTE facilities
111: * Only the called and calling address
112: * extension are currently implemented.
113: * The rest are in place to avoid the struct
114: * changing size if someone needs them later
115: */
116: 
117: struct x25_dte_facilities {
118:         __u16 delay_cumul;
119:         __u16 delay_target;
120:         __u16 delay_max;
121:         __u8 min_throughput;
122:         __u8 expedited;
123:         __u8 calling_len;
124:         __u8 called_len;
125:         __u8 calling_ae[20];
126:         __u8 called_ae[20];
127: };
128: 
129: /*
130:  *      Call User Data structure.
131:  */
132: struct x25_calluserdata {
133:         unsigned int    cudlength;
134:         unsigned char   cuddata[128];
135: };
136: 
137: /*
138:  *      Call clearing Cause and Diagnostic structure.
139:  */
140: struct x25_causediag {
141:         unsigned char   cause;
142:         unsigned char   diagnostic;
143: };
144: 
145: /*
146:  *      Further optional call user data match length selection
147:  */
148: struct x25_subaddr {
149:         unsigned int cudmatchlength;
150: };
151: 
152: #endif
153: 


for client 3.149.230.44
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/