diff --git a/examples/sync-example.cc b/examples/sync-example.cc
new file mode 100644
index 0000000..57bf8b4
--- /dev/null
+++ b/examples/sync-example.cc
@@ -0,0 +1,26 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+
+#include "ns3/core-module.h"
+#include "ns3/sync-helper.h"
+
+using namespace ns3;
+
+
+int 
+main (int argc, char *argv[])
+{
+  bool verbose = true;
+
+  CommandLine cmd;
+  cmd.AddValue ("verbose", "Tell application to log if true", verbose);
+
+  cmd.Parse (argc,argv);
+
+  /* ... */
+
+  Simulator::Run ();
+  Simulator::Destroy ();
+  return 0;
+}
+
+
diff --git a/examples/wscript b/examples/wscript
new file mode 100644
index 0000000..3b46e2d
--- /dev/null
+++ b/examples/wscript
@@ -0,0 +1,6 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+def build(bld):
+    obj = bld.create_ns3_program('sync-example', ['sync'])
+    obj.source = 'sync-example.cc'
+
diff --git a/model/sync-app.cc b/model/sync-app.cc
new file mode 100644
index 0000000..2680859
--- /dev/null
+++ b/model/sync-app.cc
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
diff --git a/model/sync-app.h b/model/sync-app.h
new file mode 100644
index 0000000..a0310a3
--- /dev/null
+++ b/model/sync-app.h
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_APP_H
+#define SYNC_APP_H
+
+namespace ns3
+{
+
+namespace Sync
+{
+
+class App
+{
+public:
+private:
+};
+
+} // Sync
+
+} // ns3
+
+#endif // SYNC_APP_H
diff --git a/model/sync-ccnx-name-info.cc b/model/sync-ccnx-name-info.cc
new file mode 100644
index 0000000..f0a5473
--- /dev/null
+++ b/model/sync-ccnx-name-info.cc
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "sync-ccnx-name-info.h"
+#include "ns3/ccnx-name-components.h"
+
+#include <boost/lexical_cast.hpp>
+
+namespace ns3 {
+namespace Sync {
+
+
+CcnxNameInfo::CcnxNameInfo (Ptr<const CcnxNameComponents> name)
+  : m_name (name)
+{
+}
+
+CcnxNameInfo::~CcnxNameInfo ()
+{
+}
+
+std::string
+CcnxNameInfo::toString () const
+{
+  return boost::lexical_cast<std::string> (*m_name);
+}
+
+
+} // Sync
+} // ns3
diff --git a/model/sync-ccnx-name-info.h b/model/sync-ccnx-name-info.h
new file mode 100644
index 0000000..89ea006
--- /dev/null
+++ b/model/sync-ccnx-name-info.h
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_CCNX_NAME_INFO_H
+#define SYNC_CCNX_NAME_INFO_H
+
+#include "sync-name-info.h"
+#include "ns3/ptr.h"
+
+namespace ns3 {
+
+class CcnxNameComponents;
+
+namespace Sync {
+
+class CcnxNameInfo : public NameInfo
+{
+public:
+  /**
+   * @brief Constructor
+   * @param name full (routable) name for the participant
+   */
+  CcnxNameInfo (Ptr<const CcnxNameComponents> name);
+  virtual ~CcnxNameInfo ();
+  
+  // from NameInfo
+  virtual std::string
+  toString () const;
+  
+private:
+  Ptr<const CcnxNameCompnents> m_name;
+};
+
+} // Sync
+} // ns3
+
+#endif // SYNC_CCNX_NAME_INFO_H
diff --git a/model/sync-diff-leaf.cc b/model/sync-diff-leaf.cc
new file mode 100644
index 0000000..2680859
--- /dev/null
+++ b/model/sync-diff-leaf.cc
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
diff --git a/model/sync-diff-leaf.h b/model/sync-diff-leaf.h
new file mode 100644
index 0000000..d857690
--- /dev/null
+++ b/model/sync-diff-leaf.h
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_DIFF_LEAF_H
+#define SYNC_DIFF_LEAF_H
+
+#include "sync-leaf.h"
+
+namespace ns3 {
+namespace Sync {
+
+/**
+ * @ingroup sync
+ * @brief Annotation for SYNC leaf
+ */
+enum Operation
+  {
+    UPDATE, ///< @brief Leaf was added or updated
+    REMOVE  ///< @brief Leaf was removed
+  };
+
+/**
+ * @ingroup sync
+ * @brief Annotated SYNC leaf 
+ */
+class DiffLeaf : public Leaf
+{
+public:
+  /**
+   * @brief Constructor to create an UPDATE diff leaf
+   * @param info Smart pointer to leaf's name
+   * @param seq  Initial sequence number of the pointer
+   */
+  DiffLeaf (boost::shared_ptr<const NameInfo> info, const SeqNo &seq)
+    : Leaf (info, seq)
+    , m_op (Operation::UPDATE)
+  {
+  }
+
+  /**
+   * @brief Constructor to create an REMOVE diff leaf
+   * @param info Smart pointer to leaf's name
+   *
+   * This constructor creates a leaf with phony sequence number
+   * with 0 session ID and 0 sequence number
+   */
+  DiffLeaf (boost::shared_ptr<const NameInfo> info)
+    : Leaf (info, SeqNo (0,0))
+    , m_op (Operation::REMOVE)
+  {
+  }
+
+  virtual ~DiffLeaf ()
+  {
+  }
+
+  Operation
+  getOperation () const
+  {
+    return m_op;
+  }
+  
+private:
+  Operation m_op;
+};
+
+} // Sync
+} // ns3
+
+#endif // SYNC_DIFF_LEAF_H
diff --git a/model/sync-diff-state.cc b/model/sync-diff-state.cc
new file mode 100644
index 0000000..b26a756
--- /dev/null
+++ b/model/sync-diff-state.cc
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "sync-diff-state.h"
+
+#include <boost/make_shared.hpp>
+
+using namespace boost;
+
+namespace ns3 {
+namespace Sync {
+
+DiffState::DiffState ()
+  : m_next (0)
+{
+}
+
+DiffState::~DiffState ()
+{
+}
+
+DiffStatePtr
+DiffState::diff () const
+{
+  DiffStatePtr ret = make_shared<DiffState> ();
+
+  DiffState *state = m_next;
+  while (state != 0)
+    {
+      *ret += *state;
+      state = state->m_next;
+    }
+
+  return ret;
+}
+
+DiffState &
+DiffState::operator += (const DiffState &state)
+{
+  return *this;
+}
+  
+// from State
+virtual void
+DiffState::update (NameInfoConstPtr info, const SeqNo &seq)
+{
+  LeafContainer::iterator item = m_leafs.find (info);
+  if (item != m_leafs.end ())
+    m_leafs.remove (item);
+  
+  m_leafs.insert (make_shared<DiffLeaf> (info, cref (seq)));
+}
+
+virtual void
+DiffState::remove (NameInfoConstPtr info)
+{
+  LeafContainer::iterator item = m_leafs.find (info);
+  if (item != m_leafs.end ())
+    m_leafs.remove (item);
+
+  m_leafs.insert (make_shared<DiffLeaf> (info));
+}
+
+
+} // ns3
+} // Sync
diff --git a/model/sync-diff-state.h b/model/sync-diff-state.h
new file mode 100644
index 0000000..49f61ae
--- /dev/null
+++ b/model/sync-diff-state.h
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_DIFF_STATE_H
+#define SYNC_DIFF_STATE_H
+
+#include "sync-state.h"
+
+namespace ns3 {
+namespace Sync {
+
+class DiffState;
+typedef boost::shared_ptr<DiffState> DiffStatePtr;
+typedef boost::shared_ptr<DiffState> DiffStateConstPtr;
+
+/**
+ * @ingroup ccnx
+ * @brief Differential SYNC state
+ */
+class DiffState : public State
+{
+public:
+  /**
+   * @see Default constructor
+   */
+  DiffState ();
+  virtual ~DiffState ();
+
+  /**
+   * @brief Set successor for the diff state
+   * @param next successor state
+   */
+  void
+  setNext (DiffStatePtr next)
+  {
+    m_next = next;
+  }
+
+  // void
+  // setDigest (Hash digest);
+
+  // Hash
+  // getDigest () const;
+
+  /**
+   * @brief Accumulate differences from `this' state to the most current state
+   * @returns Accumulated differences from `this' state to the most current state
+   */
+  DiffStatePtr
+  diff () const;
+
+  /**
+   * @brief Combine differences from `this' and `state'
+   * @param state Differential state to combine with
+   * @return Combined differences
+   *
+   * In case of collisions, `this' leaf will be replaced with the leaf of `state'
+   */
+  DiffState&
+  operator += (const DiffState &state);
+  
+  // from State
+  virtual void
+  update (NameInfoConstPtr info, const SeqNo &seq);
+
+  virtual void
+  remove (NameInfoConstPtr info);
+  
+private:
+  DiffStatePtr m_next;
+  // Hash m_digest;
+};
+
+} // Sync
+} // ns3
+
+#endif // SYNC_DIFF_STATE_H
diff --git a/model/sync-full-state.cc b/model/sync-full-state.cc
new file mode 100644
index 0000000..696ac3c
--- /dev/null
+++ b/model/sync-full-state.cc
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "sync-full-state.h"
+
+#include "ns3/simulator.h"
+
+#include <boost/make_shared.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/lambda/bind.hpp>
+
+using namespace boost;
+namespace ll = boost::lambda;
+
+namespace ns3 {
+namespace Sync {
+
+
+FullState::FullState ()
+  : m_lastUpdated (0)
+{
+}
+
+FullState::~FullState ()
+{
+}
+
+Time
+FullState::getTimeFromLastUpdate () const
+{
+  return Simulator::Now () - m_lastUpdated;
+}
+  
+// from State
+void
+FullState::update (NameInfoConstPtr info, const SeqNo &seq)
+{
+  m_lastUpdated = Simulator::Now ();
+
+  LeafContainer::iterator item = m_leafs.find (*info);
+  if (item == m_leafs.end ())
+    {
+      m_leafs.insert (make_shared<Leaf> (info, cref (seq)));
+    }
+  else
+    {
+      m_leafs.modify (item, ll::bind (&Leaf::setSeq, ll::_1, cref (seq)));
+    }
+}
+
+void
+FullState::remove (NameInfoConstPtr info)
+{
+  m_lastUpdated = Simulator::Now ();
+
+  m_leafs.remove (info);
+}
+
+
+} // Sync
+} // ns3
diff --git a/model/sync-full-state.h b/model/sync-full-state.h
new file mode 100644
index 0000000..56d7f0d
--- /dev/null
+++ b/model/sync-full-state.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_FULL_STATE_H
+#define SYNC_FULL_STATE_H
+
+#include "sync-state.h"
+
+namespace ns3 {
+namespace Sync {
+
+/**
+ * \ingroup sync
+ * @brief Cumulative SYNC state
+ */
+class FullState : public State
+{
+public:
+  /**
+   * @brief Default constructor
+   */
+  FullState ();
+  virtual ~FullState ();
+
+  /**
+   * @brief Get time period since last state update
+   *
+   * This value can be used to randomize reconciliation waiting time in SyncApp
+   */
+  Time
+  getTimeFromLastUpdate () const;
+  
+  // from State
+  virtual void
+  update (NameInfoConstPtr info, const SeqNo &seq);
+
+  virtual void
+  remove (NameInfoConstPtr info);
+  
+private:
+  Time m_lastUpdated; ///< @brief Time when state was updated last time
+};
+
+
+} // Sync
+} // ns3
+
+#endif // SYNC_STATE_H
diff --git a/model/sync-leaf.cc b/model/sync-leaf.cc
new file mode 100644
index 0000000..2680859
--- /dev/null
+++ b/model/sync-leaf.cc
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
diff --git a/model/sync-leaf.h b/model/sync-leaf.h
new file mode 100644
index 0000000..151f2c6
--- /dev/null
+++ b/model/sync-leaf.h
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_LEAF_H
+#define SYNC_LEAF_H
+
+#include "sync-seq-no.h"
+#include <boost/shared_ptr.hpp>
+
+namespace ns3 {
+namespace Sync {
+
+class NameInfo;
+
+/**
+ * \ingroup sync
+ * @brief Sync tree leaf
+ */
+class Leaf
+{
+public:
+  /**
+   * @brief Constructor
+   * @param info Smart pointer to leaf's name
+   * @param seq  Initial sequence number of the pointer
+   */
+  Leaf (boost::shared_ptr<const NameInfo> info, const SeqNo &seq)
+    : m_info (info)
+    , m_seq (seq)
+  { }
+
+  virtual ~Leaf ()
+  {
+  }
+  
+  /**
+   * @brief Get name of the leaf
+   */
+  const NameInfo &
+  getInfo () const
+  {
+    return *m_info;
+  }
+
+  /**
+   * @brief Get sequence number of the leaf
+   */
+  const SeqNo&
+  getSeq () const
+  {
+    return m_seq;
+  }
+
+  /**
+   * @brief Update sequence number of the leaf
+   * @param seq Sequence number
+   *
+   * Sequence number is updated to the largest value among this->m_seq and seq
+   */
+  void
+  setSeq (const SeqNo &seq)
+  {
+    m_seq = std::max (m_seq, seq);
+  }
+  
+private:
+  NameInfoConstPtr m_info;
+  SeqNo m_seq;
+};
+
+typedef boost::shared_ptr<Leaf> LeafPtr;
+
+} // Sync
+} // ns3
+
+#endif // SYNC_LEAF_H
diff --git a/model/sync-name-info.cc b/model/sync-name-info.cc
new file mode 100644
index 0000000..2680859
--- /dev/null
+++ b/model/sync-name-info.cc
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
diff --git a/model/sync-name-info.h b/model/sync-name-info.h
new file mode 100644
index 0000000..d0ec575
--- /dev/null
+++ b/model/sync-name-info.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_NAME_INFO_H
+#define SYNC_NAME_INFO_H
+
+namespace ns3 {
+namespace Sync {
+
+/**
+ * @brief Abstraction of the leaf name
+ */
+class NameInfo
+{
+public:
+  virtual ~NameInfo () = 0;
+  /**
+   * @brief Calculates digest of the name
+   */
+  // Digest
+  // getDigest () const;
+
+  virtual std::string
+  toString () const = 0;
+};
+
+typedef boost::shared_ptr<NameInfo> NameInfoPtr;
+typedef boost::shared_ptr<const NameInfo> NameInfoConstPtr;
+
+} // Sync
+} // ns3
+
+#endif // SYNC_NAME_INFO_H
diff --git a/model/sync-name-manager.cc b/model/sync-name-manager.cc
new file mode 100644
index 0000000..2680859
--- /dev/null
+++ b/model/sync-name-manager.cc
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
diff --git a/model/sync-name-manager.h b/model/sync-name-manager.h
new file mode 100644
index 0000000..90c71e0
--- /dev/null
+++ b/model/sync-name-manager.h
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_NAME_MANAGER_H
+#define SYNC_NAME_MANAGER_H
+
+namespace ns3
+{
+
+namespace Sync
+{
+
+class NameManager
+{
+public:
+private:
+};
+
+} // Sync
+
+} // ns3
+
+#endif // SYNC_NAME_MANAGER_H
diff --git a/model/sync-seq-no.h b/model/sync-seq-no.h
new file mode 100644
index 0000000..1461acb
--- /dev/null
+++ b/model/sync-seq-no.h
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_SEQ_NO_H
+#define SYNC_SEQ_NO_H
+
+namespace ns3
+{
+
+namespace Sync
+{
+
+/**
+ * @brief Sequence number abstraction
+ *
+ * 
+ */
+struct SeqNo
+{
+public:
+  /**
+   * @brief Constructor with just sequence number. Session assumed to be zero
+   * @param seq Sequence number
+   */
+  SeqNo (uint32_t seq)
+    : m_session (0)
+    , m_seq (seq)
+  { }
+
+  /**
+   * @brief Constructor with session and sequence id
+   * @param session Session ID
+   * @param seq Sequence number
+   */
+  SeqNo (uint32_t session, uint32_t seq)
+    : m_session (session)
+    , m_seq (seq)
+  { }
+  
+  /**
+   * @brief Session ID (e.g., after crash, application will choose new session ID.
+   *
+   * Note that session IDs for the same name should always increase. So, the good choice
+   * for the session ID is client's timestamp
+   */
+  uint32_t m_session;
+
+  /**
+   * @brief Sequence number
+   *
+   * Sequence number for a session always starts with 0 and goes to max value.
+   *
+   * For now, wrapping sequence number after max to zero is not supported
+   */
+  uint32_t m_seq;
+
+  /**
+   * @brief Compare if one sequence number is lower
+   * @param seq Another sequence number to compare with
+   *
+   * tuple (session1, seq1) is less than (session2, seq2) in two cases:
+   * 1. session1 < session2
+   * 2. session1 == session2 and seq1 < seq2
+   */
+  bool
+  operator < (const SeqNo &seq) const
+  {
+    return m_session < seq.m_session || (m_session == seq.m_session && m_seq < seq.m_seq);
+  }
+
+  /**
+   * @brief Compare if two sequence numbers are equal
+   * @param seq Another sequence number to compare with
+   */
+  bool
+  operator == (const SeqNo &seq) const
+  {
+    return m_session == seq.m_session && m_seq == seq.m_seq;
+  }
+};
+
+} // Sync
+
+} // ns3
+
+#endif // SYNC_SEQ_NO_H
diff --git a/model/sync-state-leaf-container.h b/model/sync-state-leaf-container.h
new file mode 100644
index 0000000..f66c966
--- /dev/null
+++ b/model/sync-state-leaf-container.h
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_STATE_LEAF_CONTAINER
+#define SYNC_STATE_LEAF_CONTAINER
+
+#include <boost/multi_index_container.hpp>
+// #include <boost/multi_index/tag.hpp>
+// #include <boost/multi_index/ordered_index.hpp>
+// #include <boost/multi_index/composite_key.hpp>
+#include <boost/multi_index/hashed_index.hpp>
+// #include <boost/multi_index/random_access_index.hpp>
+// #include <boost/multi_index/member.hpp>
+#include <boost/multi_index/mem_fun.hpp>
+
+namespace mi = boost::multi_index;
+
+namespace ns3 {
+namespace Sync {
+
+/**
+ * \ingroup sync
+ * @brief Container for SYNC leaves
+ */
+struct LeafContainer : public mi::multi_index_container<
+    LeafPtr,
+    mi::indexed_by<
+      // For fast access to elements using NameInfo
+      mi::hashed_unique<
+        mi::const_mem_fun<Leaf, const NameInfo&, &Leaf::getInfo>,
+        LeafHash (),
+        LeafEqual () 
+      >
+    >
+   >
+{
+};
+
+} // Sync
+} // ns3
+
+#endif // SYNC_STATE_LEAF_CONTAINER
diff --git a/model/sync-state-manager.cc b/model/sync-state-manager.cc
new file mode 100644
index 0000000..2680859
--- /dev/null
+++ b/model/sync-state-manager.cc
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
diff --git a/model/sync-state-manager.h b/model/sync-state-manager.h
new file mode 100644
index 0000000..2d05055
--- /dev/null
+++ b/model/sync-state-manager.h
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_STATE_MANAGER_H
+#define SYNC_STATE_MANAGER_H
+
+namespace ns3
+{
+
+namespace Sync
+{
+
+class StateManager
+{
+public:
+private:
+};
+
+} // Sync
+
+} // ns3
+
+#endif // SYNC_STATE_MANAGER_H
diff --git a/model/sync-state.cc b/model/sync-state.cc
new file mode 100644
index 0000000..2680859
--- /dev/null
+++ b/model/sync-state.cc
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
diff --git a/model/sync-state.h b/model/sync-state.h
new file mode 100644
index 0000000..c6511e5
--- /dev/null
+++ b/model/sync-state.h
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * 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;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_STATE_H
+#define SYNC_STATE_H
+
+#include "sync-state-leaf-container.h"
+
+namespace ns3 {
+
+/**
+ * \defgroup sync SYNC protocol
+ *
+ * Implementation of SYNC protocol
+ */
+namespace Sync {
+
+/**
+ * \ingroup sync
+ * @brief Container for state leaves and definition of the abstract interface to work with State objects
+ */
+class State
+{
+public:
+  virtual ~State () = 0;
+  
+  /**
+   * @brief Add or update leaf to the state tree
+   *
+   * @param info name of the leaf
+   * @param seq  sequence number of the leaf
+   */
+  virtual void
+  update (NameInfoConstPtr info, const SeqNo &seq) = 0;
+
+  /**
+   * @brief Remove leaf from the state tree
+   *
+   * @param info name of the leaf
+   */
+  virtual void
+  remove (NameInfoConstPtr info) = 0;
+
+protected:
+  LeafContainer m_leaves;
+};
+
+} // Sync
+} // ns3
+
+#endif // SYNC_STATE_H
diff --git a/wscript b/wscript
new file mode 100644
index 0000000..4120c88
--- /dev/null
+++ b/wscript
@@ -0,0 +1,39 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+# def options(opt):
+#     pass
+
+# def configure(conf):
+#     conf.check_nonfatal(header_name='stdint.h', define_name='HAVE_STDINT_H')
+
+def build (bld):
+    deps = ['core', 'network', 'NDNabstraction']
+    if bld.env['ENABLE_PYTHON_BINDINGS']:
+        deps.append ('visualizer')
+
+    module = bld.create_ns3_module ('sync', deps)
+    module.uselib = 'BOOST BOOST_IOSTREAMS'
+
+    # tests = bld.create_ns3_module_test_library('sync')
+    # tests.source = [
+    #     'test/sync-test-suite.cc',
+    #     ]
+
+    headers = bld.new_task_gen(features=['ns3header'])
+    headers.module = 'sync'
+    headers.source = [
+        'model/sync-app.h',
+        ]
+
+    # if not bld.env['ENABLE_NDN_ABSTRACT']:
+    #     bld.env['MODULES_NOT_BUILT'].append('NDNabstraction')
+    #     return
+   
+    module.source = bld.path.ant_glob(['model/*.cc',
+                                       'helper/*.cc'])
+
+    # if bld.env.ENABLE_EXAMPLES:
+    #     bld.add_subdirs('examples')
+
+    # bld.ns3_python_bindings()
+
