diff options
author | Shaun Pereira <spereira@tusc.com.au> | 2005-06-23 01:16:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-23 01:16:17 -0400 |
commit | ebc3f64b864fc16a594c2e63bf55a55c7d42084b (patch) | |
tree | 95040f32ad5902051527b91966118e565d48865b /include/net | |
parent | cb65d506c34c86df5bcef939ce5a8666a451bd8b (diff) |
[X25]: Fast select with no restriction on response
This patch is a follow up to patch 1 regarding "Selective Sub Address
matching with call user data". It allows use of the Fast-Select-Acceptance
optional user facility for X.25.
This patch just implements fast select with no restriction on response
(NRR). What this means (according to ITU-T Recomendation 10/96 section
6.16) is that if in an incoming call packet, the relevant facility bits are
set for fast-select-NRR, then the called DTE can issue a direct response to
the incoming packet using a call-accepted packet that contains
call-user-data. This patch allows such a response.
The called DTE can also respond with a clear-request packet that contains
call-user-data. However, this feature is currently not implemented by the
patch.
How is Fast Select Acceptance used?
By default, the system does not allow fast select acceptance (as before).
To enable a response to fast select acceptance,
After a listen socket in created and bound as follows
socket(AF_X25, SOCK_SEQPACKET, 0);
bind(call_soc, (struct sockaddr *)&locl_addr, sizeof(locl_addr));
but before a listen system call is made, the following ioctl should be used.
ioctl(call_soc,SIOCX25CALLACCPTAPPRV);
Now the listen system call can be made
listen(call_soc, 4);
After this, an incoming-call packet will be accepted, but no call-accepted
packet will be sent back until the following system call is made on the socket
that accepts the call
ioctl(vc_soc,SIOCX25SENDCALLACCPT);
The network (or cisco xot router used for testing here) will allow the
application server's call-user-data in the call-accepted packet,
provided the call-request was made with Fast-select NRR.
Signed-off-by: Shaun Pereira <spereira@tusc.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/x25.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/x25.h b/include/net/x25.h index 9dd70dd4a9b7..8b39b98876e8 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -79,6 +79,8 @@ enum { | |||
79 | #define X25_DEFAULT_PACKET_SIZE X25_PS128 /* Default Packet Size */ | 79 | #define X25_DEFAULT_PACKET_SIZE X25_PS128 /* Default Packet Size */ |
80 | #define X25_DEFAULT_THROUGHPUT 0x0A /* Deafult Throughput */ | 80 | #define X25_DEFAULT_THROUGHPUT 0x0A /* Deafult Throughput */ |
81 | #define X25_DEFAULT_REVERSE 0x00 /* Default Reverse Charging */ | 81 | #define X25_DEFAULT_REVERSE 0x00 /* Default Reverse Charging */ |
82 | #define X25_DENY_ACCPT_APPRV 0x01 /* Default value */ | ||
83 | #define X25_ALLOW_ACCPT_APPRV 0x00 /* Control enabled */ | ||
82 | 84 | ||
83 | #define X25_SMODULUS 8 | 85 | #define X25_SMODULUS 8 |
84 | #define X25_EMODULUS 128 | 86 | #define X25_EMODULUS 128 |
@@ -94,7 +96,7 @@ enum { | |||
94 | #define X25_FAC_CLASS_C 0x80 | 96 | #define X25_FAC_CLASS_C 0x80 |
95 | #define X25_FAC_CLASS_D 0xC0 | 97 | #define X25_FAC_CLASS_D 0xC0 |
96 | 98 | ||
97 | #define X25_FAC_REVERSE 0x01 | 99 | #define X25_FAC_REVERSE 0x01 /* also fast select */ |
98 | #define X25_FAC_THROUGHPUT 0x02 | 100 | #define X25_FAC_THROUGHPUT 0x02 |
99 | #define X25_FAC_PACKET_SIZE 0x42 | 101 | #define X25_FAC_PACKET_SIZE 0x42 |
100 | #define X25_FAC_WINDOW_SIZE 0x43 | 102 | #define X25_FAC_WINDOW_SIZE 0x43 |
@@ -135,7 +137,7 @@ struct x25_sock { | |||
135 | struct x25_address source_addr, dest_addr; | 137 | struct x25_address source_addr, dest_addr; |
136 | struct x25_neigh *neighbour; | 138 | struct x25_neigh *neighbour; |
137 | unsigned int lci, cudmatchlength; | 139 | unsigned int lci, cudmatchlength; |
138 | unsigned char state, condition, qbitincl, intflag; | 140 | unsigned char state, condition, qbitincl, intflag, accptapprv; |
139 | unsigned short vs, vr, va, vl; | 141 | unsigned short vs, vr, va, vl; |
140 | unsigned long t2, t21, t22, t23; | 142 | unsigned long t2, t21, t22, t23; |
141 | unsigned short fraglen; | 143 | unsigned short fraglen; |