📄 nattypes.h
字号:
#ifndef UTILS_BASE_NATTYPE_H_#define UTILS_BASE_NATTYPE_H_namespace utils_base {/* Identifies each type of NAT that can be simulated. */enum NATType { NAT_OPEN_CONE, NAT_ADDR_RESTRICTED, NAT_PORT_RESTRICTED, NAT_SYMMETRIC};// Implements the rules for each specific type of NAT.class NAT {public: // Determines whether this NAT uses both source and destination address when // checking whether a mapping already exists. virtual bool IsSymmetric() = 0; // Determines whether this NAT drops packets received from a different IP // the one last sent to. virtual bool FiltersIP() = 0; // Determines whether this NAT drops packets received from a different port // the one last sent to. virtual bool FiltersPort() = 0; // Returns an implementation of the given type of NAT. static NAT* Create(NATType type);};} // namespace utils_base#endif // UTILS_BASE_NATTYPE_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -