Imported Upstream version 0.3.4
[anytun.git] / src / seqWindow.h
index e16e335..fa6adaa 100644 (file)
  *  tunneling and relaying of packets of any protocol.
  *
  *
- *  Copyright (C) 2007-2008 Othmar Gsenger, Erwin Nindl, 
+ *  Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl,
  *                          Christian Pointner <satp@wirdorange.org>
  *
  *  This file is part of Anytun.
  *
  *  Anytun is free software: you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License version 3 as
- *  published by the Free Software Foundation.
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  any later version.
  *
  *  Anytun is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -29,8 +30,8 @@
  *  along with anytun.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _SEQ_WINDOW_H_
-#define _SEQ_WINDOW_H_
+#ifndef ANYTUN_seqWindow_h_INCLUDED
+#define ANYTUN_seqWindow_h_INCLUDED
 
 #include <map>
 #include <deque>
@@ -41,7 +42,8 @@
 
 class SeqWindow;
 
-class SeqWindowElement {
+class SeqWindowElement
+{
 public:
   SeqWindowElement();
   ~SeqWindowElement();
@@ -50,7 +52,7 @@ public:
 
   seq_nr_t max_;
   window_size_t pos_;
-  u_int8_t* window_;
+  uint8_t* window_;
 };
 
 class SeqWindow
@@ -70,21 +72,20 @@ private:
   Mutex mutex_;
   SenderMap sender_;
 
-  SeqWindow(const SeqWindow &s);
-  void operator=(const SeqWindow &s);
+  SeqWindow(const SeqWindows);
+  void operator=(const SeqWindows);
 
-       friend class boost::serialization::access;
-       template<class Archive>
-       void serialize(Archive & ar, const unsigned int version)
-       {
-               Lock lock(mutex_);
-               //unsigned int serial = (unsigned int) window_size_;
-               //window_size_t serial = (window_size_t) window_size_;
-       ar & window_size_;
-       //TODO: Do not sync complete Sender Map!
-       // ar & sender_;
+  friend class boost::serialization::access;
+  template<class Archive>
+  void serialize(Archive& ar, const unsigned int version) {
+    Lock lock(mutex_);
+    //unsigned int serial = (unsigned int) window_size_;
+    //window_size_t serial = (window_size_t) window_size_;
+    ar& window_size_;
+    //TODO: Do not sync complete Sender Map!
+    // ar & sender_;
   }
+
 
 };