Document of c-modernization-kit (porter) 1.0.0
Loading...
Searching...
No Matches
potrContext.h File Reference

セッションコンテキスト内部定義ヘッダー。 More...

#include <stdint.h>
#include <porter_type.h>
#include "protocol/window.h"
#include "infra/compress/compress.h"
#include "infra/crypto/crypto.h"
#include "infra/potrSendQueue.h"
#include <pthread.h>
#include <netinet/in.h>
Include dependency graph for potrContext.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PotrNackDedupEntry
 NACK 重複抑制バッファの 1 エントリ。 More...
struct  PotrPeerContext_
 N:1 モードにおける個別ピアのコンテキスト。 More...
struct  PotrContext_
 セッションコンテキスト構造体。PotrHandle の実体。 More...

Macros

#define POTR_INVALID_SOCKET   (-1)
#define POTR_NACK_DEDUP_SLOTS   8U
 NACK 重複抑制リングバッファのスロット数 (POTR_MAX_PATH × 2)。

Typedefs

typedef int PotrSocket
typedef pthread_t PotrThread
typedef struct PotrPeerContext_ PotrPeerContext
 N:1 モードにおける個別ピアのコンテキスト。

Functions

static int potr_is_tcp_type (PotrType t)
 TCP 通信種別 (POTR_TYPE_TCP / POTR_TYPE_TCP_BIDIR) か判定する。
static int potr_is_raw_type (PotrType t)
 RAW 系通信種別 (POTR_TYPE_*_RAW) か判定する。
static PotrType potr_raw_base_type (PotrType t)
 RAW 系通信種別をベース通信種別に変換する (非 RAW 型はそのまま返す)。

Detailed Description

セッションコンテキスト内部定義ヘッダー。

Author
c-modernization-kit sample team
Date
2026/03/04
Version
1.0.0

PotrHandle の実体定義。ライブラリ外部には公開しない。

Definition in file potrContext.h.

Macro Definition Documentation

◆ POTR_INVALID_SOCKET

◆ POTR_NACK_DEDUP_SLOTS

#define POTR_NACK_DEDUP_SLOTS   8U

NACK 重複抑制リングバッファのスロット数 (POTR_MAX_PATH × 2)。

Definition at line 81 of file potrContext.h.

Referenced by recv_thread_func().

Typedef Documentation

◆ PotrSocket

typedef int PotrSocket

Definition at line 32 of file potrContext.h.

◆ PotrThread

typedef pthread_t PotrThread

Definition at line 33 of file potrContext.h.

◆ PotrPeerContext

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

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

Function Documentation

◆ potr_is_tcp_type()

int potr_is_tcp_type ( PotrType t)
inlinestatic

TCP 通信種別 (POTR_TYPE_TCP / POTR_TYPE_TCP_BIDIR) か判定する。

Definition at line 48 of file potrContext.h.

References POTR_TYPE_TCP, and POTR_TYPE_TCP_BIDIR.

Referenced by flush_packed(), potrCloseService(), potrOpenService(), and potrSend().

Here is the caller graph for this function:

◆ potr_is_raw_type()

int potr_is_raw_type ( PotrType t)
inlinestatic

RAW 系通信種別 (POTR_TYPE_*_RAW) か判定する。

Definition at line 54 of file potrContext.h.

References POTR_TYPE_BROADCAST_RAW, POTR_TYPE_MULTICAST_RAW, and POTR_TYPE_UNICAST_RAW.

Referenced by check_reorder_timeout(), potrSend(), process_outer_pkt(), and recv_thread_func().

Here is the caller graph for this function:

◆ potr_raw_base_type()

PotrType potr_raw_base_type ( PotrType t)
inlinestatic

RAW 系通信種別をベース通信種別に変換する (非 RAW 型はそのまま返す)。

Definition at line 62 of file potrContext.h.

References POTR_TYPE_BROADCAST, POTR_TYPE_BROADCAST_RAW, POTR_TYPE_MULTICAST, POTR_TYPE_MULTICAST_RAW, POTR_TYPE_TCP, POTR_TYPE_TCP_BIDIR, POTR_TYPE_UNICAST, POTR_TYPE_UNICAST_BIDIR, POTR_TYPE_UNICAST_BIDIR_N1, and POTR_TYPE_UNICAST_RAW.

Referenced by potrCloseService(), and potrOpenService().

Here is the caller graph for this function: