Document of c-modernization-kit (porter) 1.0.0
Loading...
Searching...
No Matches
potrPeerTable.h
Go to the documentation of this file.
1
18
19#ifndef POTR_PEER_TABLE_H
20#define POTR_PEER_TABLE_H
21
22#include <porter_type.h>
23
24#include "potrContext.h"
25
26#ifdef __cplusplus
27extern "C"
28{
29#endif /* __cplusplus */
30
41 extern void peer_send_fin(struct PotrContext_ *ctx, PotrPeerContext *peer);
42
53 extern int peer_table_init(struct PotrContext_ *ctx);
54
64 extern void peer_table_destroy(struct PotrContext_ *ctx);
65
81 uint32_t session_id,
82 int64_t session_tv_sec,
83 int32_t session_tv_nsec);
84
96 PotrPeerId peer_id);
97
114 extern PotrPeerContext *peer_create(struct PotrContext_ *ctx,
115 const struct sockaddr_in *sender_addr,
116 int path_idx);
117
130 extern void peer_path_clear(struct PotrContext_ *ctx, PotrPeerContext *peer, int path_idx);
131
143 extern void peer_free(struct PotrContext_ *ctx, PotrPeerContext *peer);
144
145#ifdef __cplusplus
146}
147#endif /* __cplusplus */
148
149#endif /* POTR_PEER_TABLE_H */
通信ライブラリの型定義ファイル。
uint32_t PotrPeerId
ピア識別子。
Definition porter_type.h:32
セッションコンテキスト内部定義ヘッダー。
struct PotrPeerContext_ PotrPeerContext
N:1 モードにおける個別ピアのコンテキスト。
PotrPeerContext * peer_find_by_session(struct PotrContext_ *ctx, uint32_t session_id, int64_t session_tv_sec, int32_t session_tv_nsec)
session_triplet でピアを検索する。
void peer_send_fin(struct PotrContext_ *ctx, PotrPeerContext *peer)
ピアの全パスへ FIN パケットを送信する。
void peer_path_clear(struct PotrContext_ *ctx, PotrPeerContext *peer, int path_idx)
ピアの特定パスをクリアしてスロットを未使用に戻す。
PotrPeerContext * peer_find_by_id(struct PotrContext_ *ctx, PotrPeerId peer_id)
peer_id でピアを検索する。
void peer_table_destroy(struct PotrContext_ *ctx)
ピアテーブルを破棄する。
PotrPeerContext * peer_create(struct PotrContext_ *ctx, const struct sockaddr_in *sender_addr, int path_idx)
新規ピアを作成する。
void peer_free(struct PotrContext_ *ctx, PotrPeerContext *peer)
ピアリソースを解放してスロットをクリアする。
int peer_table_init(struct PotrContext_ *ctx)
ピアテーブルを初期化する。
セッションコンテキスト構造体。PotrHandle の実体。