Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | |
2 /* | |
3 * Copyright (c) 2013 Mohammed J.F. Alenazi | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License version 2 as | |
7 * published by the Free Software Foundation; | |
8 * | |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with this program; if not, write to the Free Software | |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
17 * | |
18 * Author: Mohammed J.F. Alenazi <malenazi@ittc.ku.edu> | |
19 * | |
20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director | |
21 * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets | |
22 * Information and Telecommunication Technology Center (ITTC) | |
23 * and Department of Electrical Engineering and Computer Science | |
24 * The University of Kansas Lawrence, KS USA. | |
25 * | |
26 * Work supported by King Saud University and the ITTC at The University of Kans as. | |
27 */ | |
28 | |
29 #include <iostream> | |
30 #include "ns3/log.h" | |
31 #include "ns3/tag.h" | |
32 | |
33 | |
34 namespace ns3 { | |
35 namespace Epidemic { | |
36 //----------------------------------------------------------------------------- | |
37 /* ingroup epidemic | |
38 Tag used by epidemic implementation | |
39 */ | |
Peter Barnes
2014/09/12 20:33:50
Delete redundant comment block
mjf.alenazi
2014/09/18 00:34:26
Done.
| |
40 | |
41 /** | |
42 * \ingroup epidemic | |
43 * Tag used to differentiate between locally generated packets and incoming pac kets | |
44 * in RoutingProtocol::RouteInput() function. | |
45 */ | |
46 class EpidemicTag : public Tag | |
Peter Barnes
2014/09/12 20:33:50
(See comment patch-5)
You can't use Packet tags to
mjf.alenazi
2014/09/18 00:34:26
I could not distinguish between control packets an
| |
47 { | |
48 | |
49 public: | |
50 /// Constructor | |
51 EpidemicTag (int32_t o = -1) : Tag (), | |
Peter Barnes
2014/09/12 20:33:50
(See patch-4 comment) when this was in epidemic-ro
mjf.alenazi
2014/09/18 00:34:26
Done.
| |
52 m_tag (o) | |
53 { | |
54 } | |
55 | |
56 /// Get TypeId | |
57 static TypeId GetTypeId (); | |
58 /// Get instanceTypeId | |
59 TypeId GetInstanceTypeId () const; | |
60 | |
61 /// Get epidemic tag | |
62 int32_t GetEpidemicTag () const; | |
63 | |
64 /// Set epidemic tag | |
65 void SetEpidemicTag (int32_t tag); | |
66 | |
67 /// Get size | |
68 uint32_t GetSerializedSize () const; | |
69 | |
70 /// Serialize | |
71 void Serialize (TagBuffer i) const; | |
72 ///Deserialize | |
73 void Deserialize (TagBuffer i); | |
74 /// Print | |
75 void Print (std::ostream &os) const; | |
76 | |
77 private: | |
78 /// epidemic tag | |
79 int32_t m_tag; | |
80 }; | |
81 | |
82 | |
83 | |
84 | |
85 | |
86 } //end namespace epidemic | |
87 } //end namespace ns3 | |
OLD | NEW |