fib: add EndpointId field in NextHop record

refs: #4284

Change-Id: If0cfc21cfa81d6fa3c1590ecdce8fbbc1ea95e13
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index 4b94c21..cfdc4f1 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -105,10 +105,15 @@
   void
   erase(const Entry& entry);
 
-  /** \brief removes the NextHop record for face
+  /** \brief removes the NextHop record for \p face with a given \p endpointId
    */
   void
-  removeNextHop(Entry& entry, const Face& face);
+  removeNextHop(Entry& entry, const Face& face, uint64_t endpointId);
+
+  /** \brief removes the NextHop record for \p face for any \p endpointId
+   */
+  void
+  removeNextHopByFace(Entry& entry, const Face& face);
 
 public: // enumeration
   typedef boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range> Range;
@@ -144,6 +149,11 @@
   void
   erase(name_tree::Entry* nte, bool canDeleteNte = true);
 
+  /** \brief erase \p entry if it contains no nexthop record
+   */
+  void
+  eraseIfEmpty(Entry& entry);
+
   Range
   getRange() const;