summaryrefslogtreecommitdiff
path: root/src/seq_window.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2014-02-07 19:07:48 +0000
committerChristian Pointner <equinox@anytun.org>2014-02-07 19:07:48 +0000
commitcf6655a6e29d23132190b6c04c08ab372214b9a4 (patch)
tree7aca25034e17fcf03bde80cc816dc3d9027f2195 /src/seq_window.c
parentcreated branch for RAIL mode (diff)
* inital commit for RAIL mode
- added information about it at manpage - updated output for --help * white space cleanups * updated copyright header
Diffstat (limited to 'src/seq_window.c')
-rw-r--r--src/seq_window.c16
1 files changed, 8 insertions, 8 deletions
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 <equinox@anytun.org>
+ *
+ * Copyright (C) 2007-2014 Christian Pointner <equinox@anytun.org>
*
* 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