blob: f9c50e19059aafe019701f320eda147e4984376d [file] [log] [blame]
Junxiao Shi6e694322014-04-03 10:27:13 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NFD_MGMT_FACE_FLAGS_HPP
8#define NFD_MGMT_FACE_FLAGS_HPP
9
10#include "face/face.hpp"
11#include <ndn-cpp-dev/management/nfd-face-flags.hpp>
12
13namespace nfd {
14
15inline uint64_t
16getFaceFlags(const Face& face)
17{
18 uint64_t flags = 0;
19 if (face.isLocal()) {
20 flags |= ndn::nfd::FACE_IS_LOCAL;
21 }
22 if (face.isOnDemand()) {
23 flags |= ndn::nfd::FACE_IS_ON_DEMAND;
24 }
25 return flags;
26}
27
28} // namespace nfd
29
30#endif // NFD_MGMT_FACE_FLAGS_HPP