X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=net%2Fdccp%2Fdccp.h;fp=net%2Fdccp%2Fdccp.h;h=a5c5475724c0bf56f97348dcd40d2b5ebeed912e;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=1fe509148689d4d0ddd063e94683e3d32c8dfe9f;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 1fe509148..a5c547572 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -5,14 +5,13 @@ * * An implementation of the DCCP protocol * Copyright (c) 2005 Arnaldo Carvalho de Melo - * Copyright (c) 2005 Ian McDonald + * Copyright (c) 2005-6 Ian McDonald * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include #include #include #include @@ -82,6 +81,14 @@ static inline u64 max48(const u64 seq1, const u64 seq2) return after48(seq1, seq2) ? seq1 : seq2; } +/* is seq1 next seqno after seq2 */ +static inline int follows48(const u64 seq1, const u64 seq2) +{ + int diff = (seq1 & 0xFFFF) - (seq2 & 0xFFFF); + + return diff==1; +} + enum { DCCP_MIB_NUM = 0, DCCP_MIB_ACTIVEOPENS, /* ActiveOpens */