1 /**************************************************************************** 2 * Copyright (C) 2014-2021 Cisco and/or its affiliates. All rights reserved. 3 * Copyright (C) 2012-2013 Sourcefire, Inc. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License Version 2 as 7 * published by the Free Software Foundation. You may not use, modify or 8 * distribute this program under any other version of the GNU General 9 * Public License. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 * 20 ****************************************************************************/ 21 22 #ifndef _SF_SEQNUMS_H_ 23 #define _SF_SEQNUMS_H_ 24 25 /* Macros to deal with sequence numbers - p810 TCP Illustrated vol 2 */ 26 #define SEQ_LT(a,b) ((int)((a) - (b)) < 0) 27 #define SEQ_LEQ(a,b) ((int)((a) - (b)) <= 0) 28 #define SEQ_GT(a,b) ((int)((a) - (b)) > 0) 29 #define SEQ_GEQ(a,b) ((int)((a) - (b)) >= 0) 30 #define SEQ_EQ(a,b) ((int)((a) - (b)) == 0) 31 32 #endif // _SF_SEQNUMS_H_ 33