JP6800514B2 - Communication equipment, its control method, and programs - Google Patents
Communication equipment, its control method, and programs Download PDFInfo
- Publication number
- JP6800514B2 JP6800514B2 JP2016238779A JP2016238779A JP6800514B2 JP 6800514 B2 JP6800514 B2 JP 6800514B2 JP 2016238779 A JP2016238779 A JP 2016238779A JP 2016238779 A JP2016238779 A JP 2016238779A JP 6800514 B2 JP6800514 B2 JP 6800514B2
- Authority
- JP
- Japan
- Prior art keywords
- checksum
- communication device
- received packet
- checksum calculation
- correction
- 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.)
- Active
Links
Images
Description
本発明は、データ通信を行うための通信装置、その制御方法、およびプログラムに関する。 The present invention relates to a communication device for performing data communication, a control method thereof, and a program.
データ通信において、データの誤りを検出するための機構を備えた通信方式がある。たとえば、インターネット通信で使われている主要なプロトコルであるTCP/IP(Transmission Control Protocol/Internet Protocol)では、TCPパケットのデータの誤りを検出するため、1の補数を加算することによって求められるチェックサムが使用される。しかし、ソフトウェア演算による処理でチェックサム演算を実施すると、処理負荷が増大し、通信処理性能が低下するという課題がある。 In data communication, there is a communication method provided with a mechanism for detecting a data error. For example, TCP / IP (Transmission Control Protocol / Internet Protocol), which is the main protocol used in Internet communication, is a checksum obtained by adding a complement of 1 in order to detect an error in the data of a TCP packet. Is used. However, if the checksum calculation is performed by processing by software calculation, there is a problem that the processing load increases and the communication processing performance deteriorates.
この課題を解決する方法として、DMA(Direct Memory Access)を用いてデータをコピーしながらチェックサム計算を行う方法が提案されている(特許文献1参照)。この方法によれば、装置の処理負荷を軽減し、かつ、通信処理性能の低下を防止することが可能となる。 As a method for solving this problem, a method of performing checksum calculation while copying data using DMA (Direct Memory Access) has been proposed (see Patent Document 1). According to this method, it is possible to reduce the processing load of the apparatus and prevent deterioration of communication processing performance.
特許文献1に記載の方法では、DMAを用いてメモリ間を転送するデータ単位で、チェックサム演算が行われる。TCP/IP通信の受信処理において、無線モジュールにおける記憶部からネットワークスタックにおける記憶部へのDMA転送時に本方法を用いる場合、ネットワークスタックで解析する前のデータ列がチェックサム演算対象となる。そのため、TCPパケットのチェックサムを算出するには、IPヘッダなどの不要部分のチェックサムを削除するための補正処理が必要となる。しかしながら、当該補正処理の時間は、パケットのヘッダサイズに比例して長くなるため、通信性能が低下するという課題がある。 In the method described in Patent Document 1, a checksum operation is performed in units of data transferred between memories using DMA. When this method is used at the time of DMA transfer from the storage unit in the wireless module to the storage unit in the network stack in the reception processing of TCP / IP communication, the data string before being analyzed by the network stack is the checksum calculation target. Therefore, in order to calculate the checksum of the TCP packet, a correction process for deleting the checksum of an unnecessary part such as the IP header is required. However, since the correction processing time increases in proportion to the header size of the packet, there is a problem that the communication performance deteriorates.
本発明は、上記課題に鑑みてなされたものであり、受信時のチェックサム計算処理の負荷を軽減することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to reduce the load of checksum calculation processing at the time of reception.
上記目的を達成するための一手段として、本発明の通信装置は以下の構成を有する。すなわち、他の通信装置から受信した受信パケットに対してチェックサムを演算する第1のチェックサム演算手段と、前記第1のチェックサム演算手段により演算されたチェックサムに対して前記受信パケットの整合性を確認するために必要な補正を行う補正手段と、前記受信パケットに対して所定のプロトコル処理が施されたパケットに対してチェックサムを演算する第2のチェックサム演算手段と、所定の条件に基づいて、前記補正手段による補正を行うか前記第2のチェックサム演算手段によるチェックサムの演算を行うかを判定する判定手段と、前記判定手段による判定の結果に基づいて、前記補正手段によって補正されたチェックサム又は前記第2のチェックサム演算手段によって演算されたチェックサムを用いて前記受信パケットの整合性を確認する確認手段と、を有する。 As one means for achieving the above object, the communication device of the present invention has the following configuration. That is, matching of the received packet with respect to the first checksum calculation means for calculating the checksum for the received packet received from another communication device and the checksum calculated by the first checksum calculation means. A correction means for performing correction necessary for confirming the property, a second checksum calculation means for calculating a checksum for a packet to which a predetermined protocol process has been applied to the received packet, and a predetermined condition. Based on the determination means for determining whether to perform the correction by the correction means or the checksum calculation by the second checksum calculation means, and the correction means based on the result of the determination by the determination means. It has a checksum for confirming the consistency of the received packet by using the corrected checksum or the checksum calculated by the second checksum calculation means.
本発明によれば、受信時のチェックサム計算処理の負荷を軽減することにより、通信性能を向上させることが可能となる。 According to the present invention, it is possible to improve the communication performance by reducing the load of the checksum calculation process at the time of reception.
以下、添付の図面を参照して、本発明をその実施形態に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。 Hereinafter, the present invention will be described in detail based on the embodiments with reference to the accompanying drawings. The configuration shown in the following embodiments is only an example, and the present invention is not limited to the illustrated configuration.
(第1実施形態)
第1の実施形態として、通信装置が有するメモリの性能および/または使用するプロトコル種別および/または受信したパケットの構成に基づいて、受信パケットの整合性を確認するために使用するチェックサム演算結果を切り替えることが可能な通信装置について説明する。
(First Embodiment)
As a first embodiment, a checksum calculation result used for confirming the integrity of a received packet is obtained based on the performance of the memory of the communication device and / or the protocol type used and / or the configuration of the received packet. A communication device that can be switched will be described.
[装置の構成]
本実施形態における通信装置10のハードウェア構成と機能構成について、図1と図2を参照して説明する。図1は、通信装置10のハードウェア構成例を示すブロック図であり、図2は通信装置10の機能構成例を示すブロック図である。なお、通信装置10の具体例は、デジタルカメラ、デジタルビデオカメラ、携帯電話、スマートフォン、PC(Personal Computer)、ノートPC、サーバ、などである。
[Device configuration]
The hardware configuration and functional configuration of the
まず、通信装置10のハードウェア構成について説明する。図1に示すように、通信装置10は、RAM101、ROM102、CPU103、表示部104、操作部105、タイマ管理部106、第1のチェックサム演算部111を含むデータ転送部110を有する。また、通信装置10は、メディアアクセス制御モジュール(MAC)107と、物理レイヤモジュール(PHY)108も有する。なお、RAMはRandom Access Memory、ROMはRead Only Memory、CPUはCentral Processing Unitを表す。なお、通信装置10がこれらのハードウェア構成要素の全てを有することは必須でない。
First, the hardware configuration of the
RAM101は、プログラムやデータを一時記憶する。なお、図1には、一つのRAM101を図示しているが、通信装置10は、性能の異なる複数のRAM101を有することも可能である。ROM102は、CPU103により実行可能なプログラムやパラメータを格納する。CPU103は、通信装置10全体の動作を制御するプロセッサである。例えば、CPU103は、RAM101をワークメモリとして、ROM102や図示しないHDD(Hard Disc Drive)などの記憶媒体に格納された各種プログラムを実行する。CPU103が実行するプログラムには、ネットワークドライバが含まれる。CPU103がネットワークドライバを実行することにより、後述するパケットの受信処理などを含むプロトコル処理の機能が実現される。
The
表示部104は、各種表示を行う。例えば、表示部104は、ユーザが通信装置10を操作するためのGUI(Graphic User Interface)を表示する。操作部105は、ユーザが通信装置10を操作するための入力インタフェースである。タイマ管理部106は、プログラムの処理などの時間の経過を管理する。MAC107とPHY108は、アンテナ109を介してWi−Fiによる無線LAN(Local Area Network)などのネットワークを介した通信を行う通信部である。CPU103がネットワークドライバを実行することにより、MAC107が制御され、PHY108とアンテナ109を介してデータ(パケット)の送受信が行われる。なお、本実施形態ではWi−Fiによる無線LAN通信機能を用いるが、これに限らず、IP(Internet Protocol)通信が可能であれば、有線LAN通信機能のEthernet(登録商標)など、他の通信方式を利用してもよい。
The
データ転送部110は、DMAC(Direct Memory Access Controller)として構成され、メモリ間のデータ転送を行う。データ転送部110内の第1のチェックサム演算部111は、データ転送時に、転送されるデータのチェックサムを演算する。第1のチェックサム演算部111は、データ転送部110における処理ステップに対してステップ数を増やすことなく、チェックサム演算が可能である。
The
続いて、通信装置10の機能構成について説明する。図2に示すように、通信装置10は、機能制御部201、無線LAN制御部202、表示制御部203、操作制御部204、記憶制御部205を有する。通信装置10はまた、TCP/IP制御部206、第2のチェックサム演算部207、チェックサム補正部208を有する。これらの機能構成要素の各々の処理は、CPU103がROM102に格納されたプログラムをRAM101に展開して実行することより実現され得る。一方、ハードウェアによりこれらの機能構成要素の各々の処理を実現するためには、これらの機能構成要素の処理に対応させた演算部や回路をハードウェアで構成すればよい。なお、通信装置10がこれらの機能構成要素の全てを有することは必須でない。
Subsequently, the functional configuration of the
機能制御部201は、各機能構成要素(無線LAN制御部202〜チェックサム補正部208)を制御する。無線LAN制御部202は、MAC107とPHY108を制御し、他の通信装置と無線LAN通信を行うための制御を行う。通信装置10が外部の無線アクセスポイントを経由して他の通信装置と接続する場合は、無線LAN制御部202は、MAC107とPHY108を制御して無線アクセスポイント(不図示)との無線LAN通信を行う。
The
表示制御部203は、表示部104に各種情報を表示させるための制御を行う。操作制御部204は、操作部105を介して、通信装置10に対するユーザからの操作入力を受け付け、当該入力に応じた制御を行う。記憶制御部205は、RAM101を制御し、処理データや画像コンテンツ、映像コンテンツなどのデータをRAM101に記憶またはRAM101から削除する。
The
TCP/IP制御部206は、他の通信装置との間でTCP(Transmission Control Protocol)/IP(Internet Protocol)方式の通信制御を行う。また、TCP/IP制御部206は、RAM101に格納された受信パケットを解析し、無線ヘッダ、Ethernet(登録商標)ヘッダ(ETHヘッダ)、IPヘッダ、TCPヘッダ、TCPペイロードへ分割する等といった所定のプロトコル処理を行う。なお、本実施形態では、TCP/IP通信を利用する例を示すが、これに限らず、チェックサムを使用する他のプロトコルを利用してもよい。第2のチェックサム演算部207は、TCP/IP制御部206において所定のプロトコル処理が施されたパケットに対してチェックサムの演算を行う。第2のチェックサム演算部207は、TCP/IP制御部206により利用され得る。チェックサム補正部208は、第1のチェックサム演算部111により算出されたチェックサムの値を補正する。チェックサム補正部208は、TCP/IP制御部206により利用され得る。TCP/IP制御部206は、第2のチェックサム演算部207又はチェックサム補正部208において生成されたチェックサムを用いて、受信パケットの整合性を確認する。
The TCP /
[チェックサム演算]
次に、本実施形態におけるTCPにおけるチェックサムの演算手法について図3と図4を参照して説明する。
[Checksum operation]
Next, the checksum calculation method in TCP in the present embodiment will be described with reference to FIGS. 3 and 4.
図3は、第1のチェックサム演算部111とチェックサム補正部208により演算および補正されたチェックサムの演算手順を説明する概要図である。図3の説明のために、通信装置10が外部の無線アクセスポイントを経由して、Ethernet(登録商標)を伝送経路として他の通信装置と通信することを前提とするが、他の通信形態にも本説明は適用可能である。
FIG. 3 is a schematic diagram illustrating a checksum calculation procedure calculated and corrected by the first
無線LAN制御部202が、他の通信装置(不図示)から送信されたパケットをアンテナ109、PHY108、MAC107を介して受信すると、データ転送部110は、MAC107内の記憶部(不図示)からRAM101へ受信パケットを転送する。この転送の際、第1のチェックサム演算部111は、受信パケット全体のチェックサム(CS302)を演算する。データ転送部110は、CS302を受信パケット301に関連付けて、RAM101へ転送する。
When the wireless
TCP/IP制御部206は、RAM101に格納された受信パケット301に対してプロトコル処理を施すことにより解析する。その結果、無線ヘッダ、Ethernet(登録商標)ヘッダ(ETHヘッダ)、IPヘッダ、TCPヘッダ、TCPペイロードに分割した、解析済受信パケット303が生成される。
The TCP /
次に、TCP/IP制御部206は、チェックサム補正部208を使用し、TCPのチェックサムに不要なヘッダ部のチェックサムを、CS302から減算し、TCP仮想ヘッダのチェックサムを加算することにより、TCPのチェックサム305を算出する。ここで、TCPのチェックサムの不要なヘッダ部は、本実施形態では、無線ヘッダ、ETHERNET(登録商標)ヘッダ、IPヘッダである。なお、減算される不要なヘッダ部は、データ転送部110から転送される受信パケットのデータ範囲により変化し得る。また、TCP仮想ヘッダとは、TCPのチェックサムを計算するために必要な周知のヘッダであり、発信元IPアドレスや宛先IPアドレス等から構成されるものである。TCP/IP制御部206は、算出したTCPのチェックサム305を用いて受信パケットの整合性を確認する(誤り検出処理を行う)。
Next, the TCP /
整合性の確認の結果、TCP/IP制御部206は、受信パケットに誤りがないことを確認した場合は、アプリケーション306に受信パケットのデータを渡す。一方、TCP/IP制御部206は、受信パケットに誤りがあることを確認した場合は、受信パケットを破棄する。
As a result of checking the consistency, when the TCP /
図4は、第2のチェックサム演算部207により演算されたチェックサムの演算手順を説明する概要図である。図4の説明のために、図3と同様に、通信装置10が外部の無線アクセスポイントを経由して、Ethernet(登録商標)を伝送経路として他の通信装置と通信することを前提とするが、他の通信形態にも本説明は適用可能である。
FIG. 4 is a schematic diagram illustrating a checksum calculation procedure calculated by the second
無線LAN制御部202は、他の通信装置(不図示)から送信されたパケットをアンテナ109、PHY108、MAC107を介して受信すると、データ転送部110は、MAC107内の記憶部(不図示)からRAM101へ受信パケットを転送する。TCP/IP制御部206は、RAM101に格納された受信パケットを解析し、無線ヘッダ、Ethernet(登録商標)ヘッダ(ETHヘッダ)、IPヘッダ、TCPヘッダ、TCPペイロードに分割した、解析済受信パケット303を生成する。
When the wireless
TCP/IP制御部206は、第2のチェックサム演算部207を使用し、TCPのチェックサムとして、解析済受信パケット303におけるTCPヘッダ、TCPペイロード、およびTCP仮想ヘッダのチェックサムを算出する。続いて、TCP/IP制御部206は、算出したTCPのチェックサムを用いて受信パケットの整合性を確認する。
The TCP /
TCP/IP制御部206は、TCPのチェックサムから受信パケットに誤りがないことを確認した場合はアプリケーション306に受信データを渡し、TCPのチェックサムから受信パケットに誤りがあることを確認した場合は受信パケットを破棄する。
When the TCP /
次に、図5を参照して通信装置10の動作について説明する。図5は、RAM101の性能に基づいて、図3と図4を参照して説明した2種類のチェックサムの演算結果の使用を切り替えるパケット受信手順を示すフローチャートである。なお、図5の説明において、図3または図4で示した処理と同じ処理は、図3または図4における符号を用いるものとする
Next, the operation of the
S501において、無線LAN制御部202が、アンテナ109、PHY108、MAC107を介してパケット受信すると、データ転送部110は、MAC107内の記憶部(不図示)からRAM101へ受信パケットを転送する。データ転送部110による受信パケット301の転送時に、第1のチェックサム演算部111は受信パケット301全体のチェックサム(CS302)を演算する。データ転送部110は、CS302を受信パケット301に関連付けてT、RAM101へ転送する。
In S501, when the wireless
S502において、TCP/IP制御部206は、RAM101に格納された受信パケット301を解析し、無線ヘッダ、Ethernet(登録商標)ヘッダ(ETHヘッダ)、IPヘッダ、TCPヘッダ、TCPペイロードに分割した解析済受信パケット303を作成する。
In S502, the TCP /
S503において、TCP/IP制御部206は、RAM101の性能を取得する。RAMの性能とは、例えば、動作クロックの速さ(処理速度)等の処理能力(および処理能力を表す値)を指す。RAM101の性能が高い場合、第1のチェックサム演算部111と第2のチェックサム演算部207の演算結果を使い分けた際の通信性能の差が小さくなる。したがって、RAM101の性能が所定のレベル未満の場合(S503;YES)は、処理はS504に進み、RAM101の性能が当該所定のレベル以上の場合(S503;NO)は、処理はS506に進む。この所定のレベル(所定の閾値)には、第1のチェックサム演算部111により算出されたチェックサムを用いて通信した際に所望の通信性能を維持できる任意のメモリ性能等を示す値が設定され得る。
In S503, the TCP /
S504において、TCP/IP制御部206は、ネットワーク層のプロトコル種別がIPv4かIPv6のいずれであるかを判定する。IPv4では、IPヘッダにチェックサムフィールドがあり、IPヘッダ分のチェックサムが格納されている。そのため、受信パケットに誤りがない場合、IPv4通信時に第1のチェックサム演算部111が算出するチェックサム302には、IPヘッダ分のチェックサムが相殺されるため含まれない。つまり、IPv4の場合は、チェックサム補正部208によるIPヘッダ分のチェックサムの減算処理は不要となる。しがたって、IPヘッダにチェックサムフィールドがないIPv6を使用している場合(S504;IPv6)は、処理はS505に進み、IPヘッダにチェックサムフィールドがあるIPv4を使用している場合(S504;IPv4)は、処理はS506に進む。なお、S504ではIPv4とIPv6かが判定されたが、これに限定されない。
In S504, the TCP /
S505において、TCP/IP制御部206は、受信パケットの構成を確認して、処理を分岐する。まず、TCP/IP制御部206は、解析済受信パケット303からヘッダ部の長さとIPペイロード部の長さを取得する。なお、ヘッダ部とは、チェックサム補正部208による減算処理が必要な受信パケット内のヘッダ部分を指し、本実施形態では無線ヘッダとEthernet(登録商標)ヘッダとIPヘッダである。ヘッダ部は、前述の通り、データ転送部110が転送する受信パケットのデータ範囲により変化し得る。ヘッダ長が解析済受信パケット303において所定の割合を占める場合、例えば、ヘッダ長がIPペイロード長未満の場合(S505;YES)は、処理はS506に進む。また、ヘッダ長が解析済受信パケット303において所定の割合を占めない場合、例えば、ヘッダ長がIPペイロード長以上の場合(S505;NO)は、処理はS507に進む。
In S505, the TCP /
また、S505において、TCP/IP制御部206は、受信パケットのパケット種別を判別してもよい。例えば、受信パケットが確認応答(ACK)パケットのようにペイロードがない、または、ペイロード長が閾値未満のパケット種別の場合(S505;YES)は、処理はS506に進み、データパケットのようにペイロード長が閾値以上のパケット種別の場合(S505;NO)は、処理はS507に進むようにしてもよい。この閾値には、第1のチェックサム演算部111と第2のチェックサム演算部207の演算結果を使い分けることで通信性能が変化する任意のペイロード長が設定され得る。なお、パケット種別としてペイロードの長さを示したが、これに限らず、パケットのフラグやオプション情報などに基づいてパケット種別を判別してもよい。
Further, in S505, the TCP /
S506において、TCP/IP制御部206は、チェックサム補正部208を使用し、チェックサム302から無線ヘッダ、ETHERNET(登録商標)ヘッダ、IPヘッダ分のチェックサムを減算し、TCP仮想ヘッダのチェックサムを加算することにより、TCPのチェックサム305を算出する。当該チェックサムの算出手法は、図3を用いて説明した通りである。なお、前述の通り、減算するヘッダ部はデータ転送部110が転送する受信パケットのデータ範囲により変化し得る。なお、上述した通り、受信パケットがIPv4のパケットである場合は、チェックサム補正部208によるIPヘッダ分のチェックサムの減算処理は不要となる。しがたって、S506の処理において、S504でIPv4と判定された上で実行される場合には、IPヘッダ分のチェックサムの減算以外の補正処理が行われることになる。
In S506, the TCP /
S507において、TCP/IP制御部206は、第2のチェックサム演算部207を使用し、TCPのチェックサム(TCPヘッダ、TCPペイロード、TCP仮想ヘッダのチェックサム)を再計算する。当該チェックサムの算出手法は、図4を用いて説明した通りである。
In S507, the TCP /
S508において、TCP/IP制御部206は、S506またはS507で導出されたTCPのチェックサムを用いて、受信パケットの整合性を確認することにより、誤り検出処理を行う。
In S508, the TCP /
なお、図5に示すフローチャートでは、S503、S504、およびS505すべての判定が行われるが、これらの判定のいずれか1つ以上が行われても良い。例えば、S503が省略される場合、S502の後、処理はS504へ進む。また、S504が省略される場合、S503でYesと判定された場合に処理はS505へ進む。また、S505が省略される場合、S504でIPv6と判定された場合に処理はS507へ進む。また、S504とS505が省略される場合、S503でYesと判定された場合に処理はS507へ進む。また、S503とS504が省略される場合、S502の後、処理はS505へ進む。また、S503とS505が省略される場合、S502の後、処理はS504へ進み、S504でIPv6と判定された場合に処理はS507へ進む。 In the flowchart shown in FIG. 5, all the determinations of S503, S504, and S505 are performed, but any one or more of these determinations may be performed. For example, if S503 is omitted, the process proceeds to S504 after S502. If S504 is omitted, the process proceeds to S505 when it is determined to be Yes in S503. If S505 is omitted, the process proceeds to S507 when IPv6 is determined in S504. If S504 and S505 are omitted, and if Yes is determined in S503, the process proceeds to S507. If S503 and S504 are omitted, the process proceeds to S505 after S502. If S503 and S505 are omitted, the process proceeds to S504 after S502, and if it is determined to be IPv6 in S504, the process proceeds to S507.
また、S503とS504の判定は、S501とS502の処理と関係なく実施可能なため、S501の前にS503またはS504の判定を行ってもよい。例えばこの場合、S504でIPv6と判定され、かつ/または、S505でNoと判定された場合は、S501、S502の処理を実施せずに、S507の処理が実施されても良い。これにより、より処理効率が向上し得る。 Further, since the determination of S503 and S504 can be performed regardless of the processing of S501 and S502, the determination of S503 or S504 may be performed before S501. For example, in this case, if IPv6 is determined in S504 and / or No is determined in S505, the process of S507 may be performed without performing the processes of S501 and S502. As a result, the processing efficiency can be further improved.
以上、説明したように、本実施形態による通信装置10は、メモリの性能および/または使用するプロトコル種別および/または受信したパケットの構成といった条件に基づいて、受信パケットの整合性を確認するために使用するチェックサム演算結果を切り替える。すなわち、S506のように処理負荷が高い補正処理を必要とするチェックサム演算結果を使用するか、当該補正処理を必要としないチェックサム演算結果を使用するかが切り替えられる。このように、必要に応じて受信パケットのチェックサム計算処理で負荷が軽い手段を用いる否か選択でき、結果として受信の効率が向上し、通信性能が向上する。
As described above, the
(第2実施形態)
第2実施形態では、通信装置10が有するCPU103の性能に基づいて、受信パケットの整合性を確認するために使用するチェックサム演算結果を切り替える。なお、第2実施形態において、第1実施形態と同様の図、および図中と同じ要素に関しては説明を省略する。
(Second Embodiment)
In the second embodiment, the checksum calculation result used for confirming the consistency of the received packet is switched based on the performance of the
図6は、CPU103の性能に基づいて、図3と図4を参照して説明した2種類のチェックサムの演算結果の使用を切り替えるパケット受信手順を示すフローチャートである。なお、図6の説明において、図3または図4で示した処理と同じ処理は、図3または図4における符号を用いるものとする。また、S601〜S602およびS604〜S608の処理は、図5のS501〜S502及びS504〜S508の処理と同様のため、説明を省略する。
FIG. 6 is a flowchart showing a packet receiving procedure for switching the use of the calculation results of the two types of checksums described with reference to FIGS. 3 and 4 based on the performance of the
S603において、TCP/IP制御部206は、CPU103の性能を取得する。CPUの性能とは、例えば、処理速度等の処理能力(および処理能力を表す値)を指す。CPU103の性能が高い場合、第1のチェックサム演算部111と第2のチェックサム演算部207を使い分けた際の通信性能の差が小さくなる。したがって、CPU103の性能が所定のレベル未満の場合(S603;YES)はS604に進み、CPU103の性能が当該所定のレベル以上の場合(S603;NO)は、処理はS606に進む。この所定のレベル(所定の閾値)には、第1のチェックサム演算部111により算出されたチェックサムを用いて通信した際に所望の通信性能を維持できる任意のCPU性能等を示す値が設定され得る。
In S603, the TCP /
なお、図6に示すフローチャートでは、S603、S604、およびS605すべての判定が行われるが、S603の判定以外の判定は行われても良い。例えば、S604が省略される場合、S603でYesと判定された場合に処理はS605へ進む。また、S605が省略される場合、S604でIPv4以外の例えばIPv6と判定された場合に処理はS607へ進む。また、S604とS605が省略される場合、S603でYesと判定された場合に処理はS607へ進む。 In the flowchart shown in FIG. 6, all the determinations of S603, S604, and S605 are performed, but determinations other than the determination of S603 may be performed. For example, when S604 is omitted, if Yes is determined in S603, the process proceeds to S605. If S605 is omitted, the process proceeds to S607 when it is determined in S604 that it is, for example, IPv6 other than IPv4. If S604 and S605 are omitted, and if Yes is determined in S603, the process proceeds to S607.
以上、説明したように、本実施形態による通信装置10は、CPU103の性能といった条件に基づいて、受信パケットの整合性を確認するために使用するチェックサム演算結果を切り替える。すなわち、S606のように処理負荷が高い補正処理を必要とするチェックサム演算結果を使用するか、当該補正処理を必要としないチェックサム演算結果を使用するかが切り替えられる。このように、必要に応じて受信パケットのチェックサム計算処理で負荷が軽い手段を用いる否か選択でき、結果として受信の効率が向上し、通信性能が向上する。
As described above, the
(その他の実施形態)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other embodiments)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
10 通信装置、101 RAM、102 ROM、103 CPU、104 表示部、105 操作部、106 タイマ管理部、107 MAC、108 PHY、109 アンテナ、110 データ転送部、111 第1のチェックサム演算部、201 機能制御部、202 無線LAN制御部、203 表示制御部、204 操作制御部、205 記憶制御部、206 TCP/IP制御部、207 第2のチェックサム演算部、208 チェックサム補正部 10 Communication device, 101 RAM, 102 ROM, 103 CPU, 104 display unit, 105 operation unit, 106 timer management unit, 107 MAC, 108 PHY, 109 antenna, 110 data transfer unit, 111 first checksum calculation unit, 201 Function control unit, 202 wireless LAN control unit, 203 display control unit, 204 operation control unit, 205 storage control unit, 206 TCP / IP control unit, 207 second checksum calculation unit, 208 checksum correction unit
Claims (9)
他の通信装置から受信した受信パケットに対してチェックサムを演算する第1のチェックサム演算手段と、
前記第1のチェックサム演算手段により演算されたチェックサムに対して前記受信パケットの整合性を確認するために必要な補正を行う補正手段と、
前記受信パケットに対して所定のプロトコル処理が施されたパケットに対してチェックサムを演算する第2のチェックサム演算手段と、
所定の条件に基づいて、前記補正手段による補正を行うか前記第2のチェックサム演算手段によるチェックサムの演算を行うかを判定する判定手段と、
前記判定手段による判定の結果に基づいて、前記補正手段によって補正されたチェックサム又は前記第2のチェックサム演算手段によって演算されたチェックサムを用いて前記受信パケットの整合性を確認する確認手段と、
を有することを特徴とする通信装置。 It ’s a communication device,
A first checksum calculation means that calculates a checksum for received packets received from other communication devices,
A correction means for making a correction necessary for confirming the consistency of the received packet with respect to the checksum calculated by the first checksum calculation means.
A second checksum calculation means for calculating a checksum for a packet to which a predetermined protocol process has been applied to the received packet, and
A determination means for determining whether to perform correction by the correction means or a checksum calculation by the second checksum calculation means based on a predetermined condition, and
Based on the result of the determination by the determination means, the checksum corrected by the correction means or the checksum calculated by the second checksum calculation means is used as a confirmation means for confirming the consistency of the received packet. ,
A communication device characterized by having.
所定の条件に基づいて、他の通信装置から受信した受信パケットに対して演算されたチェックサムに対して前記受信パケットの整合性を確認するために必要な補正を行うか、前記受信パケットに対して所定のプロトコル処理が施されたパケットに対してチェックサムを演算するかを判定する判定工程と
前記判定工程における判定の結果に基づいて、
前記補正により得られたチェックサム又は前記所定のプロトコル処理が施されたパケットに対して演算されたチェックサムを用いて前記受信パケットの整合性を確認する確認工程と、
を有することを特徴とする通信装置の制御方法。 It is a control method for communication devices.
Based on a predetermined condition, the checksum calculated for the received packet received from another communication device is corrected as necessary for confirming the consistency of the received packet, or the received packet is corrected. Based on the determination step of determining whether to calculate the checksum for the packet subjected to the predetermined protocol processing and the determination result in the determination step.
A confirmation step of confirming the consistency of the received packet by using the checksum obtained by the correction or the checksum calculated for the packet subjected to the predetermined protocol processing .
A method for controlling a communication device, which comprises.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016238779A JP6800514B2 (en) | 2016-12-08 | 2016-12-08 | Communication equipment, its control method, and programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016238779A JP6800514B2 (en) | 2016-12-08 | 2016-12-08 | Communication equipment, its control method, and programs |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018097429A JP2018097429A (en) | 2018-06-21 |
JP6800514B2 true JP6800514B2 (en) | 2020-12-16 |
Family
ID=62633500
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016238779A Active JP6800514B2 (en) | 2016-12-08 | 2016-12-08 | Communication equipment, its control method, and programs |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6800514B2 (en) |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5522039A (en) * | 1993-09-09 | 1996-05-28 | Hewlett-Packard Company | Calculation of network data check sums by dedicated hardware with software corrections |
US6289023B1 (en) * | 1997-09-25 | 2001-09-11 | Hewlett-Packard Company | Hardware checksum assist for network protocol stacks |
WO2011033562A1 (en) * | 2009-09-16 | 2011-03-24 | 株式会社 東芝 | Communication device |
JP2011228938A (en) * | 2010-04-20 | 2011-11-10 | Fuji Xerox Co Ltd | Communication device, image forming device, and program |
JP5729938B2 (en) * | 2010-08-04 | 2015-06-03 | キヤノン株式会社 | COMMUNICATION DEVICE AND ITS CONTROL METHOD |
JP6381270B2 (en) * | 2014-04-22 | 2018-08-29 | キヤノン株式会社 | Information processing apparatus, information processing method, and system |
JP6433146B2 (en) * | 2014-04-22 | 2018-12-05 | キヤノン株式会社 | Information processing apparatus, system, information processing method, computer program |
-
2016
- 2016-12-08 JP JP2016238779A patent/JP6800514B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018097429A (en) | 2018-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102610823B1 (en) | Communication system and method for network address translation | |
US10129722B2 (en) | Service processing method and network device | |
JP5175773B2 (en) | Communication apparatus, method and program | |
US10701041B2 (en) | Calculation device, calculation method, communication apparatus, and storage medium | |
US10530701B2 (en) | RUDP apparatus and dynamic adjustment method of sliding window parameter | |
US11336297B2 (en) | DMA transfer apparatus, method of controlling the same, communication apparatus, method of controlling the same, and non-transitory computer-readable storage medium | |
US20140297791A1 (en) | Communication apparatus, method of controlling the same, and storage medium | |
US10284481B2 (en) | Communication device, communication method, and storage medium | |
WO2019224860A1 (en) | Communication device, communication method, and communication program | |
JP6800514B2 (en) | Communication equipment, its control method, and programs | |
KR20200017127A (en) | Apparatus and method for processing data packets | |
US9762511B2 (en) | Communication device | |
JP6234236B2 (en) | Communication device | |
JP6640065B2 (en) | Communication device, communication control device, communication method, communication control method, and program | |
JP2017157963A (en) | Communication device, communication method and program | |
US20230062831A1 (en) | Communication apparatus and control method thereof, and storage medium | |
WO2019056206A1 (en) | Multi-node support for sctp communications | |
JP2011249922A (en) | Network device, tcp packet receiver and method | |
JP6279970B2 (en) | Processor, communication apparatus, communication system, communication method, and computer program | |
JP2019114947A (en) | Communication device, control method of communication device, and program | |
JP7286513B2 (en) | COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, AND PROGRAM | |
JP2019016842A (en) | Communication device and control method | |
JP2010041498A (en) | Packet creating apparatus, and packet creating method | |
JP6976786B2 (en) | Communication device and control method of communication device | |
WO2017022365A1 (en) | Data communication apparatus, data communication method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191127 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200811 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200914 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201013 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20201023 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201120 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6800514 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |