blob: f5da38b6ba12676dbb0fdf40e03dcf1b126fe341 [file] [log] [blame]
Alexander Afanasyevb989b122013-07-10 17:15:46 -07001/** -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -08002/*
Alexander Afanasyevb989b122013-07-10 17:15:46 -07003 * Copyright (c) 2013, Regents of the University of California
4 * Alexander Afanasyev
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -08005 *
Alexander Afanasyevb989b122013-07-10 17:15:46 -07006 * BSD license, See the doc/LICENSE file for more information
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -08007 *
Alexander Afanasyevb989b122013-07-10 17:15:46 -07008 * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
9 */
10
11#ifndef NDN_COMMON_H
12#define NDN_COMMON_H
13
Alexander Afanasyev92136012013-07-16 20:36:30 -070014#include "ns3/nstime.h"
15#include "ns3/simulator.h"
16
17#define NDNSIM_MODE 1
18
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080019#define NDN_NAMESPACE_BEGIN \
20 namespace ns3 { \
21 namespace ndn {
22#define NDN_NAMESPACE_END \
23 } /*ndn*/ \
24 } /*ns3*/
Alexander Afanasyevb989b122013-07-10 17:15:46 -070025
Alexander Afanasyev79206512013-07-27 16:49:12 -070026/**
27 * @brief NS-3 namespace
28 */
29namespace ns3 {
30
31/**
32 * @brief ndnSIM namespace
33 */
34namespace ndn {
35}
Alexander Afanasyev79206512013-07-27 16:49:12 -070036}
37
Alexander Afanasyev92136012013-07-16 20:36:30 -070038NDN_NAMESPACE_BEGIN
39
40typedef Time TimeInterval;
41
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080042namespace time {
Alexander Afanasyev92136012013-07-16 20:36:30 -070043
44inline Time
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080045NowUnixTimestamp()
Alexander Afanasyev92136012013-07-16 20:36:30 -070046{
Alexander Afanasyevbe55cf62014-12-20 17:51:09 -080047 return Simulator::Now();
Alexander Afanasyev92136012013-07-16 20:36:30 -070048}
Alexander Afanasyev92136012013-07-16 20:36:30 -070049}
50
51NDN_NAMESPACE_END
52
Alexander Afanasyevb989b122013-07-10 17:15:46 -070053#endif // NDN_COMMON_H