A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
aloha-noack-mac-header.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009, 2010 CTTC
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>
18 */
19
20#ifndef ALOHA_NOACK_MAC_HEADER_H
21#define ALOHA_NOACK_MAC_HEADER_H
22
23#include <ns3/address-utils.h>
24#include <ns3/header.h>
25#include <ns3/mac48-address.h>
26
27namespace ns3
28{
29
36{
37 public:
42 static TypeId GetTypeId();
43 TypeId GetInstanceTypeId() const override;
44 uint32_t GetSerializedSize() const override;
45 void Serialize(Buffer::Iterator start) const override;
47 void Print(std::ostream& os) const override;
48
53 void SetSource(Mac48Address source);
58 void SetDestination(Mac48Address destination);
59
64 Mac48Address GetSource() const;
70
71 private:
74};
75
76} // namespace ns3
77
78#endif /* ALOHA_NOACK_MAC_HEADER_H */
Header for the AlohaNoack NetDevice.
Mac48Address GetSource() const
Get the source address.
Mac48Address m_source
source address
void Serialize(Buffer::Iterator start) const override
void SetDestination(Mac48Address destination)
Set the destination address.
uint32_t Deserialize(Buffer::Iterator start) override
void Print(std::ostream &os) const override
uint32_t GetSerializedSize() const override
static TypeId GetTypeId()
Get the type ID.
Mac48Address GetDestination() const
Get the destination address.
Mac48Address m_destination
destination address
void SetSource(Mac48Address source)
Set the source address.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
iterator in a Buffer instance
Definition: buffer.h:100
Protocol header serialization and deserialization.
Definition: header.h:44
an EUI-48 address
Definition: mac48-address.h:46
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.