|
Document of c-modernization-kit (porter) 1.0.0
|
ネットワーク送受信用パケット構造体。 More...
#include <porter_type.h>
Data Fields | |
| int64_t | service_id |
| サービス識別子 (NBO)。受信時に照合する。 | |
| int64_t | session_tv_sec |
| セッション開始時刻 秒部 (NBO)。struct timespec の tv_sec 相当。 | |
| uint32_t | session_id |
| セッション識別子 (NBO)。potrOpenService 時に決定する乱数。 | |
| int32_t | session_tv_nsec |
| セッション開始時刻 ナノ秒部 (NBO)。struct timespec の tv_nsec 相当。 | |
| uint32_t | seq_num |
| 通番。送信側が付与する連番 (NBO)。 | |
| uint32_t | ack_num |
| 再送要求番号 / 再送不能通番 (NBO)。NACK では要求通番、REJECT では再送不能通番を格納する。 | |
| uint16_t | flags |
| パケット種別フラグ (POTR_FLAG_*) (NBO)。 | |
| uint16_t | payload_len |
| ペイロード長 (バイト) (NBO)。 | |
| uint32_t | _reserved |
| パディング (payload ポインタを 8 バイト境界に揃える)。 | |
| const uint8_t * | payload |
| ペイロードデータへのポインタ (読み取り専用)。ウィンドウプールまたは受信バッファ内を指す。 | |
ネットワーク送受信用パケット構造体。
UDP で送受信される物理パケットのレイアウトです。
各フィールドはネットワークバイトオーダー (ビッグエンディアン) で格納します。
ヘッダー固定長: offsetof(PotrPacket, payload) = 40 バイト (64 ビット環境)。
payload フィールドはポインタであり、wire データとして直接 sendto に渡せません。
送信時は PotrContext_ の send_wire_buf / recv_buf に wire データを組み立ててください。
ワイヤーフォーマット (バイトオフセット):
Definition at line 215 of file porter_type.h.
| int64_t PotrPacket::service_id |
サービス識別子 (NBO)。受信時に照合する。
Definition at line 217 of file porter_type.h.
Referenced by fill_session_hdr(), packet_parse(), packet_unpack_next(), recv_thread_func(), and tcp_recv_thread_func().
| int64_t PotrPacket::session_tv_sec |
セッション開始時刻 秒部 (NBO)。struct timespec の tv_sec 相当。
Definition at line 218 of file porter_type.h.
Referenced by check_and_update_session(), fill_session_hdr(), n1_check_and_update_session(), packet_parse(), packet_unpack_next(), recv_thread_func(), and tcp_session_compare().
| uint32_t PotrPacket::session_id |
セッション識別子 (NBO)。potrOpenService 時に決定する乱数。
Definition at line 219 of file porter_type.h.
Referenced by check_and_update_session(), fill_session_hdr(), flush_packed(), flush_packed_peer(), health_thread_func(), n1_check_and_update_session(), n1_send_nack(), n1_send_ping_reply(), n1_send_reject(), packet_parse(), packet_unpack_next(), peer_send_fin(), receiver_accept_loop(), recv_thread_func(), send_fin(), send_nack(), send_ping_reply(), send_reject(), tcp_health_thread_func(), tcp_recv_thread_func(), tcp_send_ping_reply(), and tcp_session_compare().
| int32_t PotrPacket::session_tv_nsec |
セッション開始時刻 ナノ秒部 (NBO)。struct timespec の tv_nsec 相当。
Definition at line 220 of file porter_type.h.
Referenced by check_and_update_session(), fill_session_hdr(), n1_check_and_update_session(), packet_parse(), packet_unpack_next(), recv_thread_func(), and tcp_session_compare().
| uint32_t PotrPacket::seq_num |
通番。送信側が付与する連番 (NBO)。
Definition at line 221 of file porter_type.h.
Referenced by check_and_update_session(), drain_recv_window(), flush_packed(), flush_packed_peer(), health_thread_func(), n1_check_and_update_session(), n1_process_outer_pkt(), n1_send_ping_reply(), packet_build_fin(), packet_build_nack(), packet_build_packed(), packet_build_ping(), packet_build_reject(), packet_parse(), process_outer_pkt(), recv_thread_func(), send_ping_reply(), tcp_health_thread_func(), tcp_recv_thread_func(), tcp_send_ping_reply(), and window_recv_push().
| uint32_t PotrPacket::ack_num |
再送要求番号 / 再送不能通番 (NBO)。NACK では要求通番、REJECT では再送不能通番を格納する。
Definition at line 222 of file porter_type.h.
Referenced by n1_send_nack(), n1_send_reject(), packet_build_fin(), packet_build_nack(), packet_build_packed(), packet_build_ping(), packet_build_reject(), packet_parse(), packet_unpack_next(), recv_thread_func(), send_nack(), send_reject(), and tcp_recv_thread_func().
| uint16_t PotrPacket::flags |
パケット種別フラグ (POTR_FLAG_*) (NBO)。
Definition at line 223 of file porter_type.h.
Referenced by deliver_payload_elem(), drain_recv_window(), flush_packed(), flush_packed_peer(), health_thread_func(), n1_deliver_payload_elem(), n1_drain_recv_window(), n1_send_nack(), n1_send_ping_reply(), n1_send_reject(), packet_build_fin(), packet_build_nack(), packet_build_packed(), packet_build_ping(), packet_build_reject(), packet_parse(), packet_unpack_next(), peer_send_fin(), recv_thread_func(), send_fin(), send_nack(), send_ping_reply(), send_reject(), tcp_health_thread_func(), tcp_recv_thread_func(), and tcp_send_ping_reply().
| uint16_t PotrPacket::payload_len |
ペイロード長 (バイト) (NBO)。
Definition at line 224 of file porter_type.h.
Referenced by deliver_payload_elem(), flush_packed(), flush_packed_peer(), health_thread_func(), n1_deliver_payload_elem(), n1_send_nack(), n1_send_ping_reply(), n1_send_reject(), packet_build_fin(), packet_build_nack(), packet_build_packed(), packet_build_ping(), packet_build_reject(), packet_parse(), packet_unpack_next(), packet_wire_size(), peer_send_fin(), recv_thread_func(), send_fin(), send_nack(), send_ping_reply(), send_reject(), tcp_health_thread_func(), tcp_recv_thread_func(), tcp_send_ping_reply(), window_recv_push(), and window_send_push().
| uint32_t PotrPacket::_reserved |
パディング (payload ポインタを 8 バイト境界に揃える)。
Definition at line 225 of file porter_type.h.
| const uint8_t* PotrPacket::payload |
ペイロードデータへのポインタ (読み取り専用)。ウィンドウプールまたは受信バッファ内を指す。
Definition at line 226 of file porter_type.h.
Referenced by deliver_payload_elem(), n1_deliver_payload_elem(), packet_build_fin(), packet_build_nack(), packet_build_packed(), packet_build_ping(), packet_build_reject(), packet_parse(), packet_unpack_next(), recv_thread_func(), tcp_recv_thread_func(), window_init(), window_recv_push(), and window_send_push().