Document of c-modernization-kit (porter) 1.0.0
Loading...
Searching...
No Matches
PotrPeerContext_ Struct Reference

N:1 モードにおける個別ピアのコンテキスト。 More...

#include <potrContext.h>

Collaboration diagram for PotrPeerContext_:

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]
 パスごとの最終受信時刻 ナノ秒部。

Detailed Description

N:1 モードにおける個別ピアのコンテキスト。

is_multi_peer == 1 のとき有効。ピアごとに独立した送受信状態を保持する。
ピアテーブル (PotrContext_::peers[]) に配置される。

Definition at line 98 of file potrContext.h.

Field Documentation

◆ peer_id

◆ active

int PotrPeerContext_::active

◆ session_id

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().

◆ _pad_session

uint32_t PotrPeerContext_::_pad_session

パディング (session_tv_sec を 8 バイト境界に揃える)。

Definition at line 105 of file potrContext.h.

◆ session_tv_sec

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().

◆ session_tv_nsec

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().

◆ peer_session_id

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().

◆ peer_session_tv_sec

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().

◆ peer_session_tv_nsec

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().

◆ peer_session_known

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().

◆ send_window

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().

◆ send_window_mutex

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().

◆ recv_window

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().

◆ frag_buf

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().

◆ frag_buf_len

size_t PotrPeerContext_::frag_buf_len

現在のデータ長。

Definition at line 122 of file potrContext.h.

Referenced by n1_deliver_payload_elem(), and peer_create().

◆ frag_compressed

int PotrPeerContext_::frag_compressed

圧縮フラグ (非 0: 圧縮あり)。

Definition at line 123 of file potrContext.h.

Referenced by n1_deliver_payload_elem(), and peer_create().

◆ health_alive

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().

◆ last_recv_tv_sec

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().

◆ last_recv_tv_nsec

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().

◆ _pad_nack_dedup

uint32_t PotrPeerContext_::_pad_nack_dedup

パディング (nack_dedup_buf を 8 バイト境界に揃える)。

Definition at line 129 of file potrContext.h.

◆ nack_dedup_buf

PotrNackDedupEntry PotrPeerContext_::nack_dedup_buf[POTR_NACK_DEDUP_SLOTS]

NACK 重複抑制バッファ。

Definition at line 132 of file potrContext.h.

◆ nack_dedup_next

uint8_t PotrPeerContext_::nack_dedup_next

次に書き込むスロット。

Definition at line 133 of file potrContext.h.

◆ _pad_reorder

uint8_t PotrPeerContext_::_pad_reorder[3]

パディング (reorder_pending を 4 バイト境界に揃える)。

Definition at line 134 of file potrContext.h.

◆ reorder_pending

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().

◆ reorder_nack_num

uint32_t PotrPeerContext_::reorder_nack_num

待機中の欠番通番。

Definition at line 138 of file potrContext.h.

◆ _pad_reorder_dl

uint32_t PotrPeerContext_::_pad_reorder_dl

パディング (reorder_deadline_sec を 8 バイト境界に揃える)。

Definition at line 139 of file potrContext.h.

◆ reorder_deadline_sec

int64_t PotrPeerContext_::reorder_deadline_sec

タイムアウト期限 秒部 (CLOCK_MONOTONIC)。

Definition at line 140 of file potrContext.h.

◆ reorder_deadline_nsec

int32_t PotrPeerContext_::reorder_deadline_nsec

タイムアウト期限 ナノ秒部。

Definition at line 141 of file potrContext.h.

◆ dest_addr

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().

◆ n_paths

int PotrPeerContext_::n_paths

アクティブパス数。ループ境界には使わず管理カウンタとして使用する。

Definition at line 147 of file potrContext.h.

Referenced by n1_update_path_recv(), peer_create(), and peer_path_clear().

◆ path_last_recv_sec

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().

◆ path_last_recv_nsec

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().


The documentation for this struct was generated from the following file: