JPH1070570A - Packet processor - Google Patents

Packet processor

Info

Publication number
JPH1070570A
JPH1070570A JP22523996A JP22523996A JPH1070570A JP H1070570 A JPH1070570 A JP H1070570A JP 22523996 A JP22523996 A JP 22523996A JP 22523996 A JP22523996 A JP 22523996A JP H1070570 A JPH1070570 A JP H1070570A
Authority
JP
Japan
Prior art keywords
packet
access control
comparison
unit
control program
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.)
Granted
Application number
JP22523996A
Other languages
Japanese (ja)
Other versions
JP3219186B2 (en
Inventor
Takeshi Mie
武 三栄
Mitsuru Maruyama
充 丸山
Satoru Yagi
哲 八木
Takeshi Ogura
毅 小倉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP22523996A priority Critical patent/JP3219186B2/en
Publication of JPH1070570A publication Critical patent/JPH1070570A/en
Application granted granted Critical
Publication of JP3219186B2 publication Critical patent/JP3219186B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a packet processor capable of speedy and effective packet filter processing even when the access control program of many lines is given. SOLUTION: A packet filter part 2 is provided with an access control program parallel compiler part 3 analyzing the depending relation of an access control program needing successive interpreting, converting it to an intermediate code 4 consisting of an access control rule which can be interpreted in parallel based on a route condition, detecting the same comparing parameter included in the packet condition of the intermediate code 4 or a comparing parameter in an involving relation and simplifying this, and a packet filter execution part 5 deciding the transfer or abolition of a packet based on the intermediate code 4.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、通信システムのパ
ケット通信システムに関し、特に、パケットルータ処理
の中で、計算機ネットワーク管理者が定義するアクセス
制御プログラムに基づいて、パケットデータの転送、あ
るいは、廃棄を決定するパケット処理装置に関するもの
である。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a packet communication system of a communication system, and more particularly, to packet data transfer or discarding in a packet router process based on an access control program defined by a computer network administrator. And a packet processing device that determines

【0002】[0002]

【従来の技術】図8は、従来のパケットルータ処理装置
の構成例である[W.R.Cheswick and S.M.Bellovin,“Fi
rewalls and Internet Security",ADDISON-WESLEY PUBL
ISHINGCOMPANY].回線対応部81、82、83は、通信回
線からのパケットを受信、あるいは、通信回線へパケッ
トを送信する。アクセス制御プログラム1は、計算機ネ
ットワークの管理者が記述し、パケットルータ処理装置
が転送すべきパケット、および、転送せずに廃棄すべき
パケットを指定するプログラムである。パケットフィル
タ部21は、受信したパケットのヘッダ部分を解析し、
アクセス制御プログラム1に従って、パケットの転送あ
るいは廃棄を決定する。
2. Description of the Related Art FIG. 8 shows a configuration example of a conventional packet router processing apparatus [WRCheswick and SMBellovin, "Fi
rewalls and Internet Security ", ADDISON-WESLEY PUBL
ISHINGCOMPANY]. The line corresponding units 8 1 , 8 2 , 8 3 receive a packet from the communication line or transmit a packet to the communication line. The access control program 1 is a program written by an administrator of the computer network and specifying packets to be transferred by the packet router processing device and packets to be discarded without being transferred. The packet filter unit 21 analyzes the header part of the received packet,
According to the access control program 1, packet transfer or discard is determined.

【0003】ルートテーブル検索部22は、経路情報を
格納した経路情報テーブル23を持ち、受信したパケッ
トのヘッダ部分を解析し、経路情報テーブルに基づいて
パケットを送出する回線対応部を決定する。
A route table search unit 22 has a route information table 23 storing route information, analyzes a header portion of a received packet, and determines a line corresponding unit to send a packet based on the route information table.

【0004】図2はアクセス制御プログラムの一例であ
る。アクセス制御プログラム1は複数行記述されたアク
セス制御規則からなる。アクセス制御規則は、パケット
条件11とルータ動作12の対で構成する。パケット条件
は、複数の比較パラメータ1 3からなり、比較パラメー
タ13には、プロトコル種類、始点アドレス、始点ポー
ト番号、終点アドレス、終点ポート番号およびACKビ
ット[D.E.Comer, “Internetworking With TCP/IP, Vo
l.I", 1991. Prentice Hall.]の6種類があり、全ての
パターンと一致するワイルドカード“*”も記述可能で
ある。ルータ動作は、パケット条件と一致したパケット
の処理方法であり、パケットの転送を許可する“転送”
とパケットを転送せずに廃棄する“廃棄”の2種類の値
をとり得る。
FIG. 2 shows an example of an access control program.
You. The access control program 1 is an access control
Access control rules. Access control rules are
Condition 11And router operation 1TwoIt consists of a pair. Packet conditions
Represents a plurality of comparison parameters 1 ThreeConsist of
TA1ThreeThe protocol type, start address, start port
Port number, destination address, destination port number and ACK
[D.E.Comer, “Internetworking With TCP / IP, Vo
l.I ", 1991. Prentice Hall.]
Wildcard "*" that matches the pattern can be described.
is there. The router action is for packets that match the packet conditions.
"Transfer" that allows packet transfer
And "Discard" to discard the packet without forwarding it
Can be taken.

【0005】従来のパケットルータ処理装置におけるパ
ケットデータの転送処理は以下の如く行なわれる。
[0005] The packet data transfer processing in the conventional packet router processor is performed as follows.

【0006】1.回線対応部81(例)で通信回線上の
パケットを受信し、そのパケットのヘッダ部分を抽出す
る。パケットヘッダ部分には、アクセス制御プログラム
と比較するプロトコル種類、始点アドレス、始点ポート
番号、終点アドレス、終点ポート番号、および、ACK
ビットが格納されている。
[0006] 1. Receiving a packet on a communication line by line adapter 8 1 (Example), extracts a header portion of the packet. The packet header part includes a protocol type to be compared with the access control program, a start address, a start port number, an end address, an end port number, and ACK.
Bit is stored.

【0007】2.ルートテーブル検索部22は、回線対
応部8で抽出したパケットヘッダ部分に格納されている
終点アドレスをキーとして経路情報格納テーブル23を
検索し、パケットを送出する回線対応部83(例)を決
定する。
[0007] 2. The route table search unit 22 searches the route information storage table 23 using the destination address stored in the packet header portion extracted by the line correspondence unit 8 as a key, and determines the line correspondence unit 8 3 (example) to send out the packet. I do.

【0008】3.パケットフィルタ部21は、アクセス
制御プログラム1を上の行から順に、上記パケットヘッ
ダ部分との比較を行なう。すなわち、アクセス制御プロ
グラムのi行目のアクセス制御規則のパケット条件11
をPi 、ルータ動作をAi 、Pi を構成する6種類の比
較パラメータを各々pi1,pi2,pi3,pi4,pi5,p
i6とすると、パケットフィルタ部は次のように逐次的に
アクセス制御プログラム1を解釈する。
[0008] 3. The packet filter unit 21 compares the access control program 1 with the above-mentioned packet header part in order from the upper line. That is, the packet condition 1 1 of the access control rule on the i-th line of the access control program
Is P i , the router operation is A i , and the six types of comparison parameters constituting P i are p i1 , p i2 , p i3 , p i4 , p i5 , p
Assuming i6 , the packet filter unit interprets the access control program 1 sequentially as follows.

【0009】[0009]

【数1】 4.パケット処理装置はパケットフィルタ部21から得
られたルータ動作12が“転送”の場合には、ルートテ
ーブル検索部22から得られた回線対応部83にパケッ
トを転送し、通信回線上に送信する。パケットフィルタ
部から得られたルータ動作が“廃棄”の場合には、パケ
ットを廃棄する。
(Equation 1) 4. When the packet processing device Router Operation 1 2 obtained from the packet filter section 21 is "transfer" transfers the packet to the line interface 8 3 obtained from the route table search section 22, transmitted over the communication line I do. If the router operation obtained from the packet filter unit is “discard”, the packet is discarded.

【0010】[0010]

【発明が解決しようとする課題】上記従来技術ではパケ
ットフィルタ処理において、アクセス制御プログラムを
逐次的に解釈するため、下記の如き問題がある。 問題1 アクセス制御プログラムの行数に比例してパケ
ットフィルタ処理の時間が増加する。パケットフィルタ
処理が終了するまでパケット転送が遅延することから、
アクセス制御プログラムの行数の増加に従って、ルータ
のパケット転送能力が低下する。 問題2 パケット条件は比較パラメータのAND条件で
あるため、OR条件は複数行のアクセス制御規則を用い
て記述する。これらのアクセス制御規則は、OR条件と
なる部分の比較パラメータのみが異なる記述となる。こ
のようなアクセス制御規則を持つアクセス制御プログラ
ムを、単純に逐次的に解釈すると、パケットフィルタ処
理部は同じ比較演算を複数回行なってしまう。 問題3 アクセス制御プログラムのi行目のパケット条
件Pi とj行目のパケット条件Pj (ただしi<j)に
おいて、Pj と一致するパケットの集合がPi と一致す
るパケットの集合の部分集合の場合、実行不能経路(I
FP:InfeasiblePath[直井、高橋、“経路依存フロフ
ラグを用いたInfeasible Path 検出法"、電子情報通信
学会論文誌、D-1,No.8.pp 429-439, 1993])が存在す
ることになる。この場合、j行目のルータ動作Aj は決
して実行されないにも関わらず、パケットフィルタ処理
部はパケット条件Pj とパケットヘッダの比較を行なっ
てしまう。
In the above prior art, in the packet filter processing, since the access control program is interpreted sequentially, there are the following problems. Problem 1 The packet filtering time increases in proportion to the number of lines of the access control program. Since the packet transfer is delayed until the packet filter processing ends,
As the number of access control program lines increases, the packet transfer capability of the router decreases. Problem 2 Since the packet condition is the AND condition of the comparison parameter, the OR condition is described using an access control rule of a plurality of rows. These access control rules have descriptions that differ only in the comparison parameter of the part that is the OR condition. If an access control program having such an access control rule is simply interpreted sequentially, the packet filter processing unit performs the same comparison operation a plurality of times. Problem 3 In the packet condition P i on the i-th row and the packet condition P j on the j-th row (where i <j) of the access control program, the set of packets matching P j is a part of the set of packets matching P i. In the case of a set, the infeasible path (I
FP: InfeasiblePath [Naoi, Takahashi, "Infeasible Path Detection Method Using Path-Dependent Flow Flag", IEICE Transactions, D-1, No.8. pp 429-439, 1993]). In this case, although the router operation A j in the j-th row is never executed, the packet filter processing unit compares the packet condition P j with the packet header.

【0011】本発明の目的は、従来技術のパケットフィ
ルタ処理では、逐次的な解釈が必要なアクセス制御プロ
グラムを、単純に逐次的に解釈するために、アクセス制
御プログラムの行数に比例してフィルタ処理時間が増加
し、ルータのパケット転送能力が低下する点と、計算機
ネットワーク管理者が複数行のアクセス制御規則を用い
てOR条件のアクセス制御規則を記述した場合に、パケ
ットフィルタ装置が同じ比較を複数回行なってしまう
点、および、アクセス制御プログラムに実行不能経路が
存在する場合に無駄な比較演算を行なってしまう点を解
決し、行数の大きなアクセス制御プログラムを与えられ
た場合にも、高速かつ効率的なパケットフィルタ処理が
可能なパケット処理装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a conventional packet filtering process in which an access control program that requires sequential interpretation is simply and sequentially interpreted. When the processing time increases and the packet transfer capability of the router decreases, and when the computer network administrator describes the access control rule of the OR condition using the access control rule of a plurality of lines, the packet filter device performs the same comparison. It solves the problem of performing multiple times and performing unnecessary comparison operations when there is a non-executable path in the access control program. Another object of the present invention is to provide a packet processing device capable of performing efficient packet filtering.

【0012】[0012]

【課題を解決するための手段】本発明のパケット処理装
置におけるパケットフィルタ部2は、アクセス制御プロ
グラム並列化コンパイラ部(以下、ACP並列化コンパ
イラ部と略す)3と、パケットフィルタ実行部5を有す
る。
The packet filter unit 2 in the packet processing apparatus of the present invention has an access control program parallelizing compiler unit (hereinafter abbreviated as ACP parallelizing compiler unit) 3 and a packet filter executing unit 5. .

【0013】ACP並列化コンパイラ部3は、逐次的な
解釈が必要なアクセス制御プログラム1の依存関係を解
析し、経路条件に基づいて並列に解釈可能なアクセス制
御規則からなる中間コード4に変換する手段と、中間コ
ード4を比較パラメータの数に従って分割する手段と、
中間コード4のパケット条件に含まれる複数個の同一な
比較パラメータあるいは包含関係を持つ比較パラメータ
を検出して、これを簡単化する手段と、簡単化により比
較パラメータが空集合となるアクセス制御規則を中間コ
ード4から削除する手段を有する。
The ACP parallelizing compiler unit 3 analyzes a dependency of the access control program 1 which needs to be sequentially interpreted, and converts it into an intermediate code 4 consisting of access control rules which can be interpreted in parallel based on path conditions. Means for dividing the intermediate code 4 according to the number of comparison parameters;
Means for detecting a plurality of identical comparison parameters or comparison parameters having an inclusive relation included in the packet condition of the intermediate code 4 and simplifying the detection, and an access control rule that causes the comparison parameters to be an empty set due to the simplification, There is means for deleting from the intermediate code 4.

【0014】パケットフィルタ実行部5は、通信回線か
ら受信したデータパケットのヘッダ部分を解析し、AC
P並列化コンパイラ部3が生成した中間コード4に基づ
いて、パケットの転送、あるいは、廃棄を決定する手段
を有する。
The packet filter execution unit 5 analyzes the header of the data packet received from the communication line,
It has means for determining packet transfer or discard based on the intermediate code 4 generated by the P parallelizing compiler unit 3.

【0015】上記の構成により、パケットフィルタ処理
時間がアクセス制御プログラム1の行数に比例せず、ア
クセス制御プログラム1に含まれる複数個の比較パラメ
ータの共通部分とパケットヘッダ部分との比較を一回に
抑えることができ、アクセス制御プログラム1の実行不
能経路を検出し、実行不能経路に対応するパケット条件
とパケットヘッダ部分の比較を回避できる。
With the above configuration, the packet filter processing time is not proportional to the number of lines of the access control program 1, and the common portion of the plurality of comparison parameters included in the access control program 1 is compared with the packet header portion once. Thus, it is possible to detect an infeasible path of the access control program 1 and avoid comparison between a packet condition and a packet header corresponding to the infeasible path.

【0016】[0016]

【発明の実施の形態】次に、本発明の実施の形態に付い
て図面を参照して説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0017】図1は本発明のパケット処理装置の第1の
実施例のシステム構成図である。本発明のパケット処理
装置は図1に示すように、ACP並列化コンパイラ部2
では、アクセス制御プログラムのi行目のアクセス制御
規則を、経路条件[3]PCi を用いて次のように記述
することで、全てのアクセス制御規則を並列に実行可能
な中間コード4に変換する。
FIG. 1 is a system configuration diagram of a first embodiment of a packet processing apparatus according to the present invention. As shown in FIG. 1, the packet processing device of the present invention has an ACP parallelizing compiler unit 2.
Then, the access control rules on the i-th line of the access control program are described as follows using the path condition [3] PCi , whereby all the access control rules are converted into the intermediate code 4 that can be executed in parallel. I do.

【0018】[0018]

【数2】 また、請求項6に基づく処理では、上記ACP並列化コ
ンパイラ3の出力を解釈し、逐次的に実行可能な、図4
に示す本発明の第2の実施例の逐次実行コード10を生
成する中間コードスケジューラ部9と、逐次実行コード
10を解釈し、パケットヘッダ部分と比較し、パケット
の転送、あるいは、廃棄を決定する逐次型パケットフィ
ルタ実行部11で、パケットフィルタ実行部5を実現す
る。
(Equation 2) In the processing based on claim 6, the output of the ACP parallelizing compiler 3 is interpreted and can be sequentially executed.
, An intermediate code scheduler unit 9 for generating a sequential execution code 10 according to the second embodiment of the present invention, interprets the sequential execution code 10, compares it with a packet header part, and determines whether to transfer or discard the packet. The packet filter execution unit 5 is realized by the sequential packet filter execution unit 11.

【0019】また、請求項7に基づく処理では、中間コ
ード4を解釈して、並列に実行可能な並列実行コードを
生成する、図6に示す本発明の第3の実施例の並列実行
コード生成部12と、並列実行コードを解釈してパケッ
トヘッダ部分と比較し、パケットの転送あるいは廃棄を
決定する並列型パケットフィルタ実行部14により、パ
ケットフィルタ実行部5を実現する。
In the processing based on claim 7, the intermediate code 4 is interpreted to generate a parallel execution code which can be executed in parallel. The parallel execution code generation according to the third embodiment of the present invention shown in FIG. The packet filter execution unit 5 is realized by a unit 12 and a parallel type packet filter execution unit 14 that interprets the parallel execution code and compares it with a packet header portion to determine whether to transfer or discard the packet.

【0020】また、請求項8に基づく処理では、直近の
パケットフィルタ処理において、パケットヘッダ部分と
一致した並列実行コードのアクセス制御規則へのポイン
タを保存するキャッシュポインタを、請求項7に加えた
構成とし、パケットフィルタ処理において、キャッシュ
ポインタが示すアクセス制御規則を優先して選択し、パ
ケットヘッダ部分との比較を行なう。
In the processing based on claim 8, a cache pointer for storing a pointer to an access control rule of a parallel execution code that matches a packet header part in the latest packet filter processing is added to claim 7. In the packet filter processing, the access control rule indicated by the cache pointer is preferentially selected and compared with the packet header part.

【0021】以下、本発明の実施例を図面に基づいて詳
細に説明する。図1は、本発明のパケット処理装置の第
1の実施例のシステム構成図である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a system configuration diagram of a first embodiment of the packet processing device of the present invention.

【0022】このパケット処理装置は、ACP並列化コ
ンパイラ部3とパケットフィルタ実行部5で構成するパ
ケットフィルタ部2を有し、ACP並列化コンパイラ部
3は、パケット処理装置の起動時に、アクセス制御プロ
グラム1を読み込み、上述の経路条件に従って、並列に
解釈可能な中間コード4を生成する。この時、ACP並
列化コンパイラ3は、次の手法を用いて生成する中間コ
ード4を最適化する。生成する中間コード4は、互いに
依存関係を持たない複数行のアクセス制御規則からな
り、アクセス制御規則はパケット条件とルータ動作の対
応で構成する。
This packet processing device has a packet filter unit 2 composed of an ACP parallelizing compiler unit 3 and a packet filter executing unit 5. The ACP parallelizing compiler unit 3 executes an access control program when the packet processing device starts up. 1 is read, and an intermediate code 4 that can be interpreted in parallel is generated according to the above-described path condition. At this time, the ACP parallelizing compiler 3 optimizes the generated intermediate code 4 using the following method. The generated intermediate code 4 is composed of a plurality of rows of access control rules that do not depend on each other, and the access control rules are configured by correspondence between packet conditions and router operations.

【0023】− 中間コード4のアクセス制御規則を、
比較パラメータの数に従って分割する。アクセス制御プ
ログラム1のi行目のパケット条件をPi 、ルータ動作
をA i 、Pi を構成する6種類の比較パラメータを
ij、Pi から生成する中間コードのアクセス制御規則
の集合を{PCi }とすると、ACP並列化コンパイラ
は次のように中間コードを生成する。
The access control rules of the intermediate code 4 are:
Divide according to the number of comparison parameters. Access control
The packet condition of the i-th line of the program 1 is Pi , Router operation
A i , Pi The six comparison parameters that make up
pij, Pi Access control rules for intermediate code generated from
Set of {PCi }, ACP parallelizing compiler
Generates intermediate code as follows:

【0024】[0024]

【数3】 ・中間コード4のパケット条件に、条件と一致するパケ
ットが同一となる複数の比較パラメータ、あるいは、条
件と一致するパケットが部分集合となる2つの比較パラ
メータを生成した場合、すなわちα=β、あるいは、α
がβの真部分集合が成立する比較パラメータα∩βを生
成した場合には、これらの比較パラメータを集合の間の
演算を用いて簡単化する。
(Equation 3) When a plurality of comparison parameters in which packets matching the conditions are the same or two comparison parameters in which packets matching the conditions are a subset are generated in the packet condition of the intermediate code 4, that is, α = β, or , Α
Generates comparison parameters α∩β that satisfy the true subset of β, these comparison parameters are simplified by using operations between the sets.

【0025】例1:tcp ∩tcp →tcp ,ここで、 tcp
(Transmission Control Protocol) 例2:11.22.*.* ∩ 11.22.33.44→11.22.33.44 ・α∩β=0が成立する比較パラメータαとβを生成し
た場合には、これらの比較パラメータを持つアクセス制
御規則を中間コード4から削除する。
Example 1: tcp @ tcp → tcp, where tcp
(Transmission Control Protocol) Example 2: 11.22. *. * ∩ 11.22.33.44 → 11.22.33.44 ・ When the comparison parameters α and β satisfying α∩β = 0 are generated, access control having these comparison parameters is performed. Delete the rule from the intermediate code 4.

【0026】図3はACP並列化コンパイラ3が生成す
る中間コード4の一例である。図は、図2で例示したア
クセス制御プログラムを入力した場合にACP並列化コ
ンパイラ3が生成する中間コードである。中間コード4
はアクセス制御プログラムと同様に複数行のアクセス制
御規則からなるが、アクセス制御規則が互いに依存関係
を持たず、任意の順序でパケットヘッダ部分と比較可能
な点がアクセス制御プログラム1と異なる。中間コード
4のアクセス制御規則は、プロトコル種類、始点アドレ
ス、始点ポート番号、終点アドレス、終点ポート番号お
よびACKビットの6種類の比較パラメータからなるパ
ケット条件と、ルータ動作とで構成する。比較パラメー
タには全てのパターンと一致するワイルドカード“*”
も記述可能である。ルータ動作は、パケット条件と一致
したパケットの処理方法であり、パケットの転送を許可
する“転送”とパケットを転送せずに廃棄する“廃棄”
の2種類の値をとり得る。
FIG. 3 shows an example of the intermediate code 4 generated by the ACP parallelizing compiler 3. The figure shows an intermediate code generated by the ACP parallelizing compiler 3 when the access control program illustrated in FIG. 2 is input. Intermediate code 4
The access control program includes a plurality of rows of access control rules as in the case of the access control program, but differs from the access control program 1 in that the access control rules do not depend on each other and can be compared with the packet header portion in an arbitrary order. The access control rule of the intermediate code 4 includes a packet condition including six types of comparison parameters of a protocol type, a start address, a start port number, an end address, an end port number, and an ACK bit, and a router operation. Wildcard "*" that matches all patterns in the comparison parameter
Can also be described. The router operation is a method of processing a packet that matches a packet condition, and includes “transfer” for permitting packet transfer and “discard” for discarding a packet without transferring the packet.
Can be taken.

【0027】図4は本発明のパケット処理装置の第2の
実施例の単一のCPUのみ使用可能な場合のパケットフ
ィルタ実行部5の一部の一構成を示す図である。中間コ
ードスケジューラ9は中間コード4を解釈し、逐次的に
実行可能な逐次実行コード10を生成する。逐次型パケ
ットフィルタ実行部11は逐次実行コード10を解釈
し、パケットヘッダ部分と比較し、パケットの転送ある
いは廃棄を決定する。
FIG. 4 is a diagram showing one configuration of a part of the packet filter execution unit 5 when only a single CPU can be used in the second embodiment of the packet processing apparatus of the present invention. The intermediate code scheduler 9 interprets the intermediate code 4 and generates a sequentially executable code 10 that can be sequentially executed. The sequential packet filter execution unit 11 interprets the sequential execution code 10 and compares it with the packet header to determine whether to transfer or discard the packet.

【0028】中間コードスケジューラ部9は、中間コー
ド4が任意の順序で実行可能であることから、中間コー
ド4を解釈して木構造となるように比較パラメータとパ
ケットヘッダ部分の比較順序を決定し、逐次実行コード
10を生成する。木構造において、ノードは一つの比較
パラメータを示し、枝は比較パラメータとパケットヘッ
ダ部分との比較結果に従って、次に比較すべきノードへ
のポインタである。
Since the intermediate code 4 can be executed in an arbitrary order, the intermediate code scheduler 9 interprets the intermediate code 4 and determines a comparison order of the comparison parameter and the packet header portion so as to form a tree structure. , A sequential execution code 10 is generated. In the tree structure, a node indicates one comparison parameter, and a branch is a pointer to a node to be compared next according to a comparison result between the comparison parameter and the packet header portion.

【0029】比較パラメータとパケットヘッダとの比較
結果は、比較パラメータがプロトコル種類とACKビッ
トの場合には、“比較パラメータとパケットヘッダの値
が等しい”、および、“比較パラメータとパケットヘッ
ダの値が等しくない”の2種類があり、始点アドレス、
始点ポート番号、終点アドレス、および、終点ポート番
号の場合には、“比較パラメータとパケットヘッダの値
が等しい”、“比較パラメータよりパケットヘッダの値
が小さい”、または、“比較パラメータよりパケットヘ
ッダの値が大きい”の3種類がある。木構造の葉はルー
タ動作を表す。この時、中間コードスケジューラ9は、
比較パラメータの種類別に階層化するとともに、各アク
セス制御規則で共通する比較パラメータを抽出して、こ
れらが木の同一パスとなるように構築することで、生成
する逐次実行コードの木の高さを小さく抑える。図5は
中間コードスケジューラ9が生成する逐次実行コード1
0の一例である。図3で例示した中間コードを入力した
場合に中間コードスケジューラ9が生成する逐次実行コ
ードである。
The comparison result between the comparison parameter and the packet header is as follows: when the comparison parameter is the protocol type and the ACK bit, “the comparison parameter and the value of the packet header are equal”; Unequal ", starting address,
In the case of the start port number, end address, and end port number, “the value of the packet header is equal to the comparison parameter”, “the value of the packet header is smaller than the comparison parameter”, or “the packet header is smaller than the comparison parameter” There are three types of "large value". The leaves of the tree structure represent a router operation. At this time, the intermediate code scheduler 9
By layering by comparison parameter type, extracting the common comparison parameters in each access control rule, and constructing them so that they are on the same path of the tree, the height of the tree of the sequential execution code to be generated can be reduced. Keep small. FIG. 5 shows the sequential execution code 1 generated by the intermediate code scheduler 9.
0 is an example. This is a sequential execution code generated by the intermediate code scheduler 9 when the intermediate code illustrated in FIG. 3 is input.

【0030】図5に示す逐次実行コードは、木構造にお
いて、プロトコル種類、ACKビット、終点アドレス、
終点ポートの順序で比較が行われるように、比較パラメ
ータの種類別に階層化している。プロトコル種類の比較
層では、パケットのヘッダ部分が含むプロトコル種類が
TCPであるかどうかを比較し、TCPの場合にはAC
Kビットの比較へ移り、TCPでない場合には、ルータ
の通過を禁止してパケットの廃棄を指示する葉へ移る。
同様に、ACKビットの比較層では、パケットのは域を
指示する葉へ移る。同様に、ACKビットの比較層で
は、パケットのヘッダ部分が含むACKビットの内容が
establishedである場合とestablishedでない場合につい
て、次に比較すべきノードを指し示している。終点アド
レスの比較層と終点ポート番号の比較層では、それぞれ
パケットのヘッダ部分が含む終点アドレスと終点ポート
番号に関する比較パラメータを示している。
The sequential execution code shown in FIG. 5 has, in a tree structure, a protocol type, an ACK bit, an end address,
The layers are hierarchized by the type of the comparison parameter so that the comparison is performed in the order of the end point port. The protocol type comparison layer compares whether or not the protocol type included in the header portion of the packet is TCP.
The processing shifts to the comparison of K bits, and if it is not TCP, the processing is prohibited and the processing shifts to a leaf instructing to discard the packet.
Similarly, in the ACK bit comparison layer, the packet moves to the leaf indicating the area. Similarly, in the ACK bit comparison layer, the content of the ACK bit included in the header portion of the packet is
Indicates the next node to be compared between established and non-established. The comparison layer of the destination address and the comparison layer of the destination port number indicate comparison parameters relating to the destination address and the destination port number included in the header portion of the packet, respectively.

【0031】パケットのヘッダ部分と各ノードの比較パ
ラメータを比較し、パケットのヘッダ部分がノードより
小さい場合には”<”で示される枝、パケットのヘッダ
部分とノードの比較パラメータが等しい場合には”>”
で示される枝、パケットのヘッダ部分がノードの比較パ
ラメータより大きい場合には”>”で示される枝が、そ
れぞれ、次に比較するノードを示している。また、葉の
値”P”は、パケットの通過を許可し、パケットの転送
を指示しており、葉の値”D”は、パケットの通過を禁
止し、パケットの廃棄を指示している。
The header part of the packet is compared with the comparison parameter of each node. If the header part of the packet is smaller than the node, the branch is indicated by “<”. If the header part of the packet is equal to the comparison parameter of the node, ">"
When the header portion of the packet is larger than the comparison parameter of the node, the branch indicated by “>” indicates the node to be compared next. The leaf value “P” permits the passage of the packet and instructs the transfer of the packet, and the leaf value “D” prohibits the passage of the packet and instructs the discard of the packet.

【0032】逐次型パケットフィルタ実行部11は逐次
実行コード10を読み込み、逐次実行コード10の根の
ノードから順に、木構造に沿ってパケットヘッダとの比
較を行ない、到達した葉の値に従ってパケットの転送、
あるいは、廃棄を決定する。すなわち、逐次型パケット
フィルタ実行部でのパケットフィルタ処理時間は、中間
コードスケジューラにより生成された逐次実行コードの
木の高さに依存する。
The sequential packet filter execution unit 11 reads the sequential execution code 10, compares the sequential execution code 10 with a packet header along a tree structure in order from the root node of the sequential execution code 10, and performs packet comparison according to the value of the leaf that has arrived. transfer,
Alternatively, discard is determined. That is, the packet filter processing time in the sequential packet filter execution unit depends on the tree height of the sequential execution code generated by the intermediate code scheduler.

【0033】逐次型パケットフィルタ実行部14の動作
について以下に述べる。
The operation of the sequential packet filter execution unit 14 will be described below.

【0034】1.逐次実行コードを読み込む。1. Read the sequential execution code.

【0035】2.回線対応部で抽出したパケットヘッダ
部分を受け取る。
2. The packet header part extracted by the line corresponding part is received.

【0036】パケットヘッダ部分には、プロトコル種
類、始点アドレス、始点ポート番号、終点アドレス、終
点ポート番号、および、ACKビットが格納されてい
る。
The packet header portion stores a protocol type, a start address, a start port number, an end address, an end port number, and an ACK bit.

【0037】3.逐次実行コードの根のノードを読み出
す。
3. Read the root node of the sequential execution code.

【0038】4.読み出したのがノードの場合は5へ行
く。また、読み出したのが葉の場合は7へ行く。
4. If the node is read, go to step 5. If the readout is a leaf, go to 7.

【0039】5.ノードが示す比較パラメータについ
て、ノードが示す値とパケットヘッダの値を比較する。
この時、ノードの比較パラメータと、パケットヘッダと
の比較結果には、比較パラメータがプロトコル種類とA
CKビットの場合には、“ 比較パラメータとパケット
ヘッダの値が等しい”、および、“比較パラメータ と
パケットヘッダの値が等しくない”の2種類があり、始
点アドレス、始点ポ ート番号、”終点アドレス、およ
び、終点ポート番号の場合には、“比較パラメータとパ
ケットヘッダの値が等しい”、“比較パラメータよりパ
ケット ヘッダの値が小さい”、または、“比較パラメ
ータよりパケットヘッダの値が 大きい”の3種類があ
る。
5. For the comparison parameter indicated by the node, the value indicated by the node is compared with the value of the packet header.
At this time, in the comparison result between the comparison parameter of the node and the packet header, the comparison parameter includes the protocol type and A
In the case of the CK bit, there are two types, “comparison parameter and packet header value are equal” and “comparison parameter and packet header value are not equal”. The start point address, start port number, and “end point” In the case of the address and the destination port number, the value of “the comparison parameter and the packet header value are equal”, “the packet header value is smaller than the comparison parameter”, or “the packet header value is larger than the comparison parameter” There are three types.

【0040】6.比較結果に従って、ノードから伸びる
枝を選択し、枝が指し示している次に比較すべきノー
ド、または、葉を読み出す。4へ行く。
6. According to the comparison result, a branch extending from the node is selected, and the next node or leaf pointed to by the branch to be compared is read. Go to 4.

【0041】7.葉が示すルータ動作がルータの通過を
許可している場合は、パケットの転送を行う。葉が示す
ルータ動作がルータの通過を禁止している場合には、パ
ケットの廃棄を行う。
7. If the router operation indicated by the leaf permits passage through the router, the packet is transferred. If the router operation indicated by the leaf prohibits passage through the router, the packet is discarded.

【0042】図6は本発明のパケット処理装置の第3の
実施例のパケットフィルタ部の一部で、有限個のCPU
資源が使用可能な場合のパケットフィルタ実行部5の構
成を示す図である。並列実行コード生成部12は、中間
コード4を解釈して、並列に実行可能な並列実行コード
13を生成する。並列型パケットフィルタ実行部14は
並列実行コード13を解釈し、パケットヘッダ部分と比
較し、パケットの転送あるいは廃棄を決定する。
FIG. 6 shows a part of a packet filter section of a packet processing apparatus according to a third embodiment of the present invention.
FIG. 3 is a diagram illustrating a configuration of a packet filter execution unit 5 when resources are available. The parallel execution code generation unit 12 interprets the intermediate code 4 and generates a parallel execution code 13 that can be executed in parallel. The parallel-type packet filter execution unit 14 interprets the parallel execution code 13 and compares it with the packet header to determine whether to transfer or discard the packet.

【0043】並列実行コード生成部12は中間コード4
を解釈して、中間コード4と、比較パラメータとパケッ
トヘッダ部分の比較結果を各CPUが共有するための比
較結果ビットと、アクセス制御規則とパケットへッダ部
分が一致しないことを示す不成立ビットと、これらを結
ぶポインタとで構成する並列実行コード13を生成す
る。
The parallel execution code generator 12 generates the intermediate code 4
And an intermediate code 4, a comparison result bit for each CPU to share a comparison result between the comparison parameter and the packet header portion, and an unsatisfied bit indicating that the access control rule and the packet header portion do not match. , And a pointer connecting them, to generate a parallel execution code 13.

【0044】図7は並列実行コードの一例である。並列
実行コード生成部12は、中間コード4から比較パラメ
ータの共通部分を抽出し、図7に示したように、比較パ
ラメータの共通部分毎に比較結果ビットを用意し、ポイ
ンタを作成する。図7に示した2つのアクセス制御規則
では、プロトコル種類と終点アドレスの比較パラメータ
が、各々”TCP”、”=11.22*.*”で共通し
ていることから、各々の比較パラメータが共有する比較
結果ビットを用意し、ポインタを張っている。
FIG. 7 shows an example of the parallel execution code. The parallel execution code generation unit 12 extracts the common part of the comparison parameter from the intermediate code 4, prepares a comparison result bit for each common part of the comparison parameter, and creates a pointer, as shown in FIG. In the two access control rules shown in FIG. 7, since the comparison parameters of the protocol type and the destination address are common to "TCP" and "= 11.22 *. *", The comparison parameters are shared. A comparison result bit is prepared and a pointer is set.

【0045】比較結果ビットは、比較パラメータとパケ
ットヘッダ部分の比較が未実行であることを示す“NO
NE”、比較パラメータとパケットヘッダ部分が一致し
たことを示す“TRUE”、比較パラメータとパケット
ヘッダ部分が不一致であることを示す“FALSE”の
3つの値をとる。
The comparison result bit indicates "NO", indicating that the comparison between the comparison parameter and the packet header has not been performed.
NE, "TRUE" indicating that the comparison parameter and the packet header part match, and "FALSE" indicating that the comparison parameter does not match the packet header part.

【0046】また、並列実行コード生成部12は、アク
セス制御規則毎に不成立ビットを用意し、図7に示した
ように、比較結果ビットから不成立ビットへのポインタ
を作成する。図7に示した2つのアクセス制御規則で
は、プロトコル種類と終点アドレスの比較パラメータが
比較結果ビットを共有しているので、比較結果ビットか
ら、これらアクセス制御規則の不成立ビットへポインタ
を張っている。
The parallel execution code generation unit 12 prepares an unsatisfied bit for each access control rule, and creates a pointer from the comparison result bit to the unsatisfied bit, as shown in FIG. In the two access control rules shown in FIG. 7, since the comparison parameter of the protocol type and the destination address share the comparison result bit, a pointer is set from the comparison result bit to a bit that does not satisfy these access control rules.

【0047】不成立ビットは、アクセス制御規則とパケ
ットヘッダ部分の比較結果が不明であり、かつ、いずれ
のCPUもアクセス制御規則とパケットヘッダ部分の比
較を行なっていないことを示す“NONE”と、アクセ
ス制御規則とパケットヘッダ部分の比較結果は不明だ
が、あるCPUがアクセス制御規則とパケットヘッダ部
分の比較を行なっていることを示す“ACTIVE”
と、アクセス制御規則とパケットヘッダ部分の比較結果
が不一致であることを示す“FALSE”の3種類の値
をとる。
The unsatisfied bits indicate "NONE" indicating that the result of comparison between the access control rule and the packet header is unknown, and that none of the CPUs compare the access control rule with the packet header. The result of the comparison between the control rule and the packet header is unknown, but "ACTIVE" indicating that a certain CPU is comparing the access control rule with the packet header.
And "FALSE" indicating that the comparison result between the access control rule and the packet header part does not match.

【0048】並列型パケットフィルタ実行部14は、有
限個のCPUと共有メモリ15をシステムバス18で接
続した構成をとる。各CPUは共有メモリ15に格納さ
れた任意のデータの読み出し、書き込みが可能である。
図6に示すように、共有メモリ15には、並列実行コー
ド生成部12が出力した並列実行コード13と、並列実
行コード13のアクセス制御規則を指し示すキャッシュ
ポインタを格納する。
The parallel type packet filter execution section 14 has a configuration in which a finite number of CPUs and a shared memory 15 are connected by a system bus 18. Each CPU can read and write arbitrary data stored in the shared memory 15.
As shown in FIG. 6, the shared memory 15 stores the parallel execution code 13 output by the parallel execution code generation unit 12 and a cache pointer indicating the access control rule of the parallel execution code 13.

【0049】並列型パケットフィルタ実行部14におけ
る各CPUのパケットフィルタ処理動作を以下に具体的
に説明する。パケットフィルタ処理に先立ち、全ての不
成立ビットと全ての比較結果ビットは“NONE”に初
期化する。
The packet filter processing operation of each CPU in the parallel type packet filter execution section 14 will be specifically described below. Prior to the packet filtering, all unsatisfied bits and all comparison result bits are initialized to "NONE".

【0050】1.キャッシュポインタが指し示すアクセ
ス制御規則の不成立ビットの値が“NONE”の場合に
は、そのアクセス制御規則を読み出し、不成立ビットの
値が“ACTIVE”、あるいは、“FALSE”の場
合には、不成立ビットが“NONE”であるアクセス制
御規則を動的に選択して、読み出す。
1. If the value of the unsatisfied bit of the access control rule indicated by the cache pointer is “NONE”, the access control rule is read out. If the value of the unsatisfied bit is “ACTIVE” or “FALSE”, the unsatisfied bit is The access control rule “NONE” is dynamically selected and read.

【0051】2.読み出したアクセス制御規則の不成立
ビットに“ACTIVE”を書き込む。
2. "ACTIVE" is written to the read unsatisfied bit of the access control rule.

【0052】3.読み出したアクセス制御規則のパケッ
ト条件を構成する6種類の比較パラメータについて、順
番に選択し、受信したパケットのヘッダ部分と比較す
る。全ての比較パラメータとの比較結果を得るまで、下
記4から10を繰り返す。
3. The six kinds of comparison parameters constituting the packet conditions of the read access control rule are sequentially selected and compared with the header part of the received packet. Steps 4 to 10 below are repeated until a comparison result with all the comparison parameters is obtained.

【0053】4.比較パラメータが比較結果ビットを持
つ場合には比較結果ビットの値を調べる。比較結果ビッ
トの値が“FALSE”の場合は5へ、“TRUE”の
場合は6へ、“NONE”の場合は7へ行く。比較パラ
メータが比較結果ビットを持たない場合には7へ行く。
4. If the comparison parameter has a comparison result bit, the value of the comparison result bit is checked. If the value of the comparison result bit is “FALSE”, go to 5, if it is “TRUE”, go to 6, and if it is “NONE”, go to 7. If the comparison parameter has no comparison result bit, go to 7.

【0054】5.現在選択中のアクセス制御規則は、受
信パケットのヘッダ部分と不一致であるので、新たなア
クセス制御規則を選択するために、1へ戻る。
5. Since the currently selected access control rule does not match the header portion of the received packet, the process returns to 1 to select a new access control rule.

【0055】6.この比較パラメータは、パケットヘッ
ダ部分と一致することが明確なので、比較を行なわず、
次なる比較パラメータを選択し、4へ戻る。
6. Since it is clear that this comparison parameter matches the packet header part, no comparison is performed.
Select the next comparison parameter and return to 4.

【0056】7.比較パラメータと受信パケットのヘッ
ダ部分との比較を行なう。比較結果が不一致の場合には
8へ、一致した場合には9へ行く。
7. The comparison parameter is compared with the header portion of the received packet. If the comparison result is mismatch, go to step 8; if they match, go to step 9.

【0057】8.比較パラメータが比較結果ビットを持
つ場合には、比較結果ビットに“FALSE”を書き込
み、比較結果ビットが指し示す全ての不成立ビットに
“FALSE”を書き込む。そして、現在選択中のアク
セス制御規則は、受信パケットのヘッダ部分と一致しな
いので、新たなアクセス制御規則を選択するために、1
へ戻る。
8. If the comparison parameter has a comparison result bit, "FALSE" is written in the comparison result bit, and "FALSE" is written in all the unsatisfied bits indicated by the comparison result bit. Then, the currently selected access control rule does not match the header portion of the received packet.
Return to

【0058】9.比較パラメータが比較結果ビットを持
つ場合には、比較結果ビットに“TRUE”を書き込
む。そして、次なる比較パラメータを選択し、4へ戻
る。
9. If the comparison parameter has a comparison result bit, “TRUE” is written to the comparison result bit. Then, the next comparison parameter is selected, and the process returns to 4.

【0059】10.選択したアクセス制御規則の全ての
比較パラメータが受信パケットのヘッダ部分と一致する
まで、1から10を繰り返す。
10. Steps 1 to 10 are repeated until all the comparison parameters of the selected access control rule match the header part of the received packet.

【0060】11.選択したアクセス制御規則の全ての
比較パラメータが、パケットのヘッダ部分と一致したこ
とから、選択したアクセス制御規則のルータ動作の値に
従って、パケットの転送、あるいは、廃棄を行なう。
11. Since all the comparison parameters of the selected access control rule match the header part of the packet, the packet is transferred or discarded according to the value of the router operation of the selected access control rule.

【0061】12.選択したアクセス制御規則を指し示
すよう、キャッシュポインタを書き換える。
12. Rewrite the cache pointer to point to the selected access control rule.

【0062】[0062]

【発明の効果】以上説明したように、本発明では、逐次
的な解釈が必要なアクセス制御プログラムの依存関係を
解析し、並列に解釈可能な中間コードに変換することに
より、任意の順序でアクセス制御規則とパケットヘッダ
部分との比較が可能となる。これにより、逐次実行型パ
ケットフィルタ実行部では、パケットフィルタ処理時間
が木構造の高さに依存する逐次実行コードが生成可能と
なり、また、並列型パケットフィルタ実行部では、複数
個のCPUが並列にパケットフィルタ処理を行なうこと
が可能となる。よって、従来のパケットフィルタ処理技
術において、パケットフィルタ処理時間がアクセス制御
プログラムの行数に比例する問題が解消できるという効
果がある。
As described above, according to the present invention, the access control program which needs to be sequentially interpreted is analyzed for dependency and converted into an intermediate code which can be interpreted in parallel, so that access can be made in an arbitrary order. The control rule can be compared with the packet header portion. This allows the sequential execution type packet filter execution unit to generate a sequential execution code whose packet filter processing time depends on the height of the tree structure. In the parallel type packet filter execution unit, a plurality of CPUs Packet filtering can be performed. Therefore, in the conventional packet filtering technology, there is an effect that the problem that the packet filtering time is proportional to the number of lines of the access control program can be solved.

【0063】また、ACP並列化コンパイラが中間コー
ドを生成する際に、比較パラメータの簡単化を行なうと
ともに、単一CPU環境では中間コードスケジューラ部
が中間コードで共通する比較パラメータを抽出し、これ
らが木構造の同一パスとなるよう逐次実行コードを構築
し、あるいは、有限個のCPU環境では並列実行コード
生成部が中間コードで共通する比較パラメータを抽出
し、パケットヘッダ部分との比較結果を各CPUが共有
できるように並列実行コードを生成することにより、従
来のパケットフィルタ処理技術において、アクセス制御
プログラムに同一の値を持つ複数のアクセス制御規則が
記述された場合に同じ比較演算を複数回行なってしまう
問題が解消できる効果がある。
When the ACP parallelizing compiler generates the intermediate code, the comparison parameters are simplified, and in a single CPU environment, the intermediate code scheduler extracts the comparison parameters common to the intermediate code. The sequential execution code is constructed so as to have the same path in the tree structure. Alternatively, in a finite number of CPU environments, the parallel execution code generation unit extracts a comparison parameter common to the intermediate code, and compares the comparison result with the packet header portion with each CPU. In the conventional packet filtering technique, when the access control program describes a plurality of access control rules having the same value, the same comparison operation is performed a plurality of times by generating the parallel execution code so that the code can be shared. This has the effect of solving the problem.

【0064】また、ACP並列化コンパイラが比較パラ
メータの簡単化を行なう際、パケット条件が空集合とな
るアクセス制御規則を中間コードから削除することによ
り、従来のパケットフィルタ処理技術において、実行不
能経路のパケット条件を比較してしまう問題が解消でき
る。
Further, when the ACP parallelizing compiler simplifies the comparison parameter, by removing the access control rule in which the packet condition becomes an empty set from the intermediate code, the conventional packet filtering technique can not execute the path that cannot be executed. The problem of comparing packet conditions can be solved.

【0065】これらの結果に基づき、本発明によれば、
アクセス制御プログラムの行数がパケットフィルタ処理
能力、さらには、パケットルータ処理装置のパケット転
送能力に影響を及ぼさない、高速かつ効率的なパケット
フィルタ処理装置が実現可能となるという効果がある。
Based on these results, according to the present invention,
There is an effect that it is possible to realize a high-speed and efficient packet filter processing device in which the number of lines of the access control program does not affect the packet filter processing capability and the packet transfer capability of the packet router processing device.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明のパケット処理装置の第1の実施例のシ
ステム構成図である。
FIG. 1 is a system configuration diagram of a first embodiment of a packet processing device of the present invention.

【図2】アクセス制御プログラムの一例である。FIG. 2 is an example of an access control program.

【図3】ACP並列化コンパイラが生成する中間コード
の一例である。
FIG. 3 is an example of an intermediate code generated by an ACP parallelizing compiler;

【図4】本発明のパケット処理装置の第2の実施例で、
単一CPUによるパケットフィルタ実行部の一構成例で
ある。
FIG. 4 is a second embodiment of the packet processing device according to the present invention;
6 is a configuration example of a packet filter execution unit using a single CPU.

【図5】中間コードスケジューラが生成する逐次実行コ
ードの一例である。
FIG. 5 is an example of a sequential execution code generated by an intermediate code scheduler.

【図6】本発明のパケット処理装置の第3の実施例で、
有限個のCPUによるパケットフィルタ部の一構成例で
ある。
FIG. 6 is a diagram illustrating a packet processing apparatus according to a third embodiment of the present invention;
5 is a configuration example of a packet filter unit including a finite number of CPUs.

【図7】並列実行コード生成部により生成した並列実行
コードの一例である。
FIG. 7 is an example of a parallel execution code generated by a parallel execution code generation unit.

【図8】従来のパケットルータ処理装置の一構成例であ
る。
FIG. 8 is a configuration example of a conventional packet router processing device.

【符号の説明】[Explanation of symbols]

1 アクセス制御プログラム 11 パケット条件 12 ルータ動作 13 比較パラメータ 2 パケットフィルタ部 3 アクセス制御プログラム並列化コンパイラ部 4 中間コード 5 パケットフィルタ実行部 6 ルートテーブル検索部 7 経路情報格納テーブル 8、81、82、83 回線対応部 9 中間コードスケジューラ部 10 逐次実行コード 11 逐次型パケットフィルタ実行部 12 並列実行コード生成部 13 並列実行コード 14 並列型パケットフィルタ実行部 15 共有メモリ 16 並列実行コード格納テーブル 17 キャッシュテーブル 18 システムバス 21 パケットフィルタ部 22 ルートテーブル検索部 23 経路情報格納テーブル1 access control program 1 1 packet condition 1 2 router operation 1 3 comparison parameter 2 packet filter section 3 access control program parallelizing compiler section 4 intermediate code 5 packet filter execution section 6 route table search section 7 route information storage table 8, 8 1 , 8 2 , 8 3 Line handling unit 9 Intermediate code scheduler unit 10 Sequential execution code 11 Sequential packet filter execution unit 12 Parallel execution code generation unit 13 Parallel execution code 14 Parallel packet filter execution unit 15 Shared memory 16 Parallel execution code storage Table 17 Cache table 18 System bus 21 Packet filter unit 22 Route table search unit 23 Route information storage table

───────────────────────────────────────────────────── フロントページの続き (72)発明者 小倉 毅 東京都新宿区西新宿三丁目19番2号 日本 電信電話株式会社内 ──────────────────────────────────────────────────の Continuing from the front page (72) Inventor Takeshi Ogura Nippon Telegraph and Telephone Corporation 3-19-2 Nishishinjuku, Shinjuku-ku, Tokyo

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 複数種類の比較パラメータからなるパケ
ット条件、および、パケット条件に一致したパケットの
転送、あるいは、廃棄を定義する複数行のアクセス制御
規則からなるアクセス制御プログラムを入力し、該アク
セス制御プログラムに従ってパケットのヘッダを解析
し、パケットの転送、または、廃棄を決定するパケット
フィルタ部と、経路情報を検索して、転送パケットの回
線を決定するルートテーブル検索部を有するパケット処
理装置において、 前記パケットフィルタ部がアクセス制御プログラムコン
パイラ部とパケットフィルタ実行部とからなり、 アクセス制御プログラムコンパイラ部は、アクセス制御
プログラムを変換して中間コードを生成する手段を有
し、 パケットフィルタ実行部は、前記中間コードを解釈し
て、通信回線から受信したパケットのヘッダ部分と比較
し、比較結果に従ってパケットの転送あるいは廃棄を決
定する手段を有することを特徴とするパケット処理装
置。
1. An access control program comprising a packet condition comprising a plurality of types of comparison parameters and a plurality of rows of access control rules defining transfer or discarding of a packet matching the packet condition, and A packet processing apparatus comprising: a packet filter unit that analyzes a header of a packet according to a program and determines whether to transfer or discard a packet; and a route table search unit that searches for route information and determines a line of a transfer packet. The packet filter unit includes an access control program compiler unit and a packet filter execution unit. The access control program compiler unit includes means for converting the access control program to generate an intermediate code. Interpret the code and communicate A packet processing apparatus comprising: means for comparing a header portion of a packet received from a line and determining transfer or discarding of the packet according to the comparison result.
【請求項2】 前記アクセス制御プログラムが逐次的な
解釈が必要な依存関係を持つ複数行のアクセス制御規則
からなり、 前記アクセス制御プログラムコンパイラ部が、アクセス
制御プログラムの依存関係を解釈し、経路条件に基づい
て並列に解釈可能なアクセス制御規則からなる中間コー
ドに変換する手段を有する、アクセス制御プログラム並
列化コンパイラ部である請求項1記載のパケット処理装
置。
2. The access control program according to claim 1, wherein the access control program comprises a plurality of lines of access control rules having a dependency that requires a sequential interpretation. 2. The packet processing device according to claim 1, wherein the packet processing device is an access control program parallelizing compiler unit having means for converting into an intermediate code consisting of access control rules that can be interpreted in parallel based on the compiler.
【請求項3】 前記アクセス制御プログラム並列化コン
パイラ部が、比較パラメータの数に従って中間コードを
分割し生成する請求項2記載のパケット処理装置。
3. The packet processing device according to claim 2, wherein the access control program parallelizing compiler divides and generates the intermediate code according to the number of comparison parameters.
【請求項4】 前記アクセス制御プログラム並列化コン
パイラ部が、アクセス制御プログラムを変換した結果か
ら、条件と一致するパケットが同一となる複数の比較パ
ラメータ、または、条件と一致するパケットが部分集合
となる2つの比較パラメータを検出し、これらの比較パ
ラメータを集合の間の演算を用いて簡単化する機能を有
する請求項2または3に記載のパケット処理装置。
4. A plurality of comparison parameters in which packets matching a condition are the same or a packet matching a condition is a subset from the result of the conversion of the access control program by the access control program parallelizing compiler unit. 4. The packet processing device according to claim 2, further comprising a function of detecting two comparison parameters and simplifying the comparison parameters by using an operation between sets.
【請求項5】 前記アクセス制御プログラム並列化コン
パイラ部が、比較パラメータの簡単化によりパケット条
件が空集合となるアクセス制御規則を中間コードから削
除する機能を有する請求項4記載のパケット処理装置。
5. The packet processing apparatus according to claim 4, wherein the access control program parallelizing compiler has a function of deleting an access control rule whose packet condition becomes an empty set by simplifying the comparison parameter from the intermediate code.
【請求項6】 前記パケットフィルタ部が、入力された
複数のアクセス制御規則を解釈してパケットヘッダ部分
とパケット条件との比較順序を決定する手段と、比較パ
ラメータを示すノードと、ノードが示す比較パラメータ
とパケットヘッダ部分の比較結果に従って、次に比較す
べきノードを示す枝と、パケット条件に一致したパケッ
トの転送、あるいは、廃棄を示す葉で構成する木構造の
逐次実行コードを生成する、中間コードスケジューラ部
を有し、 かつ、前記パケットフィルタ実行部が、中間コードスケ
ジューラ部が生成した逐次実行コードを解釈し、通信回
線から受信したデータパケットのヘッダ部分を解析し、
中間コードスケジューラ部が生成した木構造の逐次実行
コードの根のノードから順にパケットヘッダ部分との比
較を行ない、到達した葉の値に従ってパケットの転送あ
るいは廃棄を決定する、逐次型パケットフィルタ実行部
である請求項1記載のパケット処理装置。
6. A means for interpreting a plurality of input access control rules to determine a comparison order between a packet header part and a packet condition, a node indicating a comparison parameter, and a comparison indicated by the node. According to the comparison result of the parameter and the packet header portion, an intermediate code that generates a tree-structured sequential execution code composed of a branch indicating a node to be compared next and a leaf indicating transfer or discarding of a packet that matches the packet condition, A code scheduler unit, and the packet filter execution unit interprets the sequential execution code generated by the intermediate code scheduler unit, analyzes a header portion of a data packet received from the communication line,
A sequential packet filter execution unit that performs comparison with the packet header part in order from the root node of the tree-structured sequential execution code generated by the intermediate code scheduler unit, and determines whether to forward or discard the packet according to the value of the reached leaf. The packet processing device according to claim 1.
【請求項7】 前記パケットフィルタ部が、入力された
複数のアクセス制御規則から各アクセス制御規則の共通
する比較パラメータを抽出する手段と、入力された複数
のアクセス制御規則に共通する比較パラメータとパケッ
トヘッダ部分との比較結果を各CPUが共有するための
比較結果ビットと、各アクセス制御規則にアクセス制御
規則とパケットヘッダ部分の比較結果を保持するための
不成立ビットを加えて並列実行コードを生成する、並列
実行コード生成部を有し、 かつ、パケットフィルタ実行部が、有限個のCPUを有
し、並列実行コード生成部が出力した並列実行コードを
解釈し、不成立ビットの値に基づいて未実行ノアクセス
制御規則を動的に選択する手段と、選択したアクセス制
御規則とパケットヘッダ部分との比較を行い、パケット
の転送、あるいは、廃棄を決定する手段と、比較結果ビ
ットを持つ比較パラメータとパケットヘッダ部分の比較
結果に従って比較結果ビットを書き換える手段を有す
る、並列型パケットフィルタ実行部である請求項1記載
のパケット処理装置。
7. The packet filter unit extracts, from a plurality of input access control rules, a comparison parameter common to each access control rule, and a comparison parameter and a packet common to the plurality of input access control rules. A parallel execution code is generated by adding a comparison result bit for each CPU to share the result of comparison with the header portion and an unsatisfied bit for holding the access control rule and the comparison result of the packet header portion to each access control rule. , A parallel execution code generation unit, and the packet filter execution unit has a finite number of CPUs, interprets the parallel execution code output by the parallel execution code generation unit, and performs no execution based on the value of the unsatisfied bit. Means for dynamically selecting an access control rule, and comparing the selected access control rule with a packet header portion, 2. The parallel packet filter execution unit according to claim 1, further comprising: means for determining packet transfer or discarding, and means for rewriting the comparison result bit according to a comparison parameter having a comparison result bit and a comparison result of the packet header portion. Packet processing device.
【請求項8】 前記アクセス制御規則を選択的に指し示
すキャッシュポインタを有し、前記並列型パケットフィ
ルタ実行部が、直近の並列実行コードとパケットヘッダ
部分を比較し、パケット条件が一致したアクセス制御規
則へのポインタをキャッシュポインタとして保存する手
段と、未実行のアクセス制御規則を動的に選択する際に
キャッシュポインタが指し示すアクセス制御規則を優先
的に選択する手段を有する請求項7記載のパケット処理
装置。
8. An access control rule having a cache pointer for selectively pointing to the access control rule, wherein the parallel type packet filter execution unit compares a latest parallel execution code with a packet header portion and matches a packet condition. 8. A packet processing apparatus according to claim 7, further comprising: means for storing a pointer to a cache pointer as a cache pointer; and means for preferentially selecting an access control rule indicated by the cache pointer when dynamically selecting an unexecuted access control rule. .
JP22523996A 1996-08-27 1996-08-27 Packet processing device Expired - Fee Related JP3219186B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22523996A JP3219186B2 (en) 1996-08-27 1996-08-27 Packet processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22523996A JP3219186B2 (en) 1996-08-27 1996-08-27 Packet processing device

Publications (2)

Publication Number Publication Date
JPH1070570A true JPH1070570A (en) 1998-03-10
JP3219186B2 JP3219186B2 (en) 2001-10-15

Family

ID=16826184

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22523996A Expired - Fee Related JP3219186B2 (en) 1996-08-27 1996-08-27 Packet processing device

Country Status (1)

Country Link
JP (1) JP3219186B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000209263A (en) * 1999-01-11 2000-07-28 Sanyo Electric Co Ltd Ts data filtering circuit for digital broadcasting receiver
JP2001134225A (en) * 1999-08-26 2001-05-18 Toppan Printing Co Ltd Advertisement provision device and memory medium, exhibition implement, display panel and display case for advertisement provision device
US6301669B2 (en) * 1998-08-17 2001-10-09 International Business Machines Corporation System and method for very fast IP packet filtering

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06350608A (en) * 1993-06-07 1994-12-22 Sumitomo Electric Ind Ltd Repeater for network
JPH0746244A (en) * 1993-07-28 1995-02-14 Nippon Telegr & Teleph Corp <Ntt> Optical atm exchange
JPH0844642A (en) * 1993-12-15 1996-02-16 Checkpoint Software Technol Ltd Control method of computer network and safety system
JPH09135271A (en) * 1995-11-08 1997-05-20 Fujitsu Ltd Repeater

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06350608A (en) * 1993-06-07 1994-12-22 Sumitomo Electric Ind Ltd Repeater for network
JPH0746244A (en) * 1993-07-28 1995-02-14 Nippon Telegr & Teleph Corp <Ntt> Optical atm exchange
JPH0844642A (en) * 1993-12-15 1996-02-16 Checkpoint Software Technol Ltd Control method of computer network and safety system
JPH09135271A (en) * 1995-11-08 1997-05-20 Fujitsu Ltd Repeater

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6301669B2 (en) * 1998-08-17 2001-10-09 International Business Machines Corporation System and method for very fast IP packet filtering
JP2000209263A (en) * 1999-01-11 2000-07-28 Sanyo Electric Co Ltd Ts data filtering circuit for digital broadcasting receiver
JP2001134225A (en) * 1999-08-26 2001-05-18 Toppan Printing Co Ltd Advertisement provision device and memory medium, exhibition implement, display panel and display case for advertisement provision device

Also Published As

Publication number Publication date
JP3219186B2 (en) 2001-10-15

Similar Documents

Publication Publication Date Title
US8819217B2 (en) Intelligent graph walking
US7949683B2 (en) Method and apparatus for traversing a compressed deterministic finite automata (DFA) graph
CN104426909B (en) For pattern to be compiled into the method and computer system of non-determined finite automata (NFA) figure
US8176300B2 (en) Method and apparatus for content based searching
US6553002B1 (en) Apparatus and method for routing data packets through a communications network
US7246102B2 (en) Method of improving the lookup performance of three-type knowledge base searches
US7813350B2 (en) System and method to process data packets in a network using stateful decision trees
US20040100956A1 (en) Packet search device, packet processing search method used for the same, and program for the same
US20150066991A1 (en) Traversal With Arc Configuration Information
US20090138494A1 (en) Deterministic finite automata (DFA) graph compression
US8751655B2 (en) Collective acceleration unit tree structure
US20030110208A1 (en) Processing data across packet boundaries
US8555374B2 (en) High performance packet processing using a general purpose processor
CN112558948A (en) Method and device for identifying message under mass flow
US5881241A (en) System for transmitting data packet after matching data packet&#39;s routing pattern with predetermined data routes stored in a route table
US20050010690A1 (en) System and method for modifying data transferred from a source to a destination
CN114327833A (en) Efficient flow processing method based on software-defined complex rule
JP3219186B2 (en) Packet processing device
KR20190028597A (en) Matching method of high speed snort rule and yara rule based on fpga
KR100864889B1 (en) Device and method for tcp stateful packet filter
De Sensi et al. Dpi over commodity hardware: implementation of a scalable framework using fastflow
CN104714995A (en) System and method to traverse a non-deterministic finite automata (NFA) graph generated for regular expression patterns with advanced features
JP4726310B2 (en) Information retrieval apparatus, information retrieval multiprocessor and router
Kang et al. Verikube: Automatic and Efficient Verification for Container Network Policies
US20230077594A1 (en) Goto action in network traffic policies

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080810

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080810

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090810

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090810

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100810

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100810

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110810

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120810

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130810

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees