fib-update.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #include "fib-update.hpp"
27 
28 namespace nfd {
29 namespace rib {
30 
31 FibUpdate
32 FibUpdate::createAddUpdate(const Name& name, const uint64_t faceId, const uint64_t cost)
33 {
34  FibUpdate update;
35 
36  update.name = name;
37  update.faceId = faceId;
38  update.cost = cost;
39  update.action = ADD_NEXTHOP;
40 
41  return update;
42 }
43 
45 FibUpdate::createRemoveUpdate(const Name& name, const uint64_t faceId)
46 {
47  FibUpdate update;
48 
49  update.name = name;
50  update.faceId = faceId;
51  update.action = REMOVE_NEXTHOP;
52 
53  return update;
54 }
55 
56 } // namespace rib
57 } // namespace nfd
static FibUpdate createAddUpdate(const Name &name, const uint64_t faceId, const uint64_t cost)
Definition: fib-update.cpp:32
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition: algorithm.hpp:32
represents a FIB update
Definition: fib-update.hpp:37
static FibUpdate createRemoveUpdate(const Name &name, const uint64_t faceId)
Definition: fib-update.cpp:45