forked from shahpoojan/NetSim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.h
More file actions
29 lines (24 loc) · 827 Bytes
/
Copy pathNode.h
File metadata and controls
29 lines (24 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Definition of Node class
// ECE8893, Final Project, Fall 2012
#ifndef __NODE_H__
#define __NODE_H__
#include <vector>
class NetworkInterface;
class Application;
class Node
{
public:
Node(); // Constructor
void ComputeRoutes(); // Populate the routing table
void AddNeighbor(Node*); // Add a new interface, p2p link and neighbor node
void AddInterface (NetworkInterface*);
void AddApplication(Application*);
void Send(int count, int dest); // Send count bytes to specified destination
void Receive(int count, int source); // Received count bytes from specified source
private:
unsigned int address; // This node's address
std::vector<NetworkInterface*> interfaces;
std::vector<Application*> applications;
std::vector<int> nextHopRoutes;
};
#endif