JP2005039615A - Programmable transmission packet data extracting circuit - Google Patents
Programmable transmission packet data extracting circuit Download PDFInfo
- Publication number
- JP2005039615A JP2005039615A JP2003275475A JP2003275475A JP2005039615A JP 2005039615 A JP2005039615 A JP 2005039615A JP 2003275475 A JP2003275475 A JP 2003275475A JP 2003275475 A JP2003275475 A JP 2003275475A JP 2005039615 A JP2005039615 A JP 2005039615A
- Authority
- JP
- Japan
- Prior art keywords
- packet
- data
- extraction
- program
- instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本発明は、パケット通信を目的とするネットワーク上を流れるパケット内の任意の位置に格納されたデータを抽出し、それによりネットワーク内でのパケットの扱いを決定するネットワークノード装置に必要なハードウエア回路に関する。 The present invention relates to a hardware circuit necessary for a network node device that extracts data stored at an arbitrary position in a packet flowing on a network for packet communication and thereby determines handling of the packet in the network. About.
インターネットの出現以来、コンピュータネットワークではIP(Internet Protocol)を使用したデータ交換を行なってきた。今日、主に使用されているのはIPv4と呼ばれるものである。その、拡張版ともいえるIPv6も普及促進が図られ始めている。ルータ等のネットワークノード装置では、従来はIPのアドレスを参照したパケット処理を行うだけでその役割を果たすことができたが、IPを利用するアプリケーションの多様化が著しいため、今日では、アプリケーションデータを参照してパケット処理を行う必要が生じている(アプリケーションフィルタ、等)。 Since the advent of the Internet, computer networks have exchanged data using IP (Internet Protocol). What is mainly used today is what is called IPv4. The extension version of IPv6 is also being promoted. Conventionally, a network node device such as a router has been able to fulfill its role simply by performing packet processing with reference to an IP address. There is a need to perform packet processing with reference (application filter, etc.).
アプリケーションデータはそのフォーマットが標準化されることは稀であり、多様である。そのため、個々のアプリケーションに応じるために、パケット内の任意の場所のデータを抽出する必要が生じる。 The format of application data is rarely standardized and diverse. Therefore, in order to respond to individual applications, it is necessary to extract data at an arbitrary place in the packet.
しかしながら、従来は標準化されたパケットヘッダ構造、予め構造が明らかなパケットペーロード内データ構造に応じて、データ抽出回路を固定的に設計し、それを用いてルータ等のノード装置を構成していた。そのため、パケット内の任意の場所のデータを抽出することはできなかった。 However, conventionally, a data extraction circuit is fixedly designed according to a standardized packet header structure and a data structure in a packet payload whose structure is clear in advance, and a node device such as a router is configured using the data extraction circuit. . Therefore, data at an arbitrary location in the packet cannot be extracted.
ここで、汎用CPUとそのプログラムを使用することで、パケット内の任意の場所のデータを抽出するようにプログラム可能なパケット情報抽出機能を実現することは可能である。しかしながら、汎用CPUはその動作をプログラムで実現するため、終了時刻の保障が困難である。終了時刻の保障が確保できなければ、パケットが連続で到着した場合の処理時間が保障できず、パケット損失が発生する。 Here, by using a general-purpose CPU and its program, it is possible to realize a packet information extraction function that can be programmed so as to extract data at an arbitrary place in a packet. However, since the general-purpose CPU realizes its operation by a program, it is difficult to guarantee the end time. If the end time cannot be guaranteed, the processing time when the packets arrive continuously cannot be ensured and packet loss occurs.
さて、従来のパケット情報抽出回路としては、例えば特許文献1や特許文献2に開示された技術がある。
As a conventional packet information extraction circuit, there are techniques disclosed in
特許文献1に開示されている情報中継装置は、IPv6に特化したルータ機能を効率的に提供することを目的としたものであり、IPv6専用のパケット情報抽出を行う。そのため、他のプロトコルヘの柔軟な対応、及び、アプリケーションヘの対応は困難である。特許文献2に開示されているパケット交換装置は、CPUを組み合わせたノード装置であり、そのCPU間でのブロッキングパケットの転送時間短縮を目的としている。CPUでのパケット情報抽出を行なっており、回線速度を保障する性能の確保は困難である。
The information relay apparatus disclosed in
本発明は上記の点に鑑みてなされたものであり、パケットを生成する多様なアプリケーションに応じて柔軟にパケット内データを抽出することによって、多様なアプリケーションに応じたネットワークサービスを実現可能なノード装置を構成するためのパケットデータ抽出回路を提供することを目的とする。 The present invention has been made in view of the above points, and a node device capable of realizing network services according to various applications by extracting data in the packet flexibly according to various applications that generate packets. An object of the present invention is to provide a packet data extraction circuit for constructing the above.
上記の課題は、通信パケットからパケット内の任意の位置のデータを抽出するためのパケットデータ抽出回路であって、パケットから抽出するデータの位置を記述したプログラムを蓄積するプログラム蓄積手段と、プログラム蓄積手段から読み出したプログラムの命令を解釈する命令解釈手段と、命令解釈手段により解釈した命令に従って入力パケットからデータを抽出するデータ抽出手段とを有するパケットデータ抽出回路により解決できる。 The above-described problem is a packet data extraction circuit for extracting data at an arbitrary position in a packet from a communication packet, the program storing means for storing a program describing the position of the data extracted from the packet, and program storage This can be solved by a packet data extraction circuit having instruction interpretation means for interpreting a program instruction read from the means and data extraction means for extracting data from the input packet in accordance with the instruction interpreted by the instruction interpretation means.
本パケットデータ抽出回路によれば、プログラム蓄積手段に蓄積される、パケットから抽出するデータの位置を記述したプログラムによって入力パケットからデータを抽出するので、プログラムを変更することにより抽出位置を任意に変更でき、アプリケーションに応じて柔軟にパケット内データを抽出することが可能となる。 According to this packet data extraction circuit, data is extracted from the input packet by a program describing the position of data extracted from the packet stored in the program storage means, so that the extraction position can be arbitrarily changed by changing the program. It is possible to extract data in the packet flexibly according to the application.
前記プログラムの命令は、パケット内の所定のデータ単位での移動の命令、移動位置から連続する少なくとも1つの前記データ単位の箇所からのデータ抽出の命令、抽出動作終了の命令を含むものである。 The instructions of the program include a movement instruction in a predetermined data unit in the packet, a data extraction instruction from at least one data unit location continuous from the movement position, and an extraction operation end instruction.
また、前記パケットデータ抽出回路は、前記プログラムの命令に従ってパケット内の前記データ単位の抽出位置を蓄積する第1の抽出位置蓄積手段を更に有し、前記データ抽出手段は、前記データ単位に前記パケットのデータを一時蓄積し、当該データ抽出手段が蓄積するデータの前記パケット内での位置と、前記第1の抽出位置蓄積手段が示す位置とが一致した場合にデータ抽出を行う。 The packet data extraction circuit further includes first extraction position storage means for storing the extraction position of the data unit in the packet in accordance with an instruction of the program, and the data extraction means stores the packet in the data unit. Is temporarily stored, and data extraction is performed when the position in the packet of the data stored by the data extraction means matches the position indicated by the first extraction position storage means.
また、前記パケットデータ抽出回路は、前記プログラムの命令に従って前記データ単位のデータ内のデータ抽出位置を蓄積する第2の抽出位置蓄積手段を有し、前記データ抽出手段は、当該第2の抽出位置蓄積手段から出力されるデータ抽出位置に従って前記データ単位のデータ内のデータ抽出を行う。 Further, the packet data extraction circuit has second extraction position storage means for storing data extraction positions in the data unit data according to instructions of the program, and the data extraction means includes the second extraction position. Data extraction within the data unit is performed according to the data extraction position output from the storage means.
また、前記パケットデータ抽出回路は、前記プログラム蓄積手段からのプログラム読み出し位置を指定するためのアドレス指定手段を更に有し、前記プログラム蓄積手段に複数のプログラムを蓄積し、当該アドレス指定手段により複数のプログラムのうちの1つのプログラムの開始先頭位置を指定することによりプログラムを選択することにより、複数のプログラムの中で任意にプログラムを変更できる。 The packet data extraction circuit further includes an address designating unit for designating a program reading position from the program storage unit, stores a plurality of programs in the program storage unit, and a plurality of programs are stored by the address designating unit. By selecting a program by designating the start head position of one of the programs, the program can be arbitrarily changed among a plurality of programs.
更に、前記プログラム蓄積手段に蓄積されたプログラムを変更するためのプログラム変更手段を有することによっても、プログラムを変更できる。 Furthermore, the program can be changed by having a program change means for changing the program stored in the program storage means.
本発明によれば、パケットを生成する多様なアプリケーションに応じて柔軟にパケット内データを抽出することによって、多様なアプリケーションに応じたネットワークサービスを実現可能なノード装置を構成するためのパケットデータ抽出回路を提供することができる。 According to the present invention, a packet data extraction circuit for configuring a node device capable of realizing a network service according to various applications by flexibly extracting data in the packet according to various applications that generate packets. Can be provided.
図1に本発明の実施に形態における回路の概略構成を示す。図1に示すように、本実施の形態における回路は、プログラム蓄積手段1、プログラム読み出し手段2、命令解釈手段3、データ抽出手段4、抽出データ蓄積手段5、プログラム変更手段6を有する。これらの各手段はハードウェアにより構成されるものである。
FIG. 1 shows a schematic configuration of a circuit according to an embodiment of the present invention. As shown in FIG. 1, the circuit according to the present embodiment includes a
同図中、参照符号7はプログラム読み出し手段2からプログラム蓄積手段1へ送出されるプログラム読み出し信号である。このプログラム読み出し信号は、例えば、プログラム蓄積手段1の実現手段の1つである半導体メモリのアドレスである。8はプログラム読み出し信号7に関連してプログラム蓄積手段1より出力されるプログラムの1命令である。9はプログラム読み出し手段2に一時蓄積された命令8の情報である。10は命令解釈手段3で解釈された命令9の内容をデータ抽出手段4で実施するために必要な信号である。
In the figure,
また、11は入力パケットの流れを示し、12は出カパケットの流れを示す。13は信号10に従い入力パケット11から逐次的に抽出される情報である。14はデータ抽出手段4からの抽出データ1パケット分を抽出データ蓄積手段5に一まとめに蓄積したデータである。
11 indicates the flow of input packets, and 12 indicates the flow of output packets.
15はプログラム蓄積手段1に蓄積されたデータ抽出のプログラムをプログラム変更手段6を介して外部から変更するためのデータの流れを示し、16はプログラム変更のための外部とのデータ授受の流れを示す。この回路の概略動作は以下の通りである。
データ抽出手段4に入力パケット11として入力され、出力パケット12として出力されるパケットの1パケットから、ヘッダを含むパケット内の任意の位置のデータを、プログラム蓄積手段1に蓄積されたプログラムに従い、データ抽出手段4が抽出し、抽出データ蓄積手段5に1パケット分の抽出データを蓄積し、抽出終了後、抽出データ蓄積手段5から抽出データを出力する。パケット内データの抽出位置はプログラム変更手段1に蓄積されるプログラムにより決定される。また、プログラム変更手段1に蓄積されるプログラムは変更可能であり、これにより、パケット内データの抽出位置を任意に変更できる。
From one packet that is input to the data extraction means 4 as an
次に、本実施の形態の回路をより詳細に説明する。 Next, the circuit of this embodiment will be described in more detail.
図2に、本実施の形態の回路のより詳細な構成である実装レベルの構成を示す。図2に示す回路は、メモリ素子で構成するプログラム蓄積手段20、プログラム蓄積手段20のアドレスを生成するアドレスカウンタ21、プログラム蓄積手段20が出力するプログラムの1命令を解釈する命令解釈手段22、命令解釈手段22が出力するワード内の抽出位置情報を一時蓄積する抽出位置蓄積手段23、抽出パケット内の位置をワード単位で示すパケット位置カウンタ24、ワード単位の抽出対象位置を蓄積するパケット内抽出位置カウンタ25、パケット位置カウンタ24とパケット内抽出位置カウンタ25の一致した箇所を検出する比較器26、抽出位置蓄積手段23の出力を比較器26の出力により抑制する動作抑制器27、パケットからデータを抽出するパケット情報抽出手段28、抽出したデータを1パケット分蓄積する抽出情報蓄積手段29、プログラム蓄積手段20の内容を変更するプログラム変更手段30、プログラム蓄積手段20に蓄積された複数の抽出プログラムのどれを使用するかを選択するためにプログラムの先頭を指し示す開始アドレス変更手段31を有している。また、パケット情報抽出手段28は、抽出対象パケットをワード単位で一時蓄積する抽出パケットワード蓄積手段を有している。
FIG. 2 shows a configuration at a mounting level, which is a more detailed configuration of the circuit according to the present embodiment. The circuit shown in FIG. 2 includes a
同図中、参照符号32はプログラム蓄積手段20のアドレスの流れを示し、33はプログラム蓄積手段20からのデータ出力の流れを示す。また、34はアドレスカウンタ21の値を進める信号の流れを示し、35は命令解釈手段22に一時蓄積されたデータ33におけるワード内の抽出位置情報の流れを示し、36は命令解釈手段22に一時蓄積されたパケット内のワード単位の抽出位置の流れを示す。37は抽出位置蓄積手段23が出力するワード内の抽出位置の流れを示し、38はパケット位置カウンタ24の出力するワード単位のパケット位置情報の流れを示す。39はパケット内抽出位置カウンタ25の出力するワード単位のパケット内抽出位置の流れを示す。また、40はパケット位置カウンタ24のパケット位置カウンタを進める信号の流れである。なお、パケット情報抽出手段28にパケットが到着した際にパケット位置カウンタ24はリセットされる。
In the figure,
41は、抽出対象パケット内のワード単位の位置38と抽出位置39が一致した時にワード内の抽出位置情報37を動作制約器27を介して出力させる信号の流れを示す。また、42は動作制約器27の出力の流れを示し、43はパケット情報抽出手段28で抽出されたパケット内情報の流れを示す。44はプログラムを変更するデータの流れを示す。また、45は抽出対象パケットの流れを示し、46はパケット情報抽出手段28を通過して出力されるパケットの流れを示す。
47は1パケット分まとめて抽出情報蓄積手段29に蓄積された抽出パケット情報の流れを示し、48は外部から与えられるプログラム蓄積手段20に蓄積された抽出プログラムの実行先頭位置を指定するデータの流れを示す。
図3に本実施の形態のパケット情報抽出プログラムで用いる命令の構成を示す。制御命令のフォーマット50は、データフィールド51、命令フィールド52、パラメータフィールド53を含む。データフィールド51は、図2に示す命令解釈手段22が、カウンタ値32に応じてプログラム蓄積手段20から出力された命令を制御命令もしくは抽出命令に分類するためのフィールドである。命令フィールド52は命令を格納するフィールドであり、パラメータフィールド53は命令フィールド52に格納された命令が使用するパラメータのフィールドである。抽出命令のフォーマットは参照符号51に示す通りである。
FIG. 3 shows the configuration of instructions used in the packet information extraction program of this embodiment. The
図4に本実施の形態で使用する命令系を示す。命令には、ジャンプ(JMP)命令60、停止命令61、抽出命令62の3種がある。
FIG. 4 shows an instruction system used in this embodiment. There are three types of instructions: a jump (JMP)
ジャンプ(JMP)命令60は抽出位置をワード単位で移動するための命令であり、パラメータとしては移動するワード数の相対値を後方に向けて正の整数で指定する。停止命令61は、処理を停止するための命令であり、これ以降はデータ抽出を行なわず、次のパケットの到着を待つ。抽出命令62は、パケットからデータを抽出するための命令であり、抽出命令62内で1が指定されている場所を抽出する。本実施の形態では、1が指定された場所を抽出位置のワードから、バイト単位で抽出する。
The jump (JMP)
図5に図2に示したプログラム蓄積手段20の内容の一例を示す。参照符号70はプログラム蓄積手段20のメモリ空間全てを示すものである。図5の例では、メモリ空間70内に、1つ目の抽出プログラム71、2つ目の抽出プログラム72、3つ目の抽出プログラム73が存在する。先頭アドレス1(74)は1つ目の抽出プログラム71の先頭アドレスであり、先頭アドレス2(75)は2つ目の抽出プログラム72の先頭アドレスであり、先頭アドレス3(76)は3つ目の抽出プログラム73である。メモリ空間70に格納可能なプログラムの数は、メモリ空間70の全容量と、各プログラムの大きさで決定される。また先頭アドレス74、75、76は、図2の開始アドレス変更手段31に入力されるアドレス48として、パケット毎に抽出位置を変更する目的で外部から与えられる。
FIG. 5 shows an example of the contents of the program storage means 20 shown in FIG.
図6に図2に示す回路の動作フローチャートを示す。図6を参照して動作を説明する。 FIG. 6 shows an operation flowchart of the circuit shown in FIG. The operation will be described with reference to FIG.
回路の起動後、パケット到着待ちとなる(ステップ1)。パケットが到着すると、アドレスカウンタ21、パケット位置カウンタ24、パケット内抽出位置カウンタ25を初期化する(ステップ2)。
After the circuit is activated, it waits for packet arrival (step 1). When the packet arrives, the
次に、命令解釈手段22は、プログラム蓄積手段20におけるアドレスカウンタ21で確定したアドレスからプログラムを1行(1ワード)読み込み(ステップ3)、制御命令/抽出パターンを判断する(ステップ4)。
Next, the
制御命令の場合、STOPかJMPかの命令判断を行なう(ステップ5)。命令がSTOPである場合、パケット到着待ちに戻る。 In the case of a control command, it is determined whether the command is STOP or JMP (step 5). If the instruction is STOP, the process returns to waiting for packet arrival.
JMPの場合には、パケット内抽出位置カウンタ25にオフセット値を加算し(ステップ6)、次のプログラム行を読み込む動作に戻る。 In the case of JMP, the offset value is added to the in-packet extraction position counter 25 (step 6), and the operation returns to the operation of reading the next program line.
ステップ4の判断において、プログラムが抽出パターンの場合、抽出対象判断を比較器26で、パケット情報抽出手段28におけるパケット中のワード(パケット位置カウンタ24により示されている位置のワード)が抽出対象のワードであるか否かを判断する(ステップ7)。抽出対象でない場合、パケット位置カウンタ24を加算し(ステップ8)、抽出対象判断に戻る。抽出対象である場合(パケット位置カウンタ24の値=パケット内抽出位置カウンタ25である場合)、ワード内抽出位置蓄積手段23内のパターンに従いデータ抽出を実行し(ステップ9)、パケット位置カウンタ24、パケット内抽出位置カウンタ25、アドレスカウンタ21を加算する(ステップ10)。パケットが終了したか否か判断し(ステップ11)、パケットが終了した場合、パケット到着待ちに戻る。パケットが終了していない場合、プログラム1行読み込みに戻る。
If the program is an extraction pattern in the determination of step 4, the extraction target determination is made by the
次に、本実施の形態の具体的な動作について説明する。 Next, a specific operation of the present embodiment will be described.
図7に、入力パケット80と、抽出プログラム83の一例を示す。図中、入力パケット80の中の黒塗りの部分(81)はパケット80内の抽出対象バイトデータ(8Bit)を示し、白い部分(82)はパケット80内の非抽出バイトデータ(8Bit)を示す。パケット80は、パケット情報抽出手段28に4バイトを1ワードとする形態で入力される。
FIG. 7 shows an example of the
参照符号83に示す記述は、パケット80内の複数の位置の抽出対象バイトデータを図2の機構を使用して抽出するためのプログラム記述である。以下、プログラムの実行順に従い、プログラム1行ずつ順を追って説明する。
The description indicated by
ここでは、図2のプログラム蓄積手段20の先頭から7ワード目に抽出プログラム83が格納され、開始アドレス変更手段31の入力48には開始アドレスとしてプログラム蓄積手段20の先頭アドレスが指定されているものとする。
Here, the extracted
プログラムの抽出命令は、1ワード内の抽出位置として下位の4Bitを使用する。また、1Bitは1Byteの抽出を意味する。 The program extraction command uses the lower 4 bits as the extraction position within one word. Also, 1 Bit means 1 byte extraction.
パケット80がパケット情報抽出手段28に入力されると、パケット位置カウンタ24は先頭ワード位置0に設定される。また、アドレスカウンタ21はプログラムの先頭アドレスが設定される。
When the
その結果、プログラム蓄積手段20に先頭アドレスが出力され、プログラムの第1ワード(84)がプログラム蓄積手段20から命令解釈手段22に出力される。命令解釈手段22はプログラムの第1ワード(84)を取り込み、プログラムの第1ワード(84)が制御命令であり、ジャンプであり、パラメータが2であることを解釈し、初期値0としたパケット内抽出位置カウンタ25にパラメータ2を加算する。これにより、パケット内抽出位置カウンタ25の値は2となる。
As a result, the head address is output to the program storage means 20 and the first word (84) of the program is output from the program storage means 20 to the instruction interpretation means 22. The
そして、パケット情報抽出手段28は入力パケット80を先頭から2ワード進める。この時点でプログラムの第1ワード(84)の命令は終了する。
Then, the packet
次に、命令解釈手段22はアドレスカウンタ21を1つ進める。アドレスは先頭アドレス+1となり、プログラム蓄積手段20から抽出プログラム83の2ワード目の命令85が出力される。命令解釈手段22は命令85が抽出命令であり、“0010”の1の部分を抽出すると判断し、ワード内抽出位置蓄積手段23に“0010”を出力する。また、パケット内抽出位置カウンタ25を1つ加算する。この時、ワード内抽出位置蓄積手段23は“0010”を格納している。また、パケット位置カウンタ24は値“2”、パケット内抽出位置カウンタ25は値“3”を格納している。ここで、パケット内抽出位置カウンタ25とパケット位置カウンタ24は一致していないので、信号41は活性化されておらず、動作制約器27の出力は“0000”となっている。
Next, the
ここで、パケット情報抽出手段28はパケット80をさらに1ワード読み込み、パケット位置カウンタ24を1つ加算する。すると、パケット位置カウンタ24の値は“3”となり、パケット内抽出位置カウンタ25の値と一致し、比較器26により、41は活性化され、動作制約器27が動作し、パケット情報抽出手段28に対して37の値“0010”が出力される。
Here, the packet information extraction means 28 reads one word from the
パケット情報抽出手段28は、その出力“0010”に従い、パケット80からデータを抽出し、抽出情報蓄積手段29に対して出力し、抽出情報蓄積手段29はそのデータを格納する。これで、85の命令が終了する。
The packet
次に、命令解釈手段22はアドレスカウンタ21を1つ進める。アドレスは先頭アドレス+2となり、プログラム蓄積手段20から命令解釈手段22に対して抽出プログラム83の3ワード目の命令86が出力される。命令解釈手段22は命令86が抽出命令であり、“0011”の1の部分を抽出すると判断し、ワード内抽出位置蓄積手段23に対して“0011”を出力する。また、パケット内抽出位置カウンタ25を1つ加算する。この時、ワード内抽出位置蓄積手段23は“0011”を格納している。また、パケット位置カウンタ24は値“3”、パケット内抽出位置カウンタ25は値“4”を格納している。ここで、パケット内抽出位置カウンタ25とパケット位置カウンタ24は一致していないので、信号41は活性化されておらず、動作制約器27の出力は“0000”となっている。
Next, the
ここで、パケット情報抽出手段28はパケット80をさらに1ワード読み込み、パケット位置カウンタ24を1つ加算する。すると、パケット位置カウンタ24の値は“4”となり、パケット内抽出位置カウンタ25の値と一致し、比較器26により、41は活性化され、動作制約器27が動作し、パケット情報抽出手段28に対して37の値“0011”が出力される。
Here, the packet information extraction means 28 reads one word from the
パケット情報抽出手段28は、その出力“0011”に従い、パケット80からデータを抽出し、抽出情報蓄積手段29に対して出力し、抽出情報蓄積手段29はそのデータを格納する。これで、86の命令が終了する。
The packet
次に、命令解釈手段22はアドレスカウンタ21を1つ進める。アドレスは先頭アドレス+3となり、プログラム蓄積手段20から命令解釈手段22に対して抽出プログラム83の4ワード目の命令87が出力される。命令解釈手段22は命令87が抽出命令であり、“1110”の1の部分を抽出すると判断し、ワード内蓄積手段23に対して“1110”を出力する。また、パケット内抽出位置カウンタ25を1つ加算する。この時、ワード内抽出位置蓄積手段23は“1110”を格納している。また、パケット位置カウンタ24は値“4”、パケット内抽出位置カウンタ25は値“5”を格納している。ここで、パケット内抽出位置カウンタ25とパケット位置カウンタ24は一致していないので、信号41は活性化されておらず、動作制約器27の出力は“0000”となっている。
Next, the
ここで、パケット情報抽出手段28はパケット80をさらに1ワード読み込み、パケット位置カウンタ24を1つ加算する。すると、パケット位置カウンタ24の値は“5”となり、パケット内抽出位置カウンタ25の値と一致し、比較器26により、41は活性化され、動作制約器27が動作し、パケット情報抽出手段28に対して37の値“1110”が出力される。
Here, the packet information extraction means 28 reads one word from the
パケット情報抽出手段28は、その出力“1110”に従い、パケット80からデータを抽出し、抽出情報蓄積手段29に対して出力し、抽出情報蓄積手段29はそのデータを格納する。これで、87の命令が終了する。
The packet
次に、命令解釈手段22はアドレスカウンタ21を1つ進める。アドレスは先頭アドレス+4となり、プログラム蓄積手段20から抽出プログラム83の5ワード目の命令88が出力される。命令解釈手段22は命令88を取り込み、命令88が制御命令であり、ジャンプであり、パラメータが7である事を解釈し、現在“5”であるパケット内抽出位置カウンタ25に命令88のパラメータ7を加算する。パケット内抽出位置カウンタ25の値は12となる。パケット情報抽出手段28はパケット80を先頭から7ワード進める。この時点で88の命令は終了する。
Next, the
次に、命令解釈手段22はアドレスカウンタ21を1つ進める。アドレスは先頭アドレス+5となり、プログラム蓄積手段20から命令解釈手段22に対して抽出プログラム83の6ワード目の命令89が出力される。命令解釈手段22は命令89が抽出命令であり、“0101”の1の部分を抽出すると判断し、ワード内蓄積手段23に対して“0101”を出力する。また、パケット内抽出位置カウンタ25を1つ加算する。この時、ワード内抽出位置蓄積手段23は“0101”を格納している。また、パケット位置カウンタは値“12”、パケット内抽出位置カウンタ25は値“13”を格納している。ここで、パケット内抽出位置カウンタ25とパケット位置カウンタ24は一致していないので、信号41は活性化されておらず、動作制約器27の出力は“0000”となっている。
Next, the
ここで、パケット情報抽出手段28はパケット80をさらに1ワード読み込み、パケット位置カウンタ24を1つ加算する。すると、パケット位置カウンタ24の値は“13”となり、パケット内抽出位置カウンタ25の値と一致し、比較器26により、41は活性化され、動作制約器27が動作し、パケット情報抽出手段28に対して37の値“0101”が出力される。
Here, the packet information extraction means 28 reads one word from the
パケット情報抽出手段28は、その出力“0101”に従い、パケット80からデータを抽出し、抽出情報蓄積手段29に対して出力し、抽出情報蓄積手段29はそのデータを格納する。これで、89の命令が終了する。
The packet
次に、命令解釈手段22はアドレスカウンタ21を1つ進める。アドレスは先頭アドレス+6となり、プログラム蓄積手段20から命令解釈手段22に対して抽出プログラム83の7ワード目の命令90が出力される。命令解釈手段22は命令90を取り込み、命令90が制御命令であり、ストップ(STOP)である事を解釈し、パケット80をパケット情報抽出手段28を経由して、全て出力し、ワード内抽出位置蓄積手段23、パケット位置カウンタ24、ケット内抽出位置カウンタ25、アドレスカウンタ21を初期化し、次のパケット到着を待つ。
Next, the
次に、図2の回路におけるパケット情報抽出手段28についてより詳細に説明する。図8は、パケット情報抽出手段28の詳細構成例である。図8に示す例は、パケット情報抽出手段28を4Byte(32Bit)幅で構成した例である。 Next, the packet information extraction means 28 in the circuit of FIG. 2 will be described in more detail. FIG. 8 is a detailed configuration example of the packet information extraction means 28. The example shown in FIG. 8 is an example in which the packet information extraction means 28 is configured with a 4-byte (32-bit) width.
図8に示すように、パケット情報抽出手段28はバイト毎にセレクタ281〜284を備えている。また、シフトレジスタ285を備えている。
As shown in FIG. 8, the packet information extraction means 28 includes
ワード内抽出位置指示(4Bit)に応じて、セレクタはシフトレジスタ285へByteのデータを複製出力する。シフトレジスタ285は、各セレクタからのByteデータを、ワード内抽出位置指示に従い、空きByteが生じないように詰める。シフトレジスタ285が4Byteで、入力ワード内抽出位置指示で4Byte全てが抽出対象となった場合、シフトレジスタ285は通常の4Byteレジスタと同じ動作となる。
In response to the in-word extraction position instruction (4 bits), the selector duplicates and outputs the byte data to the
入力ワード内抽出位置指示で、特定のByteが抽出対象となった場合(例えば、ワード内抽出位置指示が0101の場合)、0で指示された部分は1の部分をシフトして埋める。すなわち、ワード内抽出位置指示が0101の場合、2Byte分の空きができる。そして、次の入力ワード内抽出位置指示で2Byte抽出する場合、その時点で抽出情報蓄積手段29に抽出データが転送される。次の入力ワード内抽出位置指示で指示される抽出データが1Byteだった場合、1Byteの空きがあるので、次の、次の入力ワード内抽出位置指示で抽出データが1Byte以上となった時点で抽出データが抽出情報蓄積手段に転送される。 When a specific Byte is an extraction target in the input word extraction position instruction (for example, when the word extraction position instruction is 0101), the part designated by 0 is shifted and filled with 1 part. That is, when the in-word extraction position instruction is 0101, a space of 2 bytes is created. When 2 bytes are extracted by the next input word extraction position instruction, the extracted data is transferred to the extraction information storage means 29 at that time. If the extracted data specified by the next input word extraction position instruction is 1 byte, there is 1 byte of space, so when the next extracted data in the next input word extraction position instruction becomes 1 byte or more, it is extracted. Data is transferred to the extracted information storage means.
本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内で種々変更・応用が可能である。 The present invention is not limited to the above-described embodiment, and various modifications and applications can be made within the scope of the claims.
1 プログラム蓄積手段
2 プログラム読み出し手段
3 命令解釈手段
4 データ抽出手段
5 抽出データ蓄積手段
6 プログラム変更手段
20 プログラム蓄積手段
21 アドレスカウンタ
22 命令解釈手段
23 抽出位置蓄積手段
24 パケット位置カウンタ
25 パケット内抽出位置カウンタ
26 比較器
27 動作抑制器
28 パケット情報抽出手段
29 抽出情報蓄積手段
30 プログラム変更手段
31 開始アドレス変更手段
281〜284 セレクタ
285 シフトレジスタ
DESCRIPTION OF
Claims (6)
パケットから抽出するデータの位置を記述したプログラムを蓄積するプログラム蓄積手段と、
プログラム蓄積手段から読み出したプログラムの命令を解釈する命令解釈手段と、
命令解釈手段により解釈した命令に従って入力パケットからデータを抽出するデータ抽出手段と
を有することを特徴とするパケットデータ抽出回路。 A packet data extraction circuit for extracting data at an arbitrary position in a packet from a communication packet,
Program storage means for storing a program describing the position of data extracted from a packet;
Instruction interpreting means for interpreting program instructions read from the program storage means;
And a data extraction means for extracting data from the input packet in accordance with the instruction interpreted by the instruction interpretation means.
前記データ抽出手段は、前記データ単位に前記パケットのデータを一時蓄積し、当該データ抽出手段が蓄積するデータの前記パケット内での位置と、前記第1の抽出位置蓄積手段が示す位置とが一致した場合にデータ抽出を行う請求項1に記載のパケットデータ抽出回路。 The packet data extraction circuit further includes first extraction position storage means for storing extraction positions of predetermined data units in the packet in accordance with instructions of the program,
The data extraction means temporarily stores the data of the packet in the data unit, and the position in the packet of the data stored by the data extraction means matches the position indicated by the first extraction position storage means The packet data extraction circuit according to claim 1, wherein data extraction is performed in the event of a failure.
前記データ抽出手段は、当該第2の抽出位置蓄積手段から出力されるデータ抽出位置に従って前記データ単位のデータ内のデータ抽出を行う請求項3に記載のパケットデータ抽出回路。 The packet data extraction circuit has second extraction position storage means for storing a data extraction position in the data of the data unit according to an instruction of the program,
4. The packet data extraction circuit according to claim 3, wherein the data extraction unit extracts data in the data unit in accordance with a data extraction position output from the second extraction position storage unit.
前記プログラム蓄積手段に複数のプログラムを蓄積し、当該アドレス指定手段により複数のプログラムのうちの1つのプログラムの開始先頭位置を指定することによりプログラムを選択する請求項1に記載のパケットデータ抽出回路。 The packet data extraction circuit further includes address designating means for designating a program reading position from the program storage means,
2. The packet data extraction circuit according to claim 1, wherein a plurality of programs are stored in the program storage means, and a program is selected by designating a start head position of one of the plurality of programs by the address designation means.
2. The packet data extraction circuit according to claim 1, further comprising program changing means for changing a program stored in the program storing means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003275475A JP2005039615A (en) | 2003-07-16 | 2003-07-16 | Programmable transmission packet data extracting circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003275475A JP2005039615A (en) | 2003-07-16 | 2003-07-16 | Programmable transmission packet data extracting circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005039615A true JP2005039615A (en) | 2005-02-10 |
Family
ID=34212107
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003275475A Pending JP2005039615A (en) | 2003-07-16 | 2003-07-16 | Programmable transmission packet data extracting circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005039615A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101803870B1 (en) * | 2016-07-15 | 2018-01-10 | 국방과학연구소 | Communication system using the defense protocol of keyboard based on random location |
-
2003
- 2003-07-16 JP JP2003275475A patent/JP2005039615A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101803870B1 (en) * | 2016-07-15 | 2018-01-10 | 국방과학연구소 | Communication system using the defense protocol of keyboard based on random location |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7481436B2 (en) | Method, device and system for forwarding packets in a SR network | |
US7643511B2 (en) | Frame alteration logic for network processors | |
US8854996B2 (en) | Accelerating data packet parsing | |
JP5199399B2 (en) | Method and filter arrangement for storing information about messages arriving at a subscriber of the network via a serial data bus of the communication network | |
US9860168B1 (en) | Network packet header modification for hardware-based packet processing | |
US6788680B1 (en) | Defferrable processing option for fast path forwarding | |
CN104025550B (en) | The method and device of information is obtained from data item | |
CN112787927B (en) | Segmented routing message forwarding method and device and preset logic circuit unit | |
JP2008310832A (en) | Apparatus and method for distributing signal from high level data link controller to a plurality of digital signal processor cores | |
CN1781293B (en) | System and method for modifying data transferred from a source to a destination | |
CN111654477A (en) | Information topology method and device of industrial control network based on FINS protocol and computer equipment | |
JP6310573B2 (en) | System and method for adapting to network protocol updates | |
CN111382115A (en) | Path creating method and device for network on chip and electronic equipment | |
WO2017197982A1 (en) | Packet processing method, device and system, and computer storage medium | |
JP2005039615A (en) | Programmable transmission packet data extracting circuit | |
CN110581792A (en) | Message transmission method and device | |
US7764676B1 (en) | Method and system for processing network information | |
CN114024758B (en) | Flow characteristic extraction method, system, storage medium and electronic equipment | |
US7158529B2 (en) | Device for data stream decoding | |
CN104702505A (en) | Message transmission method and node | |
KR101353992B1 (en) | Method and device for data packet assembly | |
US7610440B2 (en) | Content addressable memory with automated learning | |
Minden et al. | Composite protocols for innovative active services | |
KR20180002535A (en) | Direct memory access control device and operating method for the same | |
CN116893987B (en) | Hardware acceleration method, hardware accelerator and hardware acceleration system |