For Development HEAD DRAFTSearch (procedure/syntax/module):

Next: , Previous: , Up: ライブラリモジュール - ユーティリティ   [Contents][Index]

12.47 rfc.icmp - ICMPパケット

Module: rfc.icmp

{rfc.icmp} このモジュールではICMPパケットの構築および解析用の基本的ユーティリティ を提供しています。

以下の関数のbufferは十分なサイズの書き込み可能なu8vectorでなけれ ばなりません。

解析用の関数はbufferのほかにoffsetを引数としてとります。こ れはICMPパケットの開始位置を示すものです。このオフセットを用いて、ICMP 部分を取り出して新しいバッファを作るということなしに、IPパケット全体を buffer内に格納できます。

Function: icmp4-fill-echo! buffer ident sequence data

{rfc.icmp} bufferにICMPv4のエコーリクエストパケットを詰め込みます。 Dataはu8vectorでなければなりません。チェックサムフィールドはゼロ のままです。チェックサムはicmp4-fill-checksum!を使って埋め込み ます。

Function: icmp4-fill-checksum! buffer size

{rfc.icmp} buffer中のsize(バッファではなくパケットの長さ)分のパケット のICMPv4チェックサムを計算し、そのパケットのチェックサムフィールドをう めます。

Function: icmp6-fill-echo! buffer ident sequence data

{rfc.icmp} bufferにICMPv6のエコーリクエストパケットを詰め込みます。 Dataはu8vectorでなければなりません。チェックサムフィールドは ゼロのままで、ここはカーネルが埋めることになっています。したがって、 ユーザーが自分で埋める必要はありません。

Function: icmp-packet-type buffer offset
Function: icmp-packet-code buffer offset
Function: icmp-packet-ident buffer offset
Function: icmp-packet-sequence buffer offset

{rfc.icmp} それぞれICMPパケットのタイプ、コード、識別子、シーケンスフィールドを抜 き出します。これらの関数はICMPv4/v6で共通です。

Function: icmp4-describe-packet buffer offset
Function: icmp6-describe-packet buffer offset

{rfc.icmp} それぞれ与えられたICMPv4およびICMPv6パケットの簡単な説明を印字します。

Function: icmp4-message-type->string type
Function: icmp4-unreach-code->string code
Function: icmp4-redirect-code->string code
Function: icmp4-router-code->string code
Function: icmp4-exceeded-code->string code
Function: icmp4-parameter-code->string code
Function: icmp4-security-code->string code
Function: icmp6-message-type->string type
Function: icmp6-unreach-code->string code
Function: icmp6-exceeded-code->string code
Function: icmp6-parameter-code->string code

{rfc.icmp} ICMPv4およびICMPv6のタイプとコードの説明テキストを返します。


Next: , Previous: , Up: ライブラリモジュール - ユーティリティ   [Contents][Index]


For Development HEAD DRAFTSearch (procedure/syntax/module):
DRAFT