|
@ -0,0 +1,29 @@ |
|
|
|
|
|
/* |
|
|
|
|
|
* NATRouter.h |
|
|
|
|
|
* |
|
|
|
|
|
* Created on: 11-01-2017 |
|
|
|
|
|
* Author: Piotr Dergun |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
#ifndef NATROUTER_H_ |
|
|
|
|
|
#define NATROUTER_H_ |
|
|
|
|
|
|
|
|
|
|
|
#include "common.h" |
|
|
|
|
|
#include "Node.h" |
|
|
|
|
|
#include "NATItem.h" |
|
|
|
|
|
/* |
|
|
|
|
|
typedef struct |
|
|
|
|
|
{ |
|
|
|
|
|
string ip; // IP wewn. do którego ma trafić odpowiedź / z którego przyszło żądanie |
|
|
|
|
|
int port; // port komputera wewn. do którego ma trafić odpowiedź |
|
|
|
|
|
int timeout; // czas (w sekundach) zajętości portu (0 - port wolny) |
|
|
|
|
|
} NATItem; |
|
|
|
|
|
*/ |
|
|
|
|
|
class NATRouter : public Node |
|
|
|
|
|
{ |
|
|
|
|
|
NATItem *natTable; |
|
|
|
|
|
public: |
|
|
|
|
|
NATRouter(); |
|
|
|
|
|
~NATRouter(); |
|
|
|
|
|
}; |
|
|
|
|
|
#endif /* NATROUTER_H_ */ |