From cf6655a6e29d23132190b6c04c08ab372214b9a4 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 7 Feb 2014 19:07:48 +0000 Subject: * inital commit for RAIL mode - added information about it at manpage - updated output for --help * white space cleanups * updated copyright header --- src/seq_window.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/seq_window.c') diff --git a/src/seq_window.c b/src/seq_window.c index 0f58adb..3a1355f 100644 --- a/src/seq_window.c +++ b/src/seq_window.c @@ -13,9 +13,9 @@ * message authentication based on the methodes used by SRTP. It is * intended to deliver a generic, scaleable and secure solution for * tunneling and relaying of packets of any protocol. - * * - * Copyright (C) 2007-2010 Christian Pointner + * + * Copyright (C) 2007-2014 Christian Pointner * * This file is part of uAnytun. * @@ -152,12 +152,12 @@ int seq_win_check_and_add(seq_win_t* win, sender_id_t sender_id, seq_nr_t seq_nr ptr->max_ -= SEQ_NR_MAX/2; else if(shifted == 2) ptr->max_ += SEQ_NR_MAX/2; - + return 0; } - + seq_nr_t diff = ptr->max_ - seq_nr; - window_size_t pos = diff > ptr->pos_ ? ptr->pos_ + win->size_ : ptr->pos_; + window_size_t pos = diff > ptr->pos_ ? ptr->pos_ + win->size_ : ptr->pos_; pos -= diff; if(shifted == 1) @@ -170,7 +170,7 @@ int seq_win_check_and_add(seq_win_t* win, sender_id_t sender_id, seq_nr_t seq_nr return ret; } ptr = ptr->next_; - } + } if(!win->first_) { win->first_ = seq_win_new_element(sender_id, seq_nr, win->size_); if(!win->first_) @@ -184,7 +184,7 @@ int seq_win_check_and_add(seq_win_t* win, sender_id_t sender_id, seq_nr_t seq_nr if(!ptr->next_) return -2; } - + return 0; } @@ -204,7 +204,7 @@ void seq_win_print(seq_win_t* win) printf("O"); else printf("."); - + if(i) i--; else -- cgit v1.2.3