diff options
author | Shaun Pereira <spereira@tusc.com.au> | 2005-06-23 01:15:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-23 01:15:01 -0400 |
commit | cb65d506c34c86df5bcef939ce5a8666a451bd8b (patch) | |
tree | 4cf281ba2e90c9c20d28a80d1efc8292aaba699a /include/linux/x25.h | |
parent | 68d318720052154bc6b2513b0f15d0d947cc53c9 (diff) |
[X25]: Selective sub-address matching with call user data.
From: Shaun Pereira <spereira@tusc.com.au>
This is the first (independent of the second) patch of two that I am
working on with x25 on linux (tested with xot on a cisco router). Details
are as follows.
Current state of module:
A server using the current implementation (2.6.11.7) of the x25 module will
accept a call request/ incoming call packet at the listening x.25 address,
from all callers to that address, as long as NO call user data is present
in the packet header.
If the server needs to choose to accept a particular call request/ incoming
call packet arriving at its listening x25 address, then the kernel has to
allow a match of call user data present in the call request packet with its
own. This is required when multiple servers listen at the same x25 address
and device interface. The kernel currently matches ALL call user data, if
present.
Current Changes:
This patch is a follow up to the patch submitted previously by Andrew
Hendry, and allows the user to selectively control the number of octets of
call user data in the call request packet, that the kernel will match. By
default no call user data is matched, even if call user data is present.
To allow call user data matching, a cudmatchlength > 0 has to be passed
into the kernel after which the passed number of octets will be matched.
Otherwise the kernel behavior is exactly as the original implementation.
This patch also ensures that as is normally the case, no call user data
will be present in the Call accepted / call connected packet sent back to
the caller
Future Changes on next patch:
There are cases however when call user data may be present in the call
accepted packet. According to the X.25 recommendation (ITU-T 10/96)
section 5.2.3.2 call user data may be present in the call accepted packet
provided the fast select facility is used. My next patch will include this
fast select utility and the ability to send up to 128 octets call user data
in the call accepted packet provided the fast select facility is used. I
am currently testing this, again with xot on linux and cisco.
Signed-off-by: Shaun Pereira <spereira@tusc.com.au>
(With a fix from Alexey Dobriyan <adobriyan@gmail.com>)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/x25.h')
-rw-r--r-- | include/linux/x25.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/x25.h b/include/linux/x25.h index 7531cfed5885..6f43b3d20248 100644 --- a/include/linux/x25.h +++ b/include/linux/x25.h | |||
@@ -4,6 +4,8 @@ | |||
4 | * History | 4 | * History |
5 | * mar/20/00 Daniela Squassoni Disabling/enabling of facilities | 5 | * mar/20/00 Daniela Squassoni Disabling/enabling of facilities |
6 | * negotiation. | 6 | * negotiation. |
7 | * apr/02/05 Shaun Pereira Selective sub address matching with | ||
8 | * call user data | ||
7 | */ | 9 | */ |
8 | 10 | ||
9 | #ifndef X25_KERNEL_H | 11 | #ifndef X25_KERNEL_H |
@@ -16,6 +18,7 @@ | |||
16 | #define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4) | 18 | #define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4) |
17 | #define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5) | 19 | #define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5) |
18 | #define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6) | 20 | #define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6) |
21 | #define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7) | ||
19 | 22 | ||
20 | /* | 23 | /* |
21 | * Values for {get,set}sockopt. | 24 | * Values for {get,set}sockopt. |
@@ -109,4 +112,11 @@ struct x25_causediag { | |||
109 | unsigned char diagnostic; | 112 | unsigned char diagnostic; |
110 | }; | 113 | }; |
111 | 114 | ||
115 | /* | ||
116 | * Further optional call user data match length selection | ||
117 | */ | ||
118 | struct x25_subaddr { | ||
119 | unsigned int cudmatchlength; | ||
120 | }; | ||
121 | |||
112 | #endif | 122 | #endif |