blob: 71a156ad72a3939347026ec8c14af74a433eda2e [file] [log] [blame]
Ilya Moiseenko08a98a42011-08-02 16:06:51 -07001//
2// ndn_interestpacket.h
3// Abstraction
4//
5// Copyright 2011 UCLA. All rights reserved.
6//
7
8#ifndef ndn_interestpacket_h
9#define ndn_interestpacket_h
10
11//#define CCN_INTEREST_LIFETIME_SEC 4
12//#define CCN_INTEREST_LIFETIME_MICROSEC (CCN_INTEREST_LIFETIME_SEC * 1000000)
13
14#include "ns3/header.h"
15#include <ns3/packet.h>
Ilya Moiseenko5881eb12011-08-04 19:05:26 -070016#include <string>
17#include "ndn_timeoutheader.h"
18#include "ndn_nonceheader.h"
Ilya Moiseenko08a98a42011-08-02 16:06:51 -070019
20namespace ns3
21{
Ilya Moiseenko5881eb12011-08-04 19:05:26 -070022namespace NDNabstraction
23{
Ilya Moiseenko08a98a42011-08-02 16:06:51 -070024 class InterestPacket : public Packet
25 {
Ilya Moiseenko5881eb12011-08-04 19:05:26 -070026 public:
27 InterestPacket(unsigned char *name, uint32_t size);
28
29 uint32_t GetName(unsigned char *name);
Ilya Moiseenko08a98a42011-08-02 16:06:51 -070030
Ilya Moiseenko5881eb12011-08-04 19:05:26 -070031 void AddTimeout(uint32_t milliseconds);
32 uint32_t GetTimeout(void);
33 void RemoveTimeout(void);
34
35 void AddNonce(uint32_t nonce);
36 uint32_t GetNonce(void);
37 void RemoveNonce(void);
38
39 uint32_t maxNameLength;
Ilya Moiseenko08a98a42011-08-02 16:06:51 -070040 };
41}
Ilya Moiseenko5881eb12011-08-04 19:05:26 -070042}
Ilya Moiseenko08a98a42011-08-02 16:06:51 -070043
44#endif