-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRouter.h
More file actions
48 lines (42 loc) · 999 Bytes
/
Copy pathRouter.h
File metadata and controls
48 lines (42 loc) · 999 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* @Author: HZW ZJM CSS
* @Date: 2021-05-11 22:46:35
* @LastEditTime: 2021-05-13 11:01:18
* @Description:
*/
#include <iostream>
#include <vector>
#include <string>
#include "Message.h"
#include "RouteTable.h"
using namespace std;
#ifndef _ROUTER_H_
#define _ROUTER_H_
//Abstract router
class Router
{
private:
HANDLE control_thread_;
public:
RouteTable my_route_table_;
/**
* @description: run the control thread
* @param {*}
* @return {*}
*/
virtual void Run() = 0;
/**
* @description: In DV, net_state is the next_routers,
* In LS, net_state is the link state table
* @param {Message} message
* @return {bool} return true if network state is changed
*/
virtual bool update_net_state(Message message) = 0;
/**
* @description: update the route table
* @param {*}
* @return {bool } return true if route table is changed
*/
virtual bool update_route_table() = 0;
};
#endif