JP4161981B2 - Communication device and program - Google Patents
Communication device and program Download PDFInfo
- Publication number
- JP4161981B2 JP4161981B2 JP2005159972A JP2005159972A JP4161981B2 JP 4161981 B2 JP4161981 B2 JP 4161981B2 JP 2005159972 A JP2005159972 A JP 2005159972A JP 2005159972 A JP2005159972 A JP 2005159972A JP 4161981 B2 JP4161981 B2 JP 4161981B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- received
- address
- reception
- network
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
- H04L61/5014—Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5046—Resolving address allocation conflicts; Testing of addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5053—Lease time; Renewal aspects
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
- Computer And Data Communications (AREA)
- Stored Programmes (AREA)
Description
本発明は、ネットワーク内の装置からアドレスの設定に必要なデータを取得して、アドレスを自装置に自動設定する通信装置、及び、これに用いられるプログラムに関する。 The present invention relates to a communication device that acquires data necessary for setting an address from a device in a network and automatically sets the address to the device itself, and a program used therefor.
従来、通信装置としては、ネットワーク内のDHCP(Dynamic Host Configuration Protocol)サーバに対して、IP(インターネットプロトコル)アドレスの発行(リース)を要求し、この際の通信により、DHCPサーバから発行(リース)されたIPアドレスを自装置に設定し、自装置を、TCP/IPネットワークに参加できるようにするものが知られている。 Conventionally, as a communication apparatus, an IP (Internet Protocol) address issuance (lease) is requested from a DHCP (Dynamic Host Configuration Protocol) server in the network, and is issued (lease) from the DHCP server by communication at this time. It is known to set a set IP address in its own device so that it can participate in a TCP / IP network.
また、ネットワークと他のネットワークをつなぐ役目を持つルータから自装置に設定すべきIPアドレスの一部(例えばネットワークアドレス)を取得すると共に、自装置に固有なアドレスを生成し、これと、上記取得したIPアドレスの一部とを合わせることで生成したIPアドレスを自装置に設定し、自装置を、TCP/IPネットワークに参加できるようにするものも知られている。 In addition, a part of the IP address (for example, a network address) to be set to the own device is acquired from a router having a role of connecting the network to another network, and an address unique to the own device is generated, and the above acquisition is performed. It is also known that an IP address generated by combining a part of the IP address is set in the own device so that the own device can participate in the TCP / IP network.
その他、通信装置としては、アクセスを許可するIPアドレスや、アクセスを禁止するIPアドレスなどを記した制限表を有し、この制限表を基づいて、外部装置からのアクセスを制限する機能を有した通信装置が知られている。この通信装置では、外部からの不正なアクセスを禁止することができるので、便利である。
しかしながら、上述の通信装置では、制限表に誤ったIPアドレスが登録された場合にも、制限表に従ってアクセスを制限してしまうため、本来アクセスを制限すべきでないDHCPサーバからのアクセスについても、それを制限してしまう場合があった。 However, in the communication apparatus described above, even when an incorrect IP address is registered in the restriction table, access is restricted according to the restriction table. Therefore, access from a DHCP server that should not restrict access should be restricted. There was a case that would limit.
制限表に対する誤った設定操作を行うことが原因で、DHCPサーバから上記通信装置へのアクセスが不能となると、通信装置は、自装置のIPアドレスを設定・更新することができなくなって、結果的に、TCP/IPネットワークに参加できなくなる。 If access to the communication device from the DHCP server becomes impossible due to an incorrect setting operation on the restriction table, the communication device cannot set / update its own IP address, and as a result In addition, it becomes impossible to participate in the TCP / IP network.
勿論、このような問題は、管理者が制限表に誤ったIPアドレスを登録しなければ発生しないが、許可又は禁止するIPアドレスを、管理者に範囲指定させる装置では、禁止するIPアドレスの範囲内にDHCPサーバやルータなど、自装置のIPアドレスを設定するためにアクセスする必要がある装置のIPアドレスが入っているのにもかかわらず、管理者がそれに気づかないことがあった。また、アクセスを許可するIPアドレスを登録する際には、DHCPサーバ等以外の装置についてのIPアドレスの登録操作に気をとられ、管理者が、DHCPサーバ等のIPアドレスについての登録操作を忘れてしまうことがあった。 Of course, such a problem does not occur unless the administrator registers an incorrect IP address in the restriction table. However, in a device that allows the administrator to specify a range of permitted or prohibited IP addresses, the range of prohibited IP addresses. Even though the IP address of a device that needs to be accessed in order to set the IP address of its own device, such as a DHCP server or a router, is contained in the administrator, the administrator may not be aware of it. Also, when registering an IP address that permits access, attention is paid to the IP address registration operation for devices other than the DHCP server, and the administrator forgets the registration operation for the IP address of the DHCP server or the like. There was a case.
本発明は、こうした問題に鑑みなされたものであり、管理者の通信装置に対する設定ミスによって、通信装置によるアドレスの自動設定ができなくなるのを防止することを目的とする。 The present invention has been made in view of these problems, and an object of the present invention is to prevent an address from being automatically set by a communication device due to a setting error of an administrator by the communication device.
かかる目的を達成するためになされた請求項1記載の通信装置は、ネットワークインタフェースと、ネットワークインタフェースを介してネットワーク内の装置と通信し、ネットワークインタフェースを介して受信したデータに基づく処理を実行する処理実行手段と、ネットワークインタフェースが受信したデータを受け付けるか否かを、当該受信データの送信元装置に割り当てられたネットワーク上のアドレスに基づいて判断する受付判断手段と、受付判断手段により受信データを受け付けないと判断された場合には、当該受信データを破棄し、受付判断手段により受信データを受け付けると判断された場合には、当該受信データに基づく処理を、処理実行手段に実行させる第一実行制御手段と、受付判断手段により受信データを受け付けないと判断された場合には、当該受信データが、ネットワーク内の特定種の装置から送信されたネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであるか否かを判断するデータ判断手段と、受付判断手段により受け付けないと判断された受信データが、データ判断手段によりネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであると判断された場合には、第一実行制御手段による当該受信データの破棄を禁止し、受信データに基づいて当該通信装置にアドレスを設定する処理を、処理実行手段に実行させる第二実行制御手段と、を備える通信装置である。 The communication device according to claim 1, which has been made to achieve the above object, communicates with a network interface and a device in the network via the network interface, and executes processing based on data received via the network interface. The receiving means accepts the received data by the execution means, the acceptance judging means for judging whether or not the data received by the network interface is accepted based on the address on the network assigned to the transmission source device of the received data. If it is determined that the received data is discarded, the first execution control causes the processing execution unit to execute processing based on the received data if the reception determining unit determines to receive the received data. Received data is accepted by the means and acceptance judging means Data determination for determining whether or not the received data is data necessary to set an address on the network transmitted from a specific type of device in the network to the communication device. If the received data determined not to be accepted by the means and the acceptance judging means is data necessary for setting the address on the network to the communication device by the data judging means, the first execution And a second execution control unit that prohibits discarding of the received data by the control unit and causes the process execution unit to execute a process of setting an address in the communication device based on the received data .
本発明では、このように、受信データがアドレスを設定するのに必要なデータである場合、受信データの破棄を禁止し、当該通信装置にアドレスを設定する処理を、処理実行手段に実行させるようにした。In the present invention, when the received data is data necessary for setting the address as described above, the discarding of the received data is prohibited, and the process executing unit performs the process of setting the address in the communication device. I made it.
従って、本発明によれば、利用者が、DHCPサーバのようなネットワーク内の特定種の装置からのアクセスを禁止する設定を行った場合にも、この装置からのアクセスを、第一実行制御手段によって妨害せずに済む。よって、この発明によれば、管理者の通信装置に対する設定ミスにより、通信装置によるアドレスの自動設定ができなくなるのを防止することができる。 Therefore, according to the present invention, even when the user makes a setting for prohibiting access from a specific type of device in the network such as a DHCP server , the first execution control means To avoid interference. Therefore, according to the present invention, it is possible to prevent an address from being automatically set by the communication device due to a setting error of the administrator by the communication device.
尚、管理者のミスによってアドレスの自動設定ができなくなるのを防止するには、アドレスが自装置に設定されるまで、従来型のフィルタリング機能をオンしないように通信装置を構成することも考えられる。しかしながら、DHCPサーバ等によって発行されるIPアドレスには有効期限が設定されるのが一般的である。従って、アドレスが自装置に設定されるまで、フィルタリング機能をオンしないように通信装置を構成しても、発行されたIPアドレスに有効期限が設定されている場合には、管理者のミスがあると、フィルタリング機能がオンにされてからの二度目以降のアドレス設定を行うことができない。 In order to prevent the automatic setting of an address due to an administrator's mistake, it is possible to configure the communication device so that the conventional filtering function is not turned on until the address is set in the own device. . However, an expiration date is generally set for an IP address issued by a DHCP server or the like. Therefore, even if the communication device is configured so that the filtering function is not turned on until the address is set in the own device, if the expiration date is set in the issued IP address, there is an error of the administrator. Then, the second and subsequent address settings after the filtering function is turned on cannot be performed.
これに対し、本発明によれば、アドレスを設定するのに必要なデータについては、常に、このデータを受け付けると判断するので、アドレスの有効期限が経過する前に、特定種の装置と通信して、アドレスを自装置に設定する処理を繰返し実行する通信装置においても、管理者の通信装置に対する設定ミスによって、通信装置によるアドレスの自動設定ができなくなるのを防止することができる。 On the other hand, according to the present invention, since it is determined that the data necessary for setting the address is always accepted, it communicates with a specific type of device before the expiration date of the address elapses. Thus, even in the communication device that repeatedly executes the process of setting the address in the own device, it is possible to prevent the address from being automatically set by the communication device due to a setting error of the administrator by the communication device.
即ち、本発明を、自装置に設定したアドレスの有効期限が経過する前に、特定種の装置と通信して、アドレスを自装置に設定する処理を、繰返し実行する処理実行手段を備える通信装置に適用すれば、上述の効果が一層発揮される(請求項2)。 That is, the communication apparatus includes a process execution unit that repeatedly executes the process of communicating with a specific type of apparatus and setting the address in the own apparatus before the expiration date of the address set in the apparatus has elapsed. If applied to the above, the above-mentioned effect is further exhibited (claim 2).
ところで、本発明の通信装置は、第一実行制御手段が、ネットワークインタフェースと処理実行手段との間に介在して、受付判断手段が受け付けると判断したデータを、処理実行手段に提供し、受付判断手段が受け付けないと判断したデータを、処理実行手段に提供せずに破棄する構成とすることができる。その他、本発明の通信装置は、処理実行手段が能動的にネットワークインタフェースから受信データを取得し、第一実行制御手段が、処理実行手段による受信データの取得に先駆けて、受付判断手段が受け付けないと判断したデータをネットワークインタフェース(バッファ)から破棄する構成とすることができる。 By the way, in the communication apparatus of the present invention, the first execution control unit provides the processing execution unit with data determined to be received by the reception determination unit, which is interposed between the network interface and the processing execution unit. The data determined not to be accepted by the means can be discarded without being provided to the process execution means. In addition, in the communication apparatus of the present invention, the process execution unit actively acquires received data from the network interface, and the first execution control unit does not receive the reception determination unit prior to the reception of received data by the process execution unit. The data determined to be discarded can be discarded from the network interface (buffer).
また、以上では、特定種の装置として、DHCPサーバを例に挙げたが、IPv6(Internet Protocol Version 6)に基づくネットワークを想定した場合には、特定種の装置として、IPアドレスのプリフィックスを保持するルータ等を挙げることができる。 In the above description, the DHCP server is taken as an example of the specific type of device. However, when a network based on IPv6 (Internet Protocol Version 6) is assumed, the IP address prefix is held as the specific type of device. A router etc. can be mentioned.
また、特定種の装置としてDHCPサーバを想定した場合、通信装置は、処理実行手段が、上述したアドレスを自装置に設定する処理の一ステップとして、ネットワークインタフェースを介し、当該通信装置に対するアドレスの発行を、特定種の装置に要求し、上記要求に対する応答データを、ネットワークインタフェースが受信すると、受付判断手段が、このデータを、アドレスを自装置に設定するのに必要なデータとして、受け付けると判断する構成にすることができる。 Further, when a DHCP server is assumed as a specific type of device, the communication device issues an address to the communication device via the network interface as one step of processing in which the process execution unit sets the above-described address in the own device. the requests to a particular species of the device, the response data to the request, the network interface receives, acceptance judging means, the data, as the data required for setting the address to the own device, determines that the accepted Can be configured.
DHCPサーバを用いてアドレスの自動設定を行う場合等、通信装置から自発的に動作して、特定種の装置から、アドレスの設定に必要なデータを受信する場合には、自装置からの要求に対する応答データを、アドレスの設定に必要なデータとして取り扱えば、受信データがアドレスの設定に必要なデータであるか否かの判断を簡単に行うことができ、受付判断手段における判断を高速に行うことができる。 When the address is automatically set using a DHCP server, etc., when the data necessary for address setting is received from a specific type of device by operating spontaneously from the communication device, If the response data is handled as data necessary for address setting, it is possible to easily determine whether the received data is data necessary for address setting, and to make a high-speed determination in the reception determination means. Can do.
その他、特定種の装置との通信(アドレスの発行の要求、及び、応答データの受信)を、専用のポートを通じて行うようにすれば、専用ポートにて受信したデータを、アドレスの設定に必要なデータとして取り扱えばよいので、便利である。 In addition, if communication with a specific type of device (request for address issuance and reception of response data) is performed through a dedicated port, the data received at the dedicated port is necessary for address setting. This is convenient because it can be handled as data.
請求項3記載の通信装置は、受信データが、特定種の装置とのデータ通信に用いられる所定のポートを宛先として送信されてきたデータである場合に、当該受信データが、上記ネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであると、データ判断手段が判断する構成にされたものである。 According to a third aspect of the present invention, when the received data is data transmitted with a predetermined port used for data communication with a specific type of device as a destination, the received data is an address on the network. The data determining means determines that the data is necessary for setting the data in the communication device .
この通信装置によれば、専用ポートにて受信したデータを、アドレスの設定に必要なデータと判断するので、データ判断手段における判断を高速に行うことができる。 According to this communication apparatus, data received at the dedicated port is determined as data necessary for address setting, so that the determination by the data determination means can be performed at high speed.
また、上述した受付判断手段は、請求項5,6記載のように構成することができる。請求項5記載の通信装置の受付判断手段は、ネットワークインタフェースが受信したデータが、予め設定された拒否対象のアドレスが割り当てられた装置から送信されてきたデータである場合、このデータを受け付けないと判断し、ネットワークインタフェースが受信したデータが、上記拒否対象のアドレスが割り当てられた装置から送信されてきたデータではない場合、このデータを受け付けると判断する。 Further, the above-described reception determination means can be configured as described in
受付判断手段がこのように構成された通信装置では、管理者が誤ってDHCPサーバのアドレスを拒否対象のアドレスに設定した場合でも、DHCPサーバを用いたアドレスの自動設定が妨害されることがない。従って、この発明によれば、管理者のミスによって、アドレスの自動設定ができなくなるのを防止するができる。 In the communication apparatus in which the reception determination unit is configured as described above, even if the administrator mistakenly sets the address of the DHCP server as the address to be rejected , the automatic setting of the address using the DHCP server is not hindered. . Therefore, according to the present invention, it is possible to prevent an address from being automatically set due to an administrator's mistake.
また、請求項6記載の通信装置における受付判断手段は、ネットワークインタフェースが受信したデータが、予め設定された受付対象のアドレスが割り当てられた装置から送信されてきたデータである場合には、このデータを受け付けると判断し、ネットワークインタフェースが受信したデータが、上記受付対象のアドレスが割り当てられた装置から送信されてきたデータではない場合には、このデータを受け付けないと判断する。 Furthermore, acceptance judging unit in the communication apparatus according to claim 6, wherein, if the data network interface has received a data transmitted from a device assigned a preset address of the reception subject has, the data If the data received by the network interface is not data transmitted from the device to which the address to be accepted is assigned, it is determined that this data is not accepted .
受付判断手段がこのように構成された通信装置では、管理者が誤ってDHCPサーバのアドレスを受付対象のアドレスに設定し忘れた場合でも、DHCPサーバを用いたアドレスの自動設定が妨害されることがない。従って、この発明によれば、管理者のミスによって、アドレスの自動設定ができなくなるのを防止するができる。 In a communication apparatus in which the reception determination unit is configured in this way, even if an administrator mistakenly forgets to set the address of the DHCP server as the reception target address, automatic setting of the address using the DHCP server is hindered. There is no. Therefore, according to the present invention, it is possible to prevent an address from being automatically set due to an administrator's mistake.
また、上述した通信装置における第一実行制御手段は、請求項7記載のように、当該通信装置の起動後、当該通信装置にアドレスが初めて設定されるまでの期間には、受付判断手段による判断結果に依らず、ネットワークインタフェースが受信したデータを受け付けて、ネットワークインタフェースが受信したデータに基づく処理を、処理実行手段に実行させる構成にされるとよい。自装置にアドレスが設定されるまではフィルタリング機能をオンにしないようにすれば、管理者がミスをした場合でも、初回のアドレス設定を妨害せずに済む。また、このように、フィルタリング機能をオンすれば、初回のアドレス設定前から、フィルタリング機能をオンするよりも、初回のアドレス設定にかかる処理負荷を抑えることができる。 The first execution control means definitive the above-described communication apparatus, as claimed in claim 7, wherein, after the activation of the communication device, the period until the address in the communication device is first set, by acceptance judging means Regardless of the determination result, the network interface may be configured to accept data received by the network interface and cause the processing execution unit to execute processing based on the data received by the network interface. If the filtering function is not turned on until the address is set in the own device, even if the administrator makes a mistake, the initial address setting can be prevented. In addition, if the filtering function is turned on in this way, the processing load for the first address setting can be suppressed rather than turning on the filtering function before the first address setting.
また、上述した通信装置における各手段としての機能は、プログラムによりコンピュータに実現させることができる。
請求項8記載のプログラムは、ネットワークインタフェースを備える通信装置のコンピュータに、ネットワークインタフェースを介してネットワーク内の装置と通信し、ネットワークインタフェースを介して受信したデータに基づく処理を実行する処理実行手段と、ネットワークインタフェースが受信したデータを受け付けるか否かを、当該受信データの送信元装置に割り当てられたネットワーク上のアドレスに基づいて判断する受付判断手段と、受付判断手段により受信データを受け付けないと判断された場合には、当該受信データを破棄し、受付判断手段により受信データを受け付けると判断された場合には、当該受信データに基づく処理を、処理実行手段に実行させる第一実行制御手段と、受付判断手段により受信データを受け付けないと判断された場合には、当該受信データが、ネットワーク内の特定種の装置から送信されたネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであるか否かを判断するデータ判断手段と、受付判断手段により受け付けないと判断された受信データが、データ判断手段によりネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであると判断された場合には、第一実行制御手段による当該受信データの破棄を禁止し、受信データに基づいて当該通信装置にアドレスを設定する処理を、処理実行手段に実行させる第二実行制御手段としての機能を実現させるためのプログラムである。このプログラムによれば、請求項1記載の通信装置を構成することができる。
Moreover, the function as each means in the communication apparatus mentioned above can be realized in a computer by a program.
A program according to claim 8 is a processing execution means for communicating with a computer in a network via a network interface and executing processing based on data received via the network interface to a computer of a communication device having a network interface. Based on the address on the network assigned to the transmission source device of the received data, whether or not the network interface accepts the received data is determined, and the reception determining means determines that the received data is not accepted. The first execution control means for causing the process execution means to execute processing based on the received data when the reception determining means determines that the received data is to be discarded. Do not accept the received data by the judging means Data determination for determining whether or not the received data is data necessary to set an address on the network transmitted from a specific type of device in the network to the communication device. If the received data determined not to be accepted by the means and the acceptance judging means is data necessary for setting the address on the network to the communication device by the data judging means, the first execution This is a program for realizing a function as a second execution control unit for prohibiting the discarding of the received data by the control unit and causing the process execution unit to execute a process of setting an address in the communication device based on the received data. . According to this program, the communication apparatus according to claim 1 can be configured.
以下、本発明の実施例について、図面と共に説明する。
図1は、本発明が適用されたプリンタ装置10を備える通信システム1の構成を表す説明図である。本実施例の通信システム1は、広域ネットワークに接続されたゲートウェイ装置3と、DHCPサーバ5と、プリンタ装置10と、PC(パーソナルコンピュータ)30と、からなる。プリンタ装置10及びPC30並びにDHCPサーバ5は、夫々、TCP/IP通信可能な構成にされており、この通信システム1には、プリンタ装置10及びPC30並びにDHCPサーバ5から構成される一つのLAN(ローカルエリアネットワーク)が構築されている。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is an explanatory diagram illustrating a configuration of a communication system 1 including a
プリンタ装置10は、各種プログラムを実行して装置内各部を統括制御するCPU11と、CPU11により実行される各種プログラムを記憶するROM13と、CPU11によるプログラム実行時に作業領域として使用されるRAM15と、各種設定データを記憶するデータ書換可能な不揮発性メモリとしてのNVRAM17と、CPU11に制御されて、紙媒体に画像を形成(印刷)する印刷部21と、表示部(液晶モニタ)及び利用者が操作可能な操作部(キー群)を備える表示操作部23と、TCP/IP方式にて通信制御を行う通信制御部25と、LANに接続されたネットワークインタフェース(所謂LANインタフェース)27と、を備える。
The
尚、図1では、通信制御部25とCPU11とを分けて示すが、通信制御部25は、専用装置(例えば、専用のマイクロコンピュータ)で構成されてもよいし、CPU11にTCP/IP通信を実現するためのソフトウェア群(プロトコルスタック)を実行させて実現されてもよい。本実施例では、通信制御部25での処理が、プログラムにより実現されるものとする。
In FIG. 1, the
また、本実施例では、プリンタ装置10が、LAN内の他の装置と通信して、所定の機能を実現するタスクを、CPU11で実行する構成にされており、通信制御部25が、これらタスクとLAN内の他の装置との間でやりとりされるデータを中継する。図2は、プリンタ装置10の通信制御部25の動作(受信動作)を示す説明図である。
In this embodiment, the
通信制御部25は、上記タスクが生成した送信データに対して所定の処理を施すことにより、この送信データをIPパケットに変換し、これを送信データとしてネットワークインタフェース27に出力する。一方、ネットワークインタフェース27は、通信制御部25が生成した送信データを、LANに送出するための電気的な信号に変換して、これをLANに出力すると共に、LANから受信した電気的な信号に基づいて、受信信号を、通信制御部25が受付可能なディジタルデータに変換する。そして、これを内蔵のバッファに蓄積する。
The
通信制御部25は、この受信データを、ネットワークインタフェース27のバッファから取り出して、受信データが示すポート番号等の情報に基づき、受け渡し先のタスクを決定し、この受信データを対応するタスクに提供する。
The
例えば、受信データに示されたポート番号が、ネットワーク印刷用のポート番号である場合、通信制御部25は、受信データを印刷ジョブ登録処理タスクに提供する。尚、印刷ジョブ登録処理タスクは、通信制御部25及びネットワークインタフェース27を介してPC30と通信し、PC30から印刷指令データを受信すると、この印刷指令データに格納されたプリントデータについての印刷ジョブをキューに登録するものである。キューに登録された印刷ジョブは、印刷制御処理タスクによって処理される。具体的に、印刷制御処理タスクは、キューに登録された印刷ジョブを古い順に実行し、印刷部21に、対応するプリントデータに基づく画像を印刷出力させる。
For example, when the port number indicated in the received data is a port number for network printing, the
その他、通信制御部25は、受信データに示されたポート番号が設定変更用のポート番号である場合、受信データを、設定変更処理タスクに提供する。設定変更処理タスクは、通信制御部25及びネットワークインタフェース27を介してPC30と通信し、利用者のPC30に対する入力操作によりPC30にて生成された設定指令データをPC30から受信すると、この設定指令データに基づいて、NVRAM17に記憶されたフィルタリング設定データを更新し、当該プリンタ装置10のフィルタリング機能にかかる設定変更を行うものである。
In addition, when the port number indicated in the received data is a port number for setting change, the
尚、本実施例の通信制御部25は、フィルタリング機能を有し、NVRAM17が記憶するフィルタリング設定データに基づいて動作して、フィルタリング機能がオンに設定されている期間には、所定のIPアドレスが送信元アドレスとして付された受信データを破棄し、対応するタスクに受信データを提供する動作を行わないようにする構成にされている。周知のように、IP通信では、IPパケットに送信元のIPアドレスの情報が付加されるので、通信制御部25は、この送信元アドレスの情報に基づき、所定のIPアドレスが送信元アドレスとして付された受信データを破棄するのである。
The
図3は、プリンタ装置10のNVRAM17が記憶するフィルタリング設定データの構成を表す説明図である。フィルタリング設定データは、フィルタリング機能の動作内容を決定付けるデータであり、機能オンオフ設定データと、モード設定データと、対象範囲設定データと、を備える。
FIG. 3 is an explanatory diagram showing the configuration of the filtering setting data stored in the
機能オンオフ設定データは、フィルタリング機能のオンオフを切り替えるためのデータであり、「有効」及び「無効」のいずれかの値を示すデータである。この機能オンオフ設定データが「有効」との値を示している場合、通信制御部25は、フィルタリング機能をオンにし、「無効」との値を示している場合、フィルタリング機能をオフにする。
The function on / off setting data is data for switching on / off of the filtering function, and is data indicating a value of either “valid” or “invalid”. When the function on / off setting data indicates a value of “valid”, the
また、モード設定データは、「許可モード」及び「禁止モード」のいずれかの値を示すデータである。詳しくは後述するが、本実施例における通信制御部25は、モード設定データが「許可モード」との値を示している場合、対象範囲設定データが示す範囲内のIPアドレスが割り当てられた装置からのデータの受付を許可して、このデータを対応するタスクに提供し、それ以外の装置からのデータの受付を禁止して、このデータを破棄する動作を行う。
Further, the mode setting data is data indicating a value of either “permission mode” or “prohibition mode”. As will be described in detail later, when the mode setting data indicates a value of “permitted mode”, the
また、モード設定データが「禁止モード」との値を示している場合、通信制御部25は、対象範囲設定データが示す範囲内のIPアドレスが割り当てられた装置からのデータの受付を禁止して、このデータを破棄する動作を行い、それ以外の装置からのデータの受付を許可して、このデータを対応するタスクに提供する動作を行う。
Further, when the mode setting data indicates a value of “prohibited mode”, the
その他、対象範囲設定データは、フィルタリングの対象となるIPアドレスの範囲(アドレス範囲)を示すデータである。アドレス範囲は、IPアドレスの情報と、有効なアドレス値を示すマスク情報と、により記述される。例えば、IPアドレスの情報が「10.134.0.0」であり、マスク情報が「255.255.0.0」である場合には、上位16ビットが値「10.134」であるIPアドレスがフィルタリングの対象となる。 In addition, the target range setting data is data indicating an IP address range (address range) to be filtered. The address range is described by IP address information and mask information indicating valid address values. For example, when the IP address information is “10.134.0.0” and the mask information is “255.255.0.0”, the upper 16 bits have the value “10.134”. Address is subject to filtering.
即ち、PC30から送信されてくる設定指令データには、この機能オンオフ設定データと、モード設定データと、対象範囲設定データとが含まれ、設定変更処理タスクは、この設定指令データを、通信制御部25を介して受信すると、これらのデータと一致する値に、フィルタリング設定データの各値を更新し、設定指令データに従う設定変更を行うのである。尚、図4は、この設定変更処理タスクの動作内容を示した説明図である。
That is, the setting command data transmitted from the
その他、通信制御部25は、受信データに示されたポート番号がDHCP用のポート番号を示している場合、受信データを、DHCPクライアント処理タスクに提供する。尚、DHCPクライアント処理タスクは、DHCPサーバ5と通信して、DHCPサーバ5から発行(リース)されたIPアドレスを、自装置の通信制御部25に設定するものである。本実施例のプリンタ装置10は、このDHCPクライアント処理タスクの動作によって、IPアドレスの自動設定を実現し、自装置を、TCP/IPネットワークに参加できるようにする。即ち、自装置を、LAN内の装置とユニキャストによるTCP/IP通信ができるようにする。
In addition, when the port number indicated in the received data indicates the DHCP port number, the
次に、プリンタ装置10の動作について、フローチャートを用いて詳しく説明する。図5は、プリンタ装置10のCPU11が起動直後(当該プリンタ装置10の電源投入直後)に、ブートプログラムに従って実行するブート処理を表すフローチャートである。
Next, the operation of the
ブート処理を実行すると、CPU11は、まず初期化処理を実行して、装置内各部を初期化し(S110)、この初期化処理を終えると、ステータスフラグをリセットして、これをオフに設定する(S120)。尚、ステータスフラグの値(オン/オフ)は、RAM15に記憶される。詳しくは後述するが、このステータスフラグは、通信制御部25のフィルタリング機能を、オン/オフするのに用いられる(図8参照)。
When the boot process is executed, the
S120での処理を終えると、CPU11は、S125にて、通信制御部25を起動すると共に、S130にて、DHCPクライアント処理タスクを起動する。また、DHCPクライアント処理タスクの起動後には、DHCPクライアント処理タスクの動作により、当該装置に対してIPアドレスが設定されたか否かを判断し(S140)、IPアドレスが設定されていない場合には(S140でNo)、所定の待機終了条件が満足された否かを判断する(S150)。尚、S150では、所定時間が経過すると、待機終了条件が満足されたと判断するようにブートプログラムを構成にしてもよいし、IPアドレスの取得にかかる処理の実行回数(例えば、後述するパラメータRetryCountの値)が予め定められた回数を超えると、待機終了条件が満足されたと判断するようにブートプログラムを構成してもよい。
When the process in S120 is completed, the
ここで、待機終了条件が満足されていないと判断すると(S150でNo)、CPU11は、IPアドレスが設定されるか、待機終了条件が満足されるまで待機する。そして、IPアドレスが設定されるか(S140でYes)、待機終了条件が満足されると(S150でYes)、S160に移行して、RAM15に記憶されたステータスフラグをオンに設定する。
If it is determined that the standby end condition is not satisfied (No in S150), the
また、S160での処理を終えると、CPU11は、予め定められた各種アプリケーションプログラムを立ち上げて、上述した印刷ジョブ登録処理タスクや、設定変更処理タスク等を起動する。その後、当該ブート処理を終了する。
When the process in S160 is completed, the
次に、S130で起動されるDHCPクライアント処理タスクについて説明する。図6は、DHCPクライアント処理タスク(CPU11)によって実現されるDHCPクライアント処理を表すフローチャートである。このDHCPクライアント処理タスクは、ROM13に記憶されたプログラムに従って、DHCPクライアント処理を実行する。 Next, the DHCP client processing task activated in S130 will be described. FIG. 6 is a flowchart showing DHCP client processing realized by the DHCP client processing task (CPU 11). This DHCP client processing task executes DHCP client processing according to a program stored in the ROM 13.
DHCPクライアント処理タスクは、起動されるとまず、リース時間更新フラグをリセットして、これをオフに設定する。尚、このリース時間更新フラグの値は、RAM15にて記憶される(S410)。S410での処理を終えると、DHCPクライアント処理タスクは、通信制御部25に対し、許可ポート番号の設定を行って、上述したDHCP用のポートを開き(S420)、その後、アドレス取得処理を実行し、DHCP DISCOVERメッセージ及びDHCP REQUESTメッセージを、通信制御部25及びネットワークインタフェース27を介してLANに送出する。これによって、当該プリンタ装置10に対するIPアドレスの発行(リース)を、DHCPサーバ5に要求する(S430)。尚、図7は、アドレス取得処理を表すフローチャートである。
When activated, the DHCP client processing task first resets the lease time update flag and sets it off. The value of the lease time update flag is stored in the RAM 15 (S410). When the processing in S410 is completed, the DHCP client processing task sets the permitted port number for the
アドレス取得処理を開始すると、DHCPクライアント処理タスクは、パラメータRetryCountをゼロに設定し、このパラメータRetryCountの値を、RAM15に記憶させる(S510)。また、S510での処理を終えると、S520に移行し、リース時間設定フラグをリセットして、これをオフに設定する。このリース時間設定フラグの値は、RAM15に記憶される。
When the address acquisition process is started, the DHCP client processing task sets the parameter RetryCount to zero, and stores the value of the parameter RetryCount in the RAM 15 (S510). When the process in S510 is completed, the process proceeds to S520, where the lease time setting flag is reset and set to OFF. The value of the lease time setting flag is stored in the
S520での処理を終えると、DHCPクライアント処理タスクは、リース時間更新フラグがオンに設定されているか否かを判断し(S530)、リース時間更新フラグがオンに設定されていないと判断すると(S530でNo)、IPアドレスのリースを要求するためのDHCP DISCOVERメッセージを、ブロートキャストの形態で、通信制御部25及びネットワークインタフェース27を介してLAN内に送出する(S540)。この動作によって、DHCPクライアント処理タスクは、利用可能なDHCPサーバを検索する。
When the processing in S520 ends, the DHCP client processing task determines whether or not the lease time update flag is set on (S530), and determines that the lease time update flag is not set on (S530). No), a DHCP DISCOVER message for requesting the lease of the IP address is sent in the LAN via the
尚、このアドレス取得処理においては、DHCPサーバ5と専用のポート(DHCP用のポート)を用いて通信する。即ち、上述したDHCP DISCOVERメッセージ及び後述のDHCP REQUESTメッセージは、送信元のポート番号として、DHCP用のポート番号が付された状態で、LANに送出される。その他、S540での処理実行時には、自装置のIPアドレスが設定されていないので、このDHCP DISCOVERメッセージには、値「0.0.0.0」の送信元アドレスの情報が付加される(IPv4の場合)。
In this address acquisition process, communication is performed with the
また、DHCPサーバ5は、このDHCP DISCOVERを受信すると、応答メッセージとして、クライアントに対してリース可能なIPアドレスの情報を含むメッセージであり、送信元アドレスの情報として、自身のIPアドレスの情報を付加したDHCP OFFERメッセージを、ブロードキャストの形態で、LANに送出する(但し、応答メッセージの送出時には、応答メッセージを送信する原因となったメッセージの送信元情報に従って、送信元のポート番号を宛先としてメッセージを送出する。後述するDHCP ACKについても同様。)。
When the DHCP DISCOVER receives this DHCP DISCOVER, the
DHCPクライアント処理タスクは、DHCP DISCOVERメッセージの送信後、このDHCP OFFERメッセージを、ネットワークインタフェース27及び通信制
御部25を介して受信できたか否か判断し(S550)、所定時間の間に、DHCP OFFERメッセージを受信すると、DHCP OFFERメッセージを受信できたと判断し(S550でYes)、S560に移行する。一方、所定時間を経過しても、DHCP OFFERメッセージを受信できなかった場合には、その時点で、DHCP OFFERメッセージを受信できなかったと判断して(S550でNo)、S573に移行する。
After transmitting the DHCP DISCOVER message, the DHCP client processing task determines whether or not the DHCP OFFER message has been received via the
S550でYesと判断してS560に移行すると、DHCPクライアント処理タスクは、DHCP OFFERメッセージの受信により判明した利用可能なDHCPサーバ5の内の一つを選択し、選択したDHCPサーバ5のIPアドレスの情報を含むメッセージであって、選択したDHCPサーバ5に対する正式なIPアドレスのリース要求であるDHCP REQUESTメッセージを、通信制御部25及びネットワークインタフェース27を介してLAN内に送出する。
When it is determined Yes in S550 and the process proceeds to S560, the DHCP client processing task selects one of the
尚、DHCPサーバ5は、自身に対してIPアドレスのリースを要求する旨のDHCP REQUESTメッセージを受信すると、DHCP REQUESTメッセージを送信してきたクライアントに対し、応答メッセージとして、リースするIPアドレス及びリース時間の情報を含んだメッセージであり、送信元アドレスの情報として、自身のIPアドレスの情報を含んだDHCP ACKメッセージを、LANに送出する。
When the
従って、DHCPクライアント処理タスクは、DHCP REQUESTメッセージの送信後、DHCP ACKメッセージを、ネットワークインタフェース27及び通信制御部25を介して受信できたか否か判断する(S570)。そして、所定時間の間に、要求したIPアドレスについてのDHCP ACKメッセージを受信すると、DHCP ACKメッセージを受信できたと判断して(S570でYes)、S580に移行する。また、所定時間を経過しても、DHCP ACKメッセージを受信することができなかった場合には、その時点で、DHCP ACKメッセージを受信できなかったと判断して(S570でNo)、S573に移行する。
Accordingly, the DHCP client processing task determines whether or not the DHCP ACK message has been received via the
S573に移行すると、DHCPクライアント処理タスクは、パラメータRetryCountの値を1加算し、その後、パラメータRetryCountの値が、規定値を超えているか否かを判断する(S577)。そして、パラメータRetryCountの値が、規定値を超えていると判断すると(S577でYes)、当該アドレス取得処理を終了し、規定値を超えていないと判断すると(S577でNo)、S540に移行して、再度、DHCPサーバへのアクセスを試みる。 When the process proceeds to S573, the DHCP client processing task adds 1 to the value of the parameter RetryCount, and then determines whether or not the value of the parameter RetryCount exceeds the specified value (S577). If it is determined that the value of the parameter RetryCount exceeds the specified value (Yes in S577), the address acquisition process is terminated. If it is determined that the value does not exceed the specified value (No in S577), the process proceeds to S540. Then, try to access the DHCP server again.
一方、S580に移行すると、DHCPクライアント処理タスクは、受信したDHCP ACKメッセージに含まれる当該装置に対してリースされたIPアドレスの情報及びリース時間の情報に基づき、通信制御部25に対して、自装置のIPアドレスを設定する。また、S580での処理を終えると、DHCPクライアント処理タスクは、リース時間設定フラグをオンに設定する(S590)。その後、当該アドレス取得処理を終了する。
On the other hand, when the process proceeds to S580, the DHCP client processing task automatically instructs the
その他、DHCPクライアント処理タスクは、リース時間更新フラグがオンに設定されていると判断すると(S530でYes)、S600に移行し、通信制御部25に対して設定されたIPアドレスについてのリース時間が経過しているか否かを判断し、リース時間が経過していると判断すると(S600でYes)、リース時間更新フラグをリセットして、これをオフに設定する(S610)。その後、S540に移行する。
In addition, when the DHCP client processing task determines that the lease time update flag is set to ON (Yes in S530), the DHCP client processing task proceeds to S600 and the lease time for the IP address set for the
一方、リース時間が経過していないと判断すると(S600でNo)、DHCPクライアント処理タスクは、パラメータRetryCountの値を、ゼロに設定する(S620)。その後、DHCPクライアント処理タスクは、前回のS560で選択したDHCPサーバ5と同一のDHCPサーバ5に対して、DHCP REQUESTメッセージを、通信制御部25及びネットワークインタフェース27を介してLAN内に送出する(S630)。
On the other hand, if it is determined that the lease time has not elapsed (No in S600), the DHCP client processing task sets the value of the parameter RetryCount to zero (S620). Thereafter, the DHCP client processing task sends a DHCP REQUEST message into the LAN via the
また、この処理を終えると、DHCPクライアント処理タスクは、DHCP ACKメッセージを、ネットワークインタフェース27及び通信制御部25を介して受信できたか否か判断し(S640)、所定時間の間に、要求したIPアドレスについてのDHCP ACKメッセージを受信すると、DHCP ACKメッセージを受信できたと判断して(S640でYes)、S650に移行する。また、所定時間を経過しても、DHCP ACKメッセージを受信することができなかった場合には、その時点で、DHCP ACKメッセージを受信できなかったと判断して(S640でNo)、S643に移行する。
When this processing is completed, the DHCP client processing task determines whether or not the DHCP ACK message has been received via the
また、S643に移行すると、DHCPクライアント処理タスクは、パラメータRetryCountの値を1加算し、その後、パラメータRetryCountの値が、規定値を超えているか否かを判断する(S647)。そして、パラメータRetryCountの値が、規定値を超えていると判断すると(S647でYes)、当該アドレス取得処理を終了し、規定値を超えていないと判断すると(S647でNo)、S630に移行する。そして、DHCPサーバへのアクセスを再度試みる。 In S643, the DHCP client processing task adds 1 to the value of the parameter RetryCount, and then determines whether or not the value of the parameter RetryCount exceeds the specified value (S647). If it is determined that the value of the parameter RetryCount exceeds the specified value (Yes in S647), the address acquisition process is terminated. If it is determined that the value does not exceed the specified value (No in S647), the process proceeds to S630. . It then tries again to access the DHCP server.
一方、S650に移行すると、DHCPクライアント処理タスクは、受信したDHCP ACKメッセージに含まれる当該装置に対してリースされたIPアドレスの情報及びリース時間の情報に基づき、通信制御部25に対して、自装置のIPアドレスを設定する。また、S650での処理を終えると、リース時間設定フラグをオンに設定する(S660)。その後、当該アドレス取得処理を終了する。
On the other hand, when the process proceeds to S650, the DHCP client processing task automatically instructs the
また、S430において、上述したアドレス取得処理を終了すると、DHCPクライアント処理タスクは、通信制御部25に対して許可ポート番号の解除を行い、上述したDHCP用のポートを閉じる(S440)。また、S440での処理を終えると、DHCPクライアント処理タスクは、リース時間設定フラグがオンであるか否かを判断し(S450)、リース時間設定フラグがオンであると判断すると(S450でYes)、S460に移行する。
In S430, when the address acquisition process described above is completed, the DHCP client processing task cancels the permitted port number for the
また、S460に移行すると、DHCPクライアント処理タスクは、パラメータSleepTimeの値を、S580又はS650で設定したリース時間×0.5に設定する。
SleepTime=リース時間×0.5
この設定後、DHCPクライアント処理タスクは、リース時間更新フラグをオンに設定すると共に(S470)、図示しない計時カウンタを起動する(S490)。そして、この計時カウンタのカウント値に基づき、計時カウンタの起動後、パラメータSleepTimeに示された値分の時間が経過するまで待機する(S495)。また、パラメータSleepTimeに示された値分の時間が経過すると(S495でYes)、DHCPクライアント処理タスクは、S420に移行し、上述したS420以降の処理を実行する。
In S460, the DHCP client processing task sets the value of the parameter SleepTime to the lease time set in S580 or S650 × 0.5.
SleepTime = lease time x 0.5
After this setting, the DHCP client processing task sets the lease time update flag to ON (S470) and starts a time counter (not shown) (S490). Based on the count value of the time counter, after the time counter is activated, the system waits until a time corresponding to the value indicated by the parameter SleepTime elapses (S495). When the time corresponding to the value indicated by the parameter SleepTime has elapsed (Yes in S495), the DHCP client processing task proceeds to S420 and executes the above-described processing after S420.
尚、S460で、SleepTimeを、リース時間の半分の時間に設定したのは、自装置に設定したIPアドレスの有効期限(リース時間)が経過する前に、余裕をもって、DHCPサーバ5からIPアドレスを再取得するためである。IPアドレスのリース時間が切れることにより、当該プリンタ装置10は、TCP/IPネットワークに参加できなくなるので、当該DHCPクライアント処理タスクでは、設定したIPアドレスの有効期限が経過する前に、DHCPサーバ5と通信して、IPアドレスを自装置に設定する処理(S420〜S495の処理)を、繰返し実行する。
In S460, SleepTime is set to a half of the lease time because the IP address from the
その他、DHCPクライアント処理タスクは、リース時間設定フラグがオフであると判断すると(S450でNo)、パラメータSleepTimeを、規定時間T1に設定する(例えば、T1=3分に設定する)。その後、S490に移行して、上述した処理を実行する。 In addition, when the DHCP client processing task determines that the lease time setting flag is off (No in S450), the parameter SleepTime is set to the specified time T1 (for example, T1 = 3 minutes). Thereafter, the process proceeds to S490, and the above-described processing is executed.
また、このDHCPクライアント処理タスクより先に起動される通信制御部25は、起動されると、図8に示す受信制御処理を実行する。図8は、通信制御部25が繰返し実行する受信制御処理を表すフローチャートである。尚、上述したフィルタリング機能は、この受信制御処理にて実現される。
Further, when activated, the
受信制御処理を実行すると、通信制御部25は、ネットワークインタフェース27が、LAN内の装置からデータ(IPパケット)を受信するまで待機し(S810)、ネットワークインタフェース27がデータを受信すると(S810でYes)、NVRAM17が記憶するフィルタリング設定データに基づき、フィルタリング機能がオンにされているか否かを判断する(S820)。具体的には、フィルタリング設定データを構成する機能オンオフ設定データが「有効」との値を示している場合には、フィルタリング機能がオンにされていると判断し、機能オンオフ設定データが「無効」との値を示している場合には、フィルタリング機能がオンにされていない(オフにされている)と判断する。
When the reception control process is executed, the
ここで、フィルタリング機能がオンにされていないと判断すると(S820でNo)、通信制御部25は、S870に移行し、ネットワークインタフェース27が受信したデータを受け付ける。即ち、受信データが示すポート番号に対応するタスクに、受信データを提供する。その後、当該受信制御処理を終了する。
If it is determined that the filtering function is not turned on (No in S820), the
但し、S870にて、ネットワークインタフェース27が受信したデータを対応するタスクに提供するのは、受信データが示すポート番号が、許可ポート番号に設定されている場合のみである(即ち、対応するポートが開いている場合のみである)。受信データが示すポート番号が、許可ポート番号に設定されていない場合、通信制御部25は、S870に移行しても、この受信データを破棄する動作を行う。
However, in S870, the data received by the
一方、フィルタリング機能がオンにされていると判断すると(S820でYes)、通信制御部25は、S830に移行し、ステータスフラグがオンに設定されているか否かを判断する。そして、ステータスフラグがオンに設定されていないと判断すると(S830でNo)、S870に移行し、ネットワークインタフェース27が受信したデータを、対応するタスクに提供する。その後、当該受信制御処理を終了する。
On the other hand, if it is determined that the filtering function is turned on (Yes in S820), the
一方、ステータスフラグがオンに設定されていると判断すると(S830でYes)、通信制御部25は、S840に移行し、モード設定データが「許可モード」との値を示しているか否かを判断する。そして、モード設定データが「許可モード」との値を示している場合には、S850に移行する。
On the other hand, if it is determined that the status flag is set to ON (Yes in S830), the
S850に移行すると、通信制御部25は、NVRAM17が記憶する対象範囲設定データが示すアドレス範囲と、受信データが示す送信元アドレスとを照合し、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであるか否かを判断する(S860)。この判断により、通信制御部25は、送信元装置が、対象範囲設定データにアドレス範囲の情報によって登録された受付対象装置であるか否かを判断する。
After shifting to S850, the
そして、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであると判断すると(S860でYes)、通信制御部25は、S870に移行し、ネットワークインタフェース27が受信したデータを、対応するタスクに提供する。その後、当該受信制御処理を終了する。
If it is determined that the transmission source address indicated by the received data is included in the address range indicated by the target range setting data (Yes in S860), the
一方、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものではないと判断すると(S860でNo)、通信制御部25は、S900に移行し、受信データが示すポート番号が、DHCP用のポート番号であるか否かを判断する。そして、受信データが示すポート番号が、DHCP用のポート番号であると判断すると(S900でYes)、S870に移行し、ネットワークインタフェース27が受信したデータを、対応するタスク(DHCPクライアント処理タスク)に提供する。
On the other hand, when determining that the transmission source address indicated by the received data is not included in the address range indicated by the target range setting data (No in S860), the
即ち、本実施例では、ネットワークインタフェース27がDHCP用(専用)のポートを宛先としたデータを受信した場合、S900でYesと判断することにより、対象範囲設定データの内容に従えば、受け付けるべきではないデータであっても、このデータを受け付けると判断して、S870に移行し、ネットワークインタフェース27が受信したデータを、対応するタスク(DHCPクライアント処理タスク)に提供する。その後、当該受信制御処理を終了する。
That is, in this embodiment, when the
これに対し、S900にて、受信データが示すポート番号が、DHCP用のポート番号ではないと判断すると、通信制御部25は、S910に移行し、ネットワークインタフェース27が受信したデータを受け付けずに(即ち、対応するタスクにデータを提供せずに)、その受信データを破棄する(データ消去する)。
On the other hand, if it is determined in S900 that the port number indicated by the received data is not a DHCP port number, the
即ち、本実施例では、ネットワークインタフェース27が受信したデータが、DHCP用(専用)のポートを宛先としたデータではない場合、対象範囲設定データの内容に従って、このデータを受け付けないと判断し(S900でNo)、受信データを破棄する(S910)。その後、当該受信制御処理を終了する。
That is, in this embodiment, when the data received by the
その他、通信制御部25は、S840にて、モード設定データが「許可モード」との値を示していないと判断すると(換言すれば、モード設定データが「禁止モード」との値を示していると判断すると)、S880に移行する。
In addition, if the
S880に移行すると、通信制御部25は、NVRAM17が記憶する対象範囲設定データが示すアドレス範囲と、受信データが示す送信元アドレスとを照合し、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであるか否かを判断する(S890)。
After shifting to S880, the
そして、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものではないと判断すると(S890でNo)、通信制御部25は、S870に移行し、ネットワークインタフェース27が受信したデータを、対応するタスクに提供する。その後、当該受信制御処理を終了する。
If it is determined that the transmission source address indicated by the received data is not included in the address range indicated by the target range setting data (No in S890), the
一方、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであると判断すると(S890でYes)、通信制御部25は、S900に移行し、受信データが示すポート番号が、DHCP用のポート番号であるか否かを判断する。そして、受信データが示すポート番号が、DHCP用のポート番号であると判断すると(S900でYes)、S870に移行し、ネットワークインタフェース27が受信したデータを、対応するタスク(DHCPクライアント処理タスク)に提供する。その後、当該受信制御処理を終了する。
On the other hand, when determining that the transmission source address indicated by the received data is included in the address range indicated by the target range setting data (Yes in S890), the
これに対し、S900にて、受信データが示すポート番号が、DHCP用のポート番号ではないと判断すると、通信制御部25は、S910に移行し、ネットワークインタフェース27が受信したデータを受け付けずに(即ち、対応するタスクにデータを提供せずに)、その受信データを破棄する(データ消去する)。その後、当該受信制御処理を終了する。このようにして、フィルタリング機能は、受信制御処理にて実現される。
On the other hand, if it is determined in S900 that the port number indicated by the received data is not a DHCP port number, the
以上、本実施例の通信システム1について説明したが、本実施例では、ステータスフラグをオン/オフすることにより、当該プリンタ装置10の起動後において、IPアドレスがプリンタ装置10に設定されるまでは、通信制御部25のフィルタリング機能が働かないようにした。従って、本実施例によれば、管理者がPC30等を通じてプリンタ装置10に対し誤った設定を施すことにより、DHCPサーバ5が対象範囲設定データに従えば、拒否対象装置(受付対象装置外)となってしまう場合でも、プリンタ装置10とDHCPサーバ5との通信を妨害せずに済む。
The communication system 1 according to the present embodiment has been described above. In the present embodiment, until the IP address is set in the
従って、本実施例によれば、管理者のプリンタ装置10に対する設定ミスによって、プリンタ装置10がアドレスの自動設定を行うことができなくなるのを防止することができる。よって、本実施例によれば、管理者がプリンタ装置10に対して誤ったフィルタリング機能にかかる設定を行うことにより、プリンタ装置10が、TCP/IPネットワークに参加できなくなるのを防止することができる。
Therefore, according to the present embodiment, it is possible to prevent the
また、本実施例では、DHCP用のポートを宛先とする受信データについては、フィルタリング機能が及ばないようにすることで、DHCPサーバ5が対象範囲設定データに従えば、拒否対象装置(受付対象装置外)となってしまう場合でも、プリンタ装置10とDHCPサーバ5との通信を妨害しないようにした。
Further, in this embodiment, with respect to received data destined for the DHCP port, if the
従って、本実施例では、DHCPクライアント処理タスクが、リースされたIPアドレスの有効期限に合わせて、繰返しDHCPサーバ5と通信し、DHCPサーバ5からリースされたIPアドレスの情報を取得し、アドレスを自動設定する場合でも、この動作を、フィルタリング機能によって妨害することがない。よって、本実施例によれば、IPアドレスを継続的に自動設定する必要のあるシステムにおいて、管理者がプリンタ装置10に対して誤った設定を行うことにより、プリンタ装置10が、TCP/IPネットワークに参加できなくなるのを防止することができる。
Therefore, in this embodiment, the DHCP client processing task repeatedly communicates with the
尚、本発明の通信装置は、プリンタ装置10に相当し、処理実行手段は、印刷ジョブ登録処理タスク、設定変更処理タスク、及びDHCPクライアント処理タスクに相当する。
また、受付判断手段は、受信制御処理において、送信元装置のIPアドレスが、対象範囲設定データが示すアドレス範囲にあるかといった判断基準に従って、その装置から送信されてきたデータを受け付けるか否かを判断する(S860,S890)動作にて実現されている。また、本実施例において、拒否対象のアドレスは、「禁止モード」での対象範囲設定データにて定義され、受付対象のアドレスは、「許可モード」での対象範囲設定データにて定義されている。
The communication device of the present invention corresponds to the
In addition, in the reception control process, the reception determination unit determines whether or not to accept data transmitted from the device in accordance with a determination criterion such as whether the IP address of the transmission source device is in the address range indicated by the target range setting data. This is realized by the operation of determining (S860, S890) . Further, in this embodiment, the address of the refused Target is defined by the target range setting data in the "prohibition mode", the address of the reception subject is defined by the target range setting data in the "permission mode" Yes.
また、本発明の第一実行制御手段(実行制御手段)は、受け付けないと判断した場合(S860でNoと判断した場合又はS890でYesと判断した場合)に、その受信データをS910で破棄する一方で、受け付けると判断した場合(S860でYesと判断した場合又はS890でNoと判断した場合)には、その受信データをS870で対応するタスクに提供することにより、受け付けると判断したデータについての処理を選択的に、対応するタスクに実行させる通信制御部25の動作にて実現されている。
この他、データ判断手段は、受け付けないと判断された場合(S860でNoと判断された場合又はS890でYesと判断された場合)に、受信データに示された宛先のポート番号がDHCP用のポート番号であるか否かを判断する(S900)動作にて実現されている。
また、第二実行制御手段は、受信データに示された宛先のポート番号がDHCP用のポート番号である場合、S900でYesと判断して、対象範囲設定データの内容にかかわらず、その受信データをS870で対応するタスクに提供することにより、当該データについての処理を、対応するタスクに実行させる動作にて実現されている。
Further, the first execution control means (execution control means) of the present invention discards the received data in S910 when it is determined that it is not accepted (when No is determined in S860 or Yes in S890 ). On the other hand, if it is determined that the data is accepted (Yes in S860 or No in S890 ), the received data is provided to the corresponding task in S870, and the data determined to be accepted. This is realized by the operation of the
In addition, if the data judging means judges that the data is not accepted (when judged as No in S860 or when judged as Yes in S890), the destination port number indicated in the received data is the one for DHCP. This is realized by the operation of determining whether or not it is a port number (S900).
In addition, when the destination port number indicated in the received data is the DHCP port number, the second execution control unit determines Yes in S900, and regardless of the content of the target range setting data, the received data Is provided to the corresponding task in S870, and the processing for the data is realized by an operation for causing the corresponding task to execute.
その他、本発明において「当該通信装置の起動後、当該通信装置に、アドレスが初めて設定されるまでの期間、受付判断手段による判断結果に依らず、ネットワークインタフェースが受信したデータに基づく処理を、処理実行手段に実行させる」動作は、通信装置の起動後、通信装置に、アドレスが設定されるまでの期間は、ステータスフラグをオフにし、IPアドレスが自装置に設定された後に、ステータスフラグをオンに設定する(S160)動作にて実現されている。 In addition, according to the present invention , “a period from when the communication device is activated until an address is first set in the communication device, the processing based on the data received by the network interface is performed regardless of the determination result by the reception determination unit. The operation to be executed by the execution means is to turn off the status flag for the period until the address is set in the communication device after the communication device is started, and turn on the status flag after the IP address is set in the own device. (S160) .
また、本発明の通信装置は、上記実施例に限定されるものではなく、種々の態様を採ることができる。例えば、上記実施例では、アドレス範囲を、IPアドレスの情報とマスク情報とにより記述するようにしたが、アドレス範囲は、何番から何番までといった記述で定義されてもよい。その他、LAN内におけるTCP/IP通信は、IPv4(Internet Protocol Version 4)にて実現されてもよいし、IPv6にて実現されてもよい。 Further, the communication device of the present invention is not limited to the above embodiment, and can take various forms. For example, in the above embodiment, the address range is described by the IP address information and the mask information. However, the address range may be defined by a description from what number to what number. In addition, the TCP / IP communication in the LAN may be realized by IPv4 (Internet Protocol Version 4) or may be realized by IPv6.
1…通信システム、3…ゲートウェイ装置、5…DHCPサーバ、10…プリンタ装置、11…CPU、13…ROM、15…RAM、17…NVRAM、21…印刷部、23…表示操作部、25…通信制御部、27…ネットワークインタフェース、30…PC DESCRIPTION OF SYMBOLS 1 ... Communication system, 3 ... Gateway apparatus, 5 ... DHCP server, 10 ... Printer apparatus, 11 ... CPU, 13 ... ROM, 15 ... RAM, 17 ... NVRAM, 21 ... Printing part, 23 ... Display operation part, 25 ... Communication Control unit, 27 ... network interface, 30 ... PC
Claims (8)
前記ネットワークインタフェースを介してネットワーク内の装置と通信し、前記ネットワークインタフェースを介して受信したデータに基づく処理を実行する処理実行手段と、
前記ネットワークインタフェースが受信したデータを受け付けるか否かを、当該受信データの送信元装置に割り当てられたネットワーク上のアドレスに基づいて判断する受付判断手段と、
前記受付判断手段により受信データを受け付けないと判断された場合には、当該受信データを破棄し、前記受付判断手段により受信データを受け付けると判断された場合には、当該受信データに基づく処理を、前記処理実行手段に実行させる第一実行制御手段と、
前記受付判断手段により受信データを受け付けないと判断された場合には、当該受信データが、前記ネットワーク内の特定種の装置から送信された前記ネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであるか否かを判断するデータ判断手段と、
前記受付判断手段により受け付けないと判断された受信データが、前記データ判断手段により前記ネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであると判断された場合には、前記第一実行制御手段による当該受信データの破棄を禁止し、受信データに基づいて当該通信装置にアドレスを設定する処理を、前記処理実行手段に実行させる第二実行制御手段と、
を備えることを特徴とする通信装置。 A communication device comprising a network interface,
Processing execution means for communicating with a device in the network via the network interface and executing processing based on data received via the network interface;
Whether or not to accept the data that the network interface receives a reception determining means for determining based on an address on the network assigned to the source device of the received data,
When it is determined that the reception data is not received by the reception determination unit, the reception data is discarded, and when it is determined that the reception data is received by the reception determination unit, a process based on the reception data is performed. First execution control means to be executed by the process execution means;
If the reception determining means determines that the received data is not received, the received data is necessary for setting the address on the network transmitted from a specific type of device in the network to the communication device. Data judging means for judging whether or not the data is correct,
When the received data determined not to be received by the reception determining unit is data necessary for setting the address on the network in the communication device by the data determining unit, the first data A second execution control means for prohibiting the discarding of the received data by the execution control means, and causing the process execution means to execute a process of setting an address in the communication device based on the received data;
Communication device comprising: a.
前記ネットワークインタフェースを介してネットワーク内の装置と通信し、前記ネットワークインタフェースを介して受信したデータに基づく処理を実行する処理実行手段と、 Processing execution means for communicating with a device in the network via the network interface and executing processing based on data received via the network interface;
前記ネットワークインタフェースが受信したデータを受け付けるか否かを、当該受信データの送信元装置に割り当てられたネットワーク上のアドレスに基づいて判断する受付判断手段と、 An acceptance determination means for determining whether or not to accept the data received by the network interface based on an address on the network assigned to the transmission source device of the received data;
前記受付判断手段により受信データを受け付けないと判断された場合には、当該受信データを破棄し、前記受付判断手段により受信データを受け付けると判断された場合には、当該受信データに基づく処理を、前記処理実行手段に実行させる第一実行制御手段と、 When it is determined that the reception data is not received by the reception determination unit, the reception data is discarded, and when it is determined that the reception data is received by the reception determination unit, a process based on the reception data is performed. First execution control means to be executed by the process execution means;
前記受付判断手段により受信データを受け付けないと判断された場合には、当該受信データが、前記ネットワーク内の特定種の装置から送信された前記ネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであるか否かを判断するデータ判断手段と、 If the reception determining means determines that the received data is not received, the received data is necessary for setting the address on the network transmitted from a specific type of device in the network to the communication device. Data judging means for judging whether or not the data is correct,
前記受付判断手段により受け付けないと判断された受信データが、前記データ判断手段により前記ネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであると判断された場合には、前記第一実行制御手段による当該受信データの破棄を禁止し、受信データに基づいて当該通信装置にアドレスを設定する処理を、前記処理実行手段に実行させる第二実行制御手段 When the received data determined not to be received by the reception determining unit is data necessary for setting the address on the network in the communication device by the data determining unit, the first data Second execution control means for prohibiting discarding of the received data by the execution control means and causing the process execution means to execute a process of setting an address in the communication device based on the received data
としての機能を実現させるためのプログラム。 A program to realize the functions as
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005159972A JP4161981B2 (en) | 2005-05-31 | 2005-05-31 | Communication device and program |
| US11/421,040 US20060271648A1 (en) | 2005-05-31 | 2006-05-30 | Communication Device And Program Employed By The Same |
| CNB2006100850726A CN100548000C (en) | 2005-05-31 | 2006-05-31 | Communication equipment |
| EP06252800A EP1729485B1 (en) | 2005-05-31 | 2006-05-31 | Communication device and program employed by the same |
| DE602006001983T DE602006001983D1 (en) | 2005-05-31 | 2006-05-31 | Communication device and program used thereby |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005159972A JP4161981B2 (en) | 2005-05-31 | 2005-05-31 | Communication device and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2006339846A JP2006339846A (en) | 2006-12-14 |
| JP4161981B2 true JP4161981B2 (en) | 2008-10-08 |
Family
ID=36956111
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005159972A Expired - Fee Related JP4161981B2 (en) | 2005-05-31 | 2005-05-31 | Communication device and program |
Country Status (5)
| Country | Link |
|---|---|
| US (1) | US20060271648A1 (en) |
| EP (1) | EP1729485B1 (en) |
| JP (1) | JP4161981B2 (en) |
| CN (1) | CN100548000C (en) |
| DE (1) | DE602006001983D1 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090002726A1 (en) * | 2007-06-26 | 2009-01-01 | Xerox Corporation | Raster image processing of hold jobs when digital front end is idle |
| KR20090096121A (en) * | 2008-03-07 | 2009-09-10 | 삼성전자주식회사 | apparatus and method of stateful address Auto configuration protocol in IPv6 network |
| US10872161B2 (en) * | 2016-11-23 | 2020-12-22 | Entrust Corporation | Printer identity and security |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6336185B1 (en) * | 1998-09-24 | 2002-01-01 | Phoenix Technologies Ltd. | Use of other processors during BIOS boot sequence to minimize boot time |
| US6701432B1 (en) * | 1999-04-01 | 2004-03-02 | Netscreen Technologies, Inc. | Firewall including local bus |
| JP4027112B2 (en) * | 2001-03-06 | 2007-12-26 | キヤノン株式会社 | Image processing apparatus and communication method in image processing apparatus |
| JP3872368B2 (en) * | 2002-03-27 | 2007-01-24 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Information processing apparatus, network configuration method including the information processing apparatus, and program for the network configuration method |
| US7200678B1 (en) * | 2002-09-04 | 2007-04-03 | Cisco Technology, Inc. | Selecting network address offered by a plurality of servers based on server identification information |
| EP2472823B1 (en) * | 2002-11-06 | 2013-09-18 | Telefonaktiebolaget L M Ericsson AB (Publ) | A method and a device in an IP network |
| US7120787B2 (en) * | 2003-10-31 | 2006-10-10 | International Business Machinces Corporation | Secure switching for downloading network boots |
| US7130996B2 (en) * | 2003-10-31 | 2006-10-31 | International Business Machines Corporation | Method and system for restricting DHCP servers |
| JP2005159972A (en) | 2003-11-28 | 2005-06-16 | Tamura Seisakusho Co Ltd | Voice regulating system, voice regulating device, operating device, voice regulating program and operating program |
| US20060195610A1 (en) * | 2005-02-28 | 2006-08-31 | Sytex, Inc. | Security Enhanced Methods And System For IP Address Allocation |
-
2005
- 2005-05-31 JP JP2005159972A patent/JP4161981B2/en not_active Expired - Fee Related
-
2006
- 2006-05-30 US US11/421,040 patent/US20060271648A1/en not_active Abandoned
- 2006-05-31 CN CNB2006100850726A patent/CN100548000C/en not_active Expired - Fee Related
- 2006-05-31 EP EP06252800A patent/EP1729485B1/en not_active Ceased
- 2006-05-31 DE DE602006001983T patent/DE602006001983D1/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| US20060271648A1 (en) | 2006-11-30 |
| DE602006001983D1 (en) | 2008-09-11 |
| JP2006339846A (en) | 2006-12-14 |
| CN100548000C (en) | 2009-10-07 |
| EP1729485A3 (en) | 2007-03-14 |
| EP1729485A2 (en) | 2006-12-06 |
| EP1729485B1 (en) | 2008-07-30 |
| CN1874354A (en) | 2006-12-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8725897B2 (en) | Communication apparatus and control method thereof | |
| US7996506B2 (en) | Setting management system and setting management program | |
| US11444917B2 (en) | Network device, network device control method, and storage medium | |
| US7644143B2 (en) | Data processing device, registration method, and program | |
| JP5287512B2 (en) | Peripheral device, program, and network system | |
| JP4161981B2 (en) | Communication device and program | |
| JP4161980B2 (en) | Communication apparatus, management system, information processing apparatus, and program | |
| US10623527B2 (en) | Communication system, communication device and program | |
| CN108173901B (en) | communication device | |
| JP2010016769A (en) | Image forming system, and image forming method | |
| JP4241681B2 (en) | Information processing apparatus and program | |
| US20100332681A1 (en) | Communication apparatus capable of selecting a proper source address from a plurality of source addresses assigned thereto, method of controlling the same, and storage medium | |
| JP6855751B2 (en) | Relay device, program for relay device, and information processing system | |
| JP2007174351A (en) | Communication device | |
| JP7226013B2 (en) | server and computer program for server | |
| CN100438554C (en) | Network interface device and method for controlling image data forwarding | |
| JP2018088645A (en) | Communication device, and computer program | |
| JP2010093609A (en) | Digital composite machine | |
| KR20210065513A (en) | Network security configuration of image forming apparatus | |
| JP2006094038A (en) | Information communication apparatus and method for correcting IP address set in information communication apparatus | |
| JP5175560B2 (en) | Information processing apparatus and information processing method | |
| JP2007088902A (en) | Network system, program, and storage medium | |
| JPH10133977A (en) | Packet filtering device | |
| JP2013187610A (en) | Communications device and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071105 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071113 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080115 |
|
| 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: 20080701 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080714 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110801 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4161981 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120801 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120801 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130801 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |