RINASim
October 2016
Documentation of framework for OMNeT++
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
SimpleDCForwarding.h
Go to the documentation of this file.
1
// The MIT License (MIT)
2
//
3
// Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
4
//
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
11
//
12
// The above copyright notice and this permission notice shall be included in
13
// all copies or substantial portions of the Software.
14
//
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
// THE SOFTWARE.
22
23
#pragma once
24
25
#include <
IntPDUForwarding.h
>
26
27
#include <map>
28
#include <string>
29
#include <vector>
30
#include <map>
31
32
#include "
DCAddr.h
"
33
34
namespace
NSPSimpleDC
{
35
36
using namespace
std
;
37
38
typedef
RMTPort
*
Port
;
39
40
class
iSimpleDCForwarding
:
public
IntPDUForwarding
{
41
42
public
:
43
// Lookup function, return a list of RMTPorts to forward a PDU/Address+qos.
44
vector<Port> lookup(
const
PDU
* pdu);
45
vector<Port> lookup(
const
Address
& dst,
const
std::string & qos);
46
47
// Returns a representation of the Forwarding Knowledge
48
virtual
string
toString();
49
50
void
setNodeInfo(
const
string
& n_addr);
51
void
setNodeInfo(
const
int
& type,
const
int
& a,
const
int
& b);
52
53
virtual
bool
setNeigh(
const
DCAddr
& n_addr, Port port) = 0;
54
virtual
void
setDst(
const
DCAddr
& n_addr,
const
set<DCAddr> & next) = 0;
55
56
protected
:
57
DCAddr
Im
;
58
59
virtual
void
onPolicyInit() = 0;
60
virtual
vector<Port> search(
const
DCAddr
& n_addr) = 0;
61
62
virtual
void
refreshCache(Port oldP, Port newP);
63
virtual
void
refreshCache(
const
DCAddr
& addr);
64
};
65
66
}
std
NSPSimpleDC::iSimpleDCForwarding::Im
DCAddr Im
Definition:
SimpleDCForwarding.h:57
NSPSimpleDC::Port
RMTPort * Port
Definition:
SimpleDCForwarding.h:38
NSPSimpleDC::DCAddr
Definition:
DCAddr.h:9
PDU
Definition:
PDU.h:42
NSPSimpleDC::iSimpleDCForwarding
Definition:
SimpleDCForwarding.h:40
DCAddr.h
IntPDUForwarding.h
RMTPort
Definition:
RMTPort.h:36
NSPSimpleDC
Definition:
SimpleDCGenerator.cc:21
Address
Address class holds IPC Process identification.
Definition:
Address.h:42
IntPDUForwarding
Definition:
IntPDUForwarding.h:33
policies
DIF
RMT
PDUForwarding
SimpleDCForwarding
SimpleDCForwarding.h
Generated on Tue Oct 25 2016 21:08:56 for RINASim by
1.8.10