-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.h
More file actions
43 lines (35 loc) · 1 KB
/
Copy pathClient.h
File metadata and controls
43 lines (35 loc) · 1 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef SRC_CLIENT_H
#define SRC_CLIENT_H
#include <string>
#include <unordered_map>
#include <ostream>
#include <stack>
#include <queue>
#include <vector>
// #include <bits/stdc++.h>
#include "Packet.h"
#include "ApplicationLayerPacket.h"
#include "TransportLayerPacket.h"
#include "NetworkLayerPacket.h"
#include "PhysicalLayerPacket.h"
#include "Log.h"
using namespace std;
class Client {
public:
Client() : client_id("NONE"), client_ip("NONE"), client_mac("NONE") {
// Default constructor..
}
Client(string const& id, string const& ip, string const& mac);
~Client();
string client_id;
string client_ip;
string client_mac;
vector<Log> log_entries;
unordered_map < string, string > routing_table; // <receiverID, nexthopID>
queue<stack<Packet*>> incoming_queue;
queue<stack<Packet*>> outgoing_queue;
void printlog();
friend ostream &operator<<(ostream &os, const Client &client);
string activityTypeToString(ActivityType type);
};
#endif //SRC_CLIENT_H