| * Copyright (C) 2013 Regents of the University of California. |
| * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| * See COPYING for copyright and distribution information. |
| #include "forwarding-entry.hpp" |
| ForwardingEntry::set(const struct ndn_ForwardingEntry& forwardingEntryStruct) |
| if (forwardingEntryStruct.action && forwardingEntryStruct.actionLength > 0) |
| action_ = string(forwardingEntryStruct.action, forwardingEntryStruct.action + forwardingEntryStruct.actionLength); |
| prefix_.set(forwardingEntryStruct.prefix); |
| publisherPublicKeyDigest_.set(forwardingEntryStruct.publisherPublicKeyDigest); |
| faceId_ = forwardingEntryStruct.faceId; |
| forwardingFlags_ = forwardingEntryStruct.forwardingFlags; |
| freshnessSeconds_ = forwardingEntryStruct.freshnessSeconds; |
| ForwardingEntry::get(struct ndn_ForwardingEntry& forwardingEntryStruct) const |
| prefix_.get(forwardingEntryStruct.prefix); |
| publisherPublicKeyDigest_.get(forwardingEntryStruct.publisherPublicKeyDigest); |
| forwardingEntryStruct.faceId = faceId_; |
| forwardingEntryStruct.forwardingFlags = forwardingFlags_; |
| forwardingEntryStruct.freshnessSeconds = freshnessSeconds_; |
| forwardingEntryStruct.actionLength = action_.size(); |
| forwardingEntryStruct.action = (uint8_t *)&action_[0]; |
| forwardingEntryStruct.action = 0; |