CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
nat_Definitions.h
1 /*--------------------------------------------------------------------------------*
2  Copyright (C)Nintendo All rights reserved.
3 
4  These coded instructions, statements, and computer programs contain proprietary
5  information of Nintendo and/or its licensed developers and are protected by
6  national and international copyright laws. They may not be disclosed to third
7  parties or copied or duplicated in any form, in whole or in part, without the
8  prior written consent of Nintendo.
9 
10  The content herein is highly confidential and should be handled accordingly.
11  *--------------------------------------------------------------------------------*/
12 
13 
14 #pragma once
15 
16 #include <nn/pia/pia_Definitions.h>
17 #include <nn/pia/pia_Assert.h>
18 
19 //n1589:EDMのポートインクリメントを1に固定する(1以外は発見されたことはない)
20 #define NN_PIA_ENABLE_EDM_PORT_INCREMENT_FIX 1
21 
22 //n1872:EDMのポート予測時に予測ポートの前後も NAT トラバーサルを試みる
23 #define NN_PIA_ENABLE_EDM_PORT_SPRAY 1
24 
25 //n1872: ヘアピン環境のテストを強制的に再現させるためのマクロ
26 #define NN_PIA_EXPERIMENT_FORCED_HAIR_PIN 0
27 //n1589:ヘアピンエミュレーション
28 #define NN_PIA_EXPERIMENT_PROBE_LIST_HAIR_PIN_EMULATION 0
29 
30 namespace nn
31 {
32 namespace pia
33 {
34 namespace nat
35 {
36 /*!
37 @cond PRIVATE
38 @brief NAT ポートマッピングのタイプ
39 */
40 enum Mapping
41 {
42  Mapping_Unknown = 0, //!< 不明なタイプです
43  Mapping_Eim, //!< EIM(Endpoint Independent Mapping)です
44  Mapping_Edm //!< EDM (Endpoint Dependent Mapping, Symmetric)です
45 };
46 //! @endcond
47 
48 /*!
49 @cond PRIVATE
50 @brief NAT フィルタリングのタイプ
51 */
52 enum Filtering
53 {
54  Filtering_Unknown = 0, //!< 不明なタイプです
55  Filtering_Pif, //!< PIF(Port Independent Filtering)です
56  Filtering_Pdf //!< PDF(Port Dependent Filtering)です
57 };
58 //! @endcond
59 
60 /*!
61 @cond PRIVATE
62 @brief NAT プロパティの構造体です。
63 */
64 struct NatProperty
65 {
66 public:
67  NatProperty() :
68  interfacePort(0),
69  publicPort(0),
70  mapping(Mapping_Unknown),
71  filtering(Filtering_Unknown),
72  portIncrement(0),
73  isPd(false)
74  {
75  };
76 
77 
78 public:
79  uint16_t interfacePort;
80  uint16_t publicPort;
81  Mapping mapping;
82  Filtering filtering;
83  uint32_t portIncrement;
84  bool isPd;
85 };
86 //! @endcond
87 
88 const uint32_t NatCheckServerAddressListSize = 4;
89 const uint32_t NatCheckProbeDuplicationNum = 5; //!< NatCheckProbe は複製して送信する。その個数。
90 }
91 }
92 } // end of namespace nn::pia::nat
93 
94 #include <nn/pia/common/common_RootObject.h>
95 #include <nn/pia/common/common_Report.h>
96 #include <nn/pia/common/common_Trace.h>