X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fx25%2Fx25_subr.c;h=fd9b13029642ae7c5de3b90db394baa1ed66c398;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c40d4c5d46a1c870e270ee4e0d265f015e1edf09;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/net/x25/x25_subr.c b/net/x25/x25_subr.c index c40d4c5d4..fd9b13029 100644 --- a/net/x25/x25_subr.c +++ b/net/x25/x25_subr.c @@ -21,25 +21,11 @@ * jun/24/01 Arnaldo C. Melo use skb_queue_purge, cleanups */ -#include -#include -#include -#include #include -#include -#include #include -#include -#include -#include -#include #include #include #include -#include -#include -#include -#include #include /* @@ -367,3 +353,22 @@ void x25_check_rbuf(struct sock *sk) x25_stop_timer(sk); } } + +/* + * Compare 2 calluserdata structures, used to find correct listening sockets + * when call user data is used. + */ +int x25_check_calluserdata(struct x25_calluserdata *ours, struct x25_calluserdata *theirs) +{ + int i; + if (ours->cudlength != theirs->cudlength) + return 0; + + for (i=0;icudlength;i++) { + if (ours->cuddata[i] != theirs->cuddata[i]) { + return 0; + } + } + return 1; +} +