|
Document of c-modernization-kit (porter) 1.0.0
|
N:1 モードにおける個別ピアのコンテキスト。 More...
#include <potrContext.h>
Data Fields | |
| PotrPeerId | peer_id |
| 外部公開用ピア識別子 (単調増加カウンタから付与)。 | |
| int | active |
| 1: 有効スロット, 0: 空き。 | |
| uint32_t | session_id |
| 自セッション識別子 (乱数)。 | |
| uint32_t | _pad_session |
| パディング (session_tv_sec を 8 バイト境界に揃える)。 | |
| int64_t | session_tv_sec |
| 自セッション開始時刻 秒部。 | |
| int32_t | session_tv_nsec |
| 自セッション開始時刻 ナノ秒部。 | |
| uint32_t | peer_session_id |
| 追跡中のピアセッション識別子。 | |
| int64_t | peer_session_tv_sec |
| 追跡中のピアセッション開始時刻 秒部。 | |
| int32_t | peer_session_tv_nsec |
| 追跡中のピアセッション開始時刻 ナノ秒部。 | |
| int | peer_session_known |
| ピアセッションが初期化済みか (0: 未初期化)。 | |
| PotrWindow | send_window |
| 送信ウィンドウ (NACK 再送用)。 | |
| PotrMutex | send_window_mutex |
| send_window 保護 (送信・受信・ヘルスチェックスレッド競合)。 | |
| PotrWindow | recv_window |
| 受信ウィンドウ (順序整列)。 | |
| uint8_t * | frag_buf |
| フラグメント結合バッファ (動的確保)。 | |
| size_t | frag_buf_len |
| 現在のデータ長。 | |
| int | frag_compressed |
| 圧縮フラグ (非 0: 圧縮あり)。 | |
| volatile int | health_alive |
| 疎通状態 (1: alive, 0: dead/未接続)。 | |
| int64_t | last_recv_tv_sec |
| 最終受信時刻 秒部 (CLOCK_MONOTONIC)。0 = 未受信。 | |
| int32_t | last_recv_tv_nsec |
| 最終受信時刻 ナノ秒部。 | |
| uint32_t | _pad_nack_dedup |
| パディング (nack_dedup_buf を 8 バイト境界に揃える)。 | |
| PotrNackDedupEntry | nack_dedup_buf [POTR_NACK_DEDUP_SLOTS] |
| NACK 重複抑制バッファ。 | |
| uint8_t | nack_dedup_next |
| 次に書き込むスロット。 | |
| uint8_t | _pad_reorder [3] |
| パディング (reorder_pending を 4 バイト境界に揃える)。 | |
| int | reorder_pending |
| リオーダー待機中 (1: 待機中, 0: 待機なし)。 | |
| uint32_t | reorder_nack_num |
| 待機中の欠番通番。 | |
| uint32_t | _pad_reorder_dl |
| パディング (reorder_deadline_sec を 8 バイト境界に揃える)。 | |
| int64_t | reorder_deadline_sec |
| タイムアウト期限 秒部 (CLOCK_MONOTONIC)。 | |
| int32_t | reorder_deadline_nsec |
| タイムアウト期限 ナノ秒部。 | |
| struct sockaddr_in | dest_addr [POTR_MAX_PATH] |
| 送信先ソケットアドレス (インデックス = ctx->sock[] の添字)。未使用スロットは sin_family == 0。 | |
| int | n_paths |
| アクティブパス数。ループ境界には使わず管理カウンタとして使用する。 | |
| int64_t | path_last_recv_sec [POTR_MAX_PATH] |
| パスごとの最終受信時刻 秒部。未使用スロットは 0。 | |
| int32_t | path_last_recv_nsec [POTR_MAX_PATH] |
| パスごとの最終受信時刻 ナノ秒部。 | |
N:1 モードにおける個別ピアのコンテキスト。
is_multi_peer == 1 のとき有効。ピアごとに独立した送受信状態を保持する。
ピアテーブル (PotrContext_::peers[]) に配置される。
Definition at line 98 of file potrContext.h.
| PotrPeerId PotrPeerContext_::peer_id |
外部公開用ピア識別子 (単調増加カウンタから付与)。
Definition at line 100 of file potrContext.h.
Referenced by allocate_peer_id(), flush_packed_peer(), health_thread_func(), n1_check_health_timeout(), n1_notify_health_alive(), n1_process_outer_pkt(), n1_recv_deliver(), n1_update_path_recv(), peer_create(), peer_find_by_id(), peer_free(), peer_path_clear(), potrDisconnectPeer(), potrSend(), and recv_thread_func().
| int PotrPeerContext_::active |
1: 有効スロット, 0: 空き。
Definition at line 101 of file potrContext.h.
Referenced by allocate_peer_id(), health_thread_func(), n1_check_health_timeout(), peer_create(), peer_find_by_id(), peer_find_by_session(), peer_free(), peer_table_destroy(), peer_table_init(), and potrSend().
| uint32_t PotrPeerContext_::session_id |
自セッション識別子 (乱数)。
Definition at line 104 of file potrContext.h.
Referenced by flush_packed_peer(), health_thread_func(), n1_send_nack(), n1_send_ping_reply(), n1_send_reject(), peer_generate_session(), and peer_send_fin().
| uint32_t PotrPeerContext_::_pad_session |
パディング (session_tv_sec を 8 バイト境界に揃える)。
Definition at line 105 of file potrContext.h.
| int64_t PotrPeerContext_::session_tv_sec |
自セッション開始時刻 秒部。
Definition at line 106 of file potrContext.h.
Referenced by flush_packed_peer(), health_thread_func(), n1_send_nack(), n1_send_ping_reply(), n1_send_reject(), peer_generate_session(), and peer_send_fin().
| int32_t PotrPeerContext_::session_tv_nsec |
自セッション開始時刻 ナノ秒部。
Definition at line 107 of file potrContext.h.
Referenced by flush_packed_peer(), health_thread_func(), n1_send_nack(), n1_send_ping_reply(), n1_send_reject(), peer_generate_session(), and peer_send_fin().
| uint32_t PotrPeerContext_::peer_session_id |
追跡中のピアセッション識別子。
Definition at line 110 of file potrContext.h.
Referenced by n1_check_and_update_session(), peer_find_by_session(), and recv_thread_func().
| int64_t PotrPeerContext_::peer_session_tv_sec |
追跡中のピアセッション開始時刻 秒部。
Definition at line 111 of file potrContext.h.
Referenced by n1_check_and_update_session(), peer_find_by_session(), and recv_thread_func().
| int32_t PotrPeerContext_::peer_session_tv_nsec |
追跡中のピアセッション開始時刻 ナノ秒部。
Definition at line 112 of file potrContext.h.
Referenced by n1_check_and_update_session(), peer_find_by_session(), and recv_thread_func().
| int PotrPeerContext_::peer_session_known |
ピアセッションが初期化済みか (0: 未初期化)。
Definition at line 113 of file potrContext.h.
Referenced by n1_check_and_update_session(), and recv_thread_func().
| PotrWindow PotrPeerContext_::send_window |
送信ウィンドウ (NACK 再送用)。
Definition at line 116 of file potrContext.h.
Referenced by flush_packed_peer(), health_thread_func(), n1_send_ping_reply(), peer_create(), peer_free(), peer_table_destroy(), and recv_thread_func().
| PotrMutex PotrPeerContext_::send_window_mutex |
send_window 保護 (送信・受信・ヘルスチェックスレッド競合)。
Definition at line 117 of file potrContext.h.
Referenced by flush_packed_peer(), health_thread_func(), n1_send_ping_reply(), peer_create(), peer_free(), peer_table_destroy(), and recv_thread_func().
| PotrWindow PotrPeerContext_::recv_window |
受信ウィンドウ (順序整列)。
Definition at line 118 of file potrContext.h.
Referenced by n1_check_and_update_session(), n1_drain_recv_window(), n1_process_outer_pkt(), peer_create(), peer_free(), peer_table_destroy(), and recv_thread_func().
| uint8_t* PotrPeerContext_::frag_buf |
フラグメント結合バッファ (動的確保)。
Definition at line 121 of file potrContext.h.
Referenced by n1_deliver_payload_elem(), peer_create(), peer_free(), and peer_table_destroy().
| size_t PotrPeerContext_::frag_buf_len |
現在のデータ長。
Definition at line 122 of file potrContext.h.
Referenced by n1_deliver_payload_elem(), and peer_create().
| int PotrPeerContext_::frag_compressed |
圧縮フラグ (非 0: 圧縮あり)。
Definition at line 123 of file potrContext.h.
Referenced by n1_deliver_payload_elem(), and peer_create().
| volatile int PotrPeerContext_::health_alive |
疎通状態 (1: alive, 0: dead/未接続)。
Definition at line 126 of file potrContext.h.
Referenced by n1_check_health_timeout(), n1_notify_health_alive(), potrDisconnectPeer(), and recv_thread_func().
| int64_t PotrPeerContext_::last_recv_tv_sec |
最終受信時刻 秒部 (CLOCK_MONOTONIC)。0 = 未受信。
Definition at line 127 of file potrContext.h.
Referenced by n1_check_health_timeout(), and n1_update_path_recv().
| int32_t PotrPeerContext_::last_recv_tv_nsec |
最終受信時刻 ナノ秒部。
Definition at line 128 of file potrContext.h.
Referenced by n1_check_health_timeout(), and n1_update_path_recv().
| uint32_t PotrPeerContext_::_pad_nack_dedup |
パディング (nack_dedup_buf を 8 バイト境界に揃える)。
Definition at line 129 of file potrContext.h.
| PotrNackDedupEntry PotrPeerContext_::nack_dedup_buf[POTR_NACK_DEDUP_SLOTS] |
NACK 重複抑制バッファ。
Definition at line 132 of file potrContext.h.
| uint8_t PotrPeerContext_::nack_dedup_next |
次に書き込むスロット。
Definition at line 133 of file potrContext.h.
| uint8_t PotrPeerContext_::_pad_reorder[3] |
パディング (reorder_pending を 4 バイト境界に揃える)。
Definition at line 134 of file potrContext.h.
| int PotrPeerContext_::reorder_pending |
リオーダー待機中 (1: 待機中, 0: 待機なし)。
Definition at line 137 of file potrContext.h.
Referenced by n1_check_and_update_session(), n1_process_outer_pkt(), and recv_thread_func().
| uint32_t PotrPeerContext_::reorder_nack_num |
待機中の欠番通番。
Definition at line 138 of file potrContext.h.
| uint32_t PotrPeerContext_::_pad_reorder_dl |
パディング (reorder_deadline_sec を 8 バイト境界に揃える)。
Definition at line 139 of file potrContext.h.
| int64_t PotrPeerContext_::reorder_deadline_sec |
タイムアウト期限 秒部 (CLOCK_MONOTONIC)。
Definition at line 140 of file potrContext.h.
| int32_t PotrPeerContext_::reorder_deadline_nsec |
タイムアウト期限 ナノ秒部。
Definition at line 141 of file potrContext.h.
| struct sockaddr_in PotrPeerContext_::dest_addr[POTR_MAX_PATH] |
送信先ソケットアドレス (インデックス = ctx->sock[] の添字)。未使用スロットは sin_family == 0。
Definition at line 146 of file potrContext.h.
Referenced by flush_packed_peer(), health_thread_func(), n1_check_health_timeout(), n1_send_nack(), n1_send_ping_reply(), n1_send_reject(), n1_update_path_recv(), peer_create(), peer_path_clear(), peer_send_fin(), and recv_thread_func().
| int PotrPeerContext_::n_paths |
アクティブパス数。ループ境界には使わず管理カウンタとして使用する。
Definition at line 147 of file potrContext.h.
Referenced by n1_update_path_recv(), peer_create(), and peer_path_clear().
| int64_t PotrPeerContext_::path_last_recv_sec[POTR_MAX_PATH] |
パスごとの最終受信時刻 秒部。未使用スロットは 0。
Definition at line 148 of file potrContext.h.
Referenced by n1_check_health_timeout(), n1_update_path_recv(), peer_create(), and peer_path_clear().
| int32_t PotrPeerContext_::path_last_recv_nsec[POTR_MAX_PATH] |
パスごとの最終受信時刻 ナノ秒部。
Definition at line 149 of file potrContext.h.
Referenced by n1_check_health_timeout(), n1_update_path_recv(), and peer_path_clear().