Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4161981B2 - Communication device and program - Google Patents
[go: Go Back, main page]

JP4161981B2 - Communication device and program - Google Patents

Communication device and program Download PDF

Info

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
Application number
JP2005159972A
Other languages
Japanese (ja)
Other versions
JP2006339846A (en
Inventor
貴夫 関
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2005159972A priority Critical patent/JP4161981B2/en
Priority to US11/421,040 priority patent/US20060271648A1/en
Priority to CNB2006100850726A priority patent/CN100548000C/en
Priority to EP06252800A priority patent/EP1729485B1/en
Priority to DE602006001983T priority patent/DE602006001983D1/en
Publication of JP2006339846A publication Critical patent/JP2006339846A/en
Application granted granted Critical
Publication of JP4161981B2 publication Critical patent/JP4161981B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease 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アドレスなどを記した制限表を有し、この制限表を基づいて、外部装置からのアクセスを制限する機能を有した通信装置が知られている。この通信装置では、外部からの不正なアクセスを禁止することができるので、便利である。
特開2002−333958号公報
In addition, the communication device has a restriction table that describes IP addresses that permit access and IP addresses that prohibit access, and has a function of restricting access from external devices based on this restriction table. Communication devices are known. This communication apparatus is convenient because unauthorized access from outside can be prohibited.
JP 2002-333958 A

しかしながら、上述の通信装置では、制限表に誤った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 claims 5 and 6 . According to a fifth aspect of the present invention, if the data received by the network interface is data transmitted from a device to which a preset address to be rejected is assigned , the acceptance judgment unit of the communication device does not accept the data. If the data received by the network interface is not data transmitted from the device to which the address to be rejected is assigned, it is determined that this data is accepted .

受付判断手段がこのように構成された通信装置では、管理者が誤って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 printer device 10 to which the present invention is applied. The communication system 1 according to the present embodiment includes a gateway device 3 connected to a wide area network, a DHCP server 5, a printer device 10, and a PC (personal computer) 30. The printer device 10, the PC 30, and the DHCP server 5 are each configured to be capable of TCP / IP communication. The communication system 1 includes a single LAN (local network) including the printer device 10, the PC 30, and the DHCP server 5. Area network) has been established.

プリンタ装置10は、各種プログラムを実行して装置内各部を統括制御するCPU11と、CPU11により実行される各種プログラムを記憶するROM13と、CPU11によるプログラム実行時に作業領域として使用されるRAM15と、各種設定データを記憶するデータ書換可能な不揮発性メモリとしてのNVRAM17と、CPU11に制御されて、紙媒体に画像を形成(印刷)する印刷部21と、表示部(液晶モニタ)及び利用者が操作可能な操作部(キー群)を備える表示操作部23と、TCP/IP方式にて通信制御を行う通信制御部25と、LANに接続されたネットワークインタフェース(所謂LANインタフェース)27と、を備える。   The printer device 10 includes a CPU 11 that executes various programs and controls each unit in the device, a ROM 13 that stores various programs executed by the CPU 11, a RAM 15 that is used as a work area when the CPU 11 executes programs, and various settings. NVRAM 17 serving as a data rewritable nonvolatile memory for storing data, a printing unit 21 for forming (printing) an image on a paper medium, a display unit (liquid crystal monitor), and a user can be controlled by the CPU 11 A display operation unit 23 including an operation unit (key group), a communication control unit 25 that performs communication control by a TCP / IP method, and a network interface (so-called LAN interface) 27 connected to a LAN are provided.

尚、図1では、通信制御部25とCPU11とを分けて示すが、通信制御部25は、専用装置(例えば、専用のマイクロコンピュータ)で構成されてもよいし、CPU11にTCP/IP通信を実現するためのソフトウェア群(プロトコルスタック)を実行させて実現されてもよい。本実施例では、通信制御部25での処理が、プログラムにより実現されるものとする。   In FIG. 1, the communication control unit 25 and the CPU 11 are shown separately. However, the communication control unit 25 may be configured by a dedicated device (for example, a dedicated microcomputer), or performs TCP / IP communication with the CPU 11. It may be realized by executing a software group (protocol stack) for realizing. In the present embodiment, it is assumed that the processing in the communication control unit 25 is realized by a program.

また、本実施例では、プリンタ装置10が、LAN内の他の装置と通信して、所定の機能を実現するタスクを、CPU11で実行する構成にされており、通信制御部25が、これらタスクとLAN内の他の装置との間でやりとりされるデータを中継する。図2は、プリンタ装置10の通信制御部25の動作(受信動作)を示す説明図である。   In this embodiment, the printer device 10 communicates with other devices in the LAN, and a task for realizing a predetermined function is executed by the CPU 11. The communication control unit 25 performs these tasks. And relays data exchanged between other devices in the LAN. FIG. 2 is an explanatory diagram showing an operation (reception operation) of the communication control unit 25 of the printer apparatus 10.

通信制御部25は、上記タスクが生成した送信データに対して所定の処理を施すことにより、この送信データをIPパケットに変換し、これを送信データとしてネットワークインタフェース27に出力する。一方、ネットワークインタフェース27は、通信制御部25が生成した送信データを、LANに送出するための電気的な信号に変換して、これをLANに出力すると共に、LANから受信した電気的な信号に基づいて、受信信号を、通信制御部25が受付可能なディジタルデータに変換する。そして、これを内蔵のバッファに蓄積する。   The communication control unit 25 performs predetermined processing on the transmission data generated by the task to convert the transmission data into an IP packet, and outputs this to the network interface 27 as transmission data. On the other hand, the network interface 27 converts the transmission data generated by the communication control unit 25 into an electrical signal for transmission to the LAN, outputs this to the LAN, and converts it into an electrical signal received from the LAN. Based on this, the received signal is converted into digital data that can be received by the communication control unit 25. This is stored in a built-in buffer.

通信制御部25は、この受信データを、ネットワークインタフェース27のバッファから取り出して、受信データが示すポート番号等の情報に基づき、受け渡し先のタスクを決定し、この受信データを対応するタスクに提供する。   The communication control unit 25 extracts the received data from the buffer of the network interface 27, determines a task of a delivery destination based on information such as a port number indicated by the received data, and provides the received data to the corresponding task. .

例えば、受信データに示されたポート番号が、ネットワーク印刷用のポート番号である場合、通信制御部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 communication control unit 25 provides the received data to the print job registration processing task. When the print job registration processing task communicates with the PC 30 via the communication control unit 25 and the network interface 27 and receives print command data from the PC 30, the print job for the print data stored in the print command data is queued. To register. The print job registered in the queue is processed by the print control processing task. Specifically, the print control processing task executes the print jobs registered in the queue in the oldest order, and causes the printing unit 21 to print out an image based on the corresponding print data.

その他、通信制御部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 communication control unit 25 provides the received data to the setting change processing task. When the setting change processing task communicates with the PC 30 via the communication control unit 25 and the network interface 27 and receives setting command data generated by the PC 30 by an input operation on the PC 30 by the user, the setting change processing task receives the setting command data. Based on this, the filtering setting data stored in the NVRAM 17 is updated, and the setting change relating to the filtering function of the printer device 10 is performed.

尚、本実施例の通信制御部25は、フィルタリング機能を有し、NVRAM17が記憶するフィルタリング設定データに基づいて動作して、フィルタリング機能がオンに設定されている期間には、所定のIPアドレスが送信元アドレスとして付された受信データを破棄し、対応するタスクに受信データを提供する動作を行わないようにする構成にされている。周知のように、IP通信では、IPパケットに送信元のIPアドレスの情報が付加されるので、通信制御部25は、この送信元アドレスの情報に基づき、所定のIPアドレスが送信元アドレスとして付された受信データを破棄するのである。   The communication control unit 25 according to the present embodiment has a filtering function, operates based on the filtering setting data stored in the NVRAM 17, and a predetermined IP address is set during the period when the filtering function is set to ON. The configuration is such that the received data attached as the source address is discarded and the operation of providing the received data to the corresponding task is not performed. As is well known, in IP communication, information on the IP address of the transmission source is added to the IP packet. Therefore, the communication control unit 25 attaches a predetermined IP address as the transmission source address based on the information on the transmission source address. The received data is discarded.

図3は、プリンタ装置10のNVRAM17が記憶するフィルタリング設定データの構成を表す説明図である。フィルタリング設定データは、フィルタリング機能の動作内容を決定付けるデータであり、機能オンオフ設定データと、モード設定データと、対象範囲設定データと、を備える。   FIG. 3 is an explanatory diagram showing the configuration of the filtering setting data stored in the NVRAM 17 of the printer apparatus 10. The filtering setting data is data that determines the operation content of the filtering function, and includes function on / off setting data, mode setting data, and target range setting data.

機能オンオフ設定データは、フィルタリング機能のオンオフを切り替えるためのデータであり、「有効」及び「無効」のいずれかの値を示すデータである。この機能オンオフ設定データが「有効」との値を示している場合、通信制御部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 communication control unit 25 turns on the filtering function. When the function on / off setting data indicates a value of “invalid”, the communication control unit 25 turns off the filtering function.

また、モード設定データは、「許可モード」及び「禁止モード」のいずれかの値を示すデータである。詳しくは後述するが、本実施例における通信制御部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 communication control unit 25 in the present embodiment starts from the device to which the IP address within the range indicated by the target range setting data is assigned. Is allowed to accept the data, and provides this data to the corresponding task, prohibits the acceptance of data from other devices, and discards the data.

また、モード設定データが「禁止モード」との値を示している場合、通信制御部25は、対象範囲設定データが示す範囲内のIPアドレスが割り当てられた装置からのデータの受付を禁止して、このデータを破棄する動作を行い、それ以外の装置からのデータの受付を許可して、このデータを対応するタスクに提供する動作を行う。   Further, when the mode setting data indicates a value of “prohibited mode”, the communication control unit 25 prohibits reception of data from a device to which an IP address within the range indicated by the target range setting data is assigned. The operation of discarding this data is performed, the reception of data from other devices is permitted, and the operation of providing this data to the corresponding task is performed.

その他、対象範囲設定データは、フィルタリングの対象となる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 PC 30 includes this function on / off setting data, mode setting data, and target range setting data, and the setting change processing task uses the setting command data as a communication control unit. When the data is received via 25, each value of the filtering setting data is updated to a value that matches these data, and the setting is changed according to the setting command data. FIG. 4 is an explanatory diagram showing the operation content of the setting change processing task.

その他、通信制御部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 communication control unit 25 provides the received data to the DHCP client processing task. The DHCP client processing task communicates with the DHCP server 5 and sets the IP address issued (lease) from the DHCP server 5 in the communication control unit 25 of the own device. The printer device 10 according to the present embodiment realizes automatic IP address setting by the operation of the DHCP client processing task, and allows the own device to participate in the TCP / IP network. In other words, the own apparatus is allowed to perform unicast TCP / IP communication with the apparatus in the LAN.

次に、プリンタ装置10の動作について、フローチャートを用いて詳しく説明する。図5は、プリンタ装置10のCPU11が起動直後(当該プリンタ装置10の電源投入直後)に、ブートプログラムに従って実行するブート処理を表すフローチャートである。   Next, the operation of the printer apparatus 10 will be described in detail using a flowchart. FIG. 5 is a flowchart showing a boot process executed according to the boot program immediately after the CPU 11 of the printer apparatus 10 is started (immediately after the printer apparatus 10 is turned on).

ブート処理を実行すると、CPU11は、まず初期化処理を実行して、装置内各部を初期化し(S110)、この初期化処理を終えると、ステータスフラグをリセットして、これをオフに設定する(S120)。尚、ステータスフラグの値(オン/オフ)は、RAM15に記憶される。詳しくは後述するが、このステータスフラグは、通信制御部25のフィルタリング機能を、オン/オフするのに用いられる(図8参照)。   When the boot process is executed, the CPU 11 first executes an initialization process to initialize each unit in the apparatus (S110). When this initialization process is completed, the status flag is reset and set to OFF ( S120). The status flag value (on / off) is stored in the RAM 15. As will be described in detail later, this status flag is used to turn on / off the filtering function of the communication control unit 25 (see FIG. 8).

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 CPU 11 activates the communication control unit 25 in S125, and activates a DHCP client processing task in S130. After the DHCP client processing task is started, it is determined whether or not an IP address has been set for the device by the operation of the DHCP client processing task (S140). If the IP address has not been set (S140) No in S140), it is determined whether a predetermined standby end condition is satisfied (S150). In S150, the boot program may be configured to determine that the standby end condition is satisfied when a predetermined time has elapsed, or the number of executions of processing related to acquisition of an IP address (for example, a parameter RetryCount described later). If the value) exceeds a predetermined number of times, the boot program may be configured to determine that the standby end condition is satisfied.

ここで、待機終了条件が満足されていないと判断すると(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 CPU 11 waits until an IP address is set or the standby end condition is satisfied. If the IP address is set (Yes in S140) or the standby end condition is satisfied (Yes in S150), the process proceeds to S160, and the status flag stored in the RAM 15 is set to ON.

また、S160での処理を終えると、CPU11は、予め定められた各種アプリケーションプログラムを立ち上げて、上述した印刷ジョブ登録処理タスクや、設定変更処理タスク等を起動する。その後、当該ブート処理を終了する。   When the process in S160 is completed, the CPU 11 starts up various application programs determined in advance, and activates the above-described print job registration processing task, setting change processing task, and the like. Thereafter, the boot process ends.

次に、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 communication control unit 25, opens the above-described DHCP port (S420), and then executes the address acquisition processing. , A DHCP DISCOVER message and a DHCP REQUEST message are sent to the LAN via the communication control unit 25 and the network interface 27. Thus, the DHCP server 5 is requested to issue (lease) the IP address to the printer device 10 (S430). FIG. 7 is a flowchart showing the address acquisition process.

アドレス取得処理を開始すると、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 RAM 15.

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 communication control unit 25 and the network interface 27 in the form of bloatcast (S540). This action causes the DHCP client processing task to search for available DHCP servers.

尚、このアドレス取得処理においては、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 server 5 using a dedicated port (DHCP port). That is, the above-mentioned DHCP DISCOVER message and a DHCP REQUEST message described later are sent to the LAN with the DHCP port number added as the source port number. In addition, when the process in S540 is executed, the IP address of the own device is not set, and therefore, information on the source address of the value “0.0.0.0” is added to this DHCP DISCOVER message (IPv4 in the case of).

また、DHCPサーバ5は、このDHCP DISCOVERを受信すると、応答メッセージとして、クライアントに対してリース可能なIPアドレスの情報を含むメッセージであり、送信元アドレスの情報として、自身のIPアドレスの情報を付加したDHCP OFFERメッセージを、ブロードキャストの形態で、LANに送出する(但し、応答メッセージの送出時には、応答メッセージを送信する原因となったメッセージの送信元情報に従って、送信元のポート番号を宛先としてメッセージを送出する。後述するDHCP ACKについても同様。)。   When the DHCP DISCOVER receives this DHCP DISCOVER, the DHCP server 5 is a message including IP address information that can be leased to the client as a response message, and adds its own IP address information as the source address information. The DHCP OFFER message is sent to the LAN in the form of a broadcast (however, when sending a response message, the message is sent with the source port number as the destination according to the source information of the message that caused the response message to be sent). (The same applies to DHCP ACK described later.)

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 network interface 27 and the communication control unit 25 (S550), and during the predetermined time, the DHCP OFFER message Is received, it is determined that the DHCP OFFER message has been received (Yes in S550), and the process proceeds to S560. On the other hand, if the DHCP OFFER message cannot be received even after the predetermined time has elapsed, it is determined that the DHCP OFFER message has not been received at that time (No in S550), and the process proceeds to S573.

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 available DHCP servers 5 found by the reception of the DHCP OFFER message, and the IP address of the selected DHCP server 5 is selected. A DHCP REQUEST message, which is a message including information and is a lease request for an official IP address to the selected DHCP server 5, is transmitted to the LAN via the communication control unit 25 and the network interface 27.

尚、DHCPサーバ5は、自身に対してIPアドレスのリースを要求する旨のDHCP REQUESTメッセージを受信すると、DHCP REQUESTメッセージを送信してきたクライアントに対し、応答メッセージとして、リースするIPアドレス及びリース時間の情報を含んだメッセージであり、送信元アドレスの情報として、自身のIPアドレスの情報を含んだDHCP ACKメッセージを、LANに送出する。   When the DHCP server 5 receives a DHCP REQUEST message requesting itself to lease an IP address, the DHCP server 5 sends, as a response message, the IP address to be leased and the lease time to the client that has transmitted the DHCP REQUEST message. It is a message including information, and a DHCP ACK message including information on its own IP address is transmitted to the LAN as information on the source address.

従って、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 network interface 27 and the communication control unit 25 after the transmission of the DHCP REQUEST message (S570). If a DHCP ACK message for the requested IP address is received within a predetermined time, it is determined that the DHCP ACK message has been received (Yes in S570), and the process proceeds to S580. If the DHCP ACK message cannot be received even after the predetermined time has elapsed, it is determined that the DHCP ACK message has not been received at that time (No in S570), and the process proceeds to S573. .

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 communication control unit 25 based on the IP address information leased to the device and the lease time information included in the received DHCP ACK message. Set the IP address of the device. When the processing in S580 is completed, the DHCP client processing task sets the lease time setting flag to ON (S590). Thereafter, the address acquisition process ends.

その他、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 communication control unit 25. If it is determined whether or not the lease time has elapsed (Yes in S600), the lease time update flag is reset and set to off (S610). Thereafter, the process proceeds to S540.

一方、リース時間が経過していないと判断すると(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 communication control unit 25 and the network interface 27 to the same DHCP server 5 as the DHCP server 5 selected in the previous S560 (S630). ).

また、この処理を終えると、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 network interface 27 and the communication control unit 25 (S640), and requests the requested IP for a predetermined time. When the DHCP ACK message for the address is received, it is determined that the DHCP ACK message has been received (Yes in S640), and the process proceeds to S650. If the DHCP ACK message cannot be received even after the predetermined time has elapsed, it is determined that the DHCP ACK message has not been received at that time (No in S640), and the process proceeds to S643. .

また、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 communication control unit 25 based on the IP address information leased to the device and the lease time information included in the received DHCP ACK message. Set the IP address of the device. When the process in S650 is completed, the lease time setting flag is set to ON (S660). Thereafter, the address acquisition process ends.

また、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 communication control unit 25 and closes the DHCP port described above (S440). When the processing in S440 is finished, the DHCP client processing task determines whether or not the lease time setting flag is on (S450), and determines that the lease time setting flag is on (Yes in S450). , The process proceeds to S460.

また、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 server 5 is reserved with a margin before the expiration date (lease time) of the IP address set in the own device elapses. This is for reacquisition. When the lease time of the IP address expires, the printer device 10 cannot participate in the TCP / IP network. Therefore, in the DHCP client processing task, before the expiration date of the set IP address elapses, The process of communicating and setting the IP address in the own apparatus (the process of S420 to S495) is repeatedly executed.

その他、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 communication control unit 25 activated prior to the DHCP client processing task executes a reception control process shown in FIG. FIG. 8 is a flowchart showing a reception control process repeatedly executed by the communication control unit 25. The filtering function described above is realized by this reception control process.

受信制御処理を実行すると、通信制御部25は、ネットワークインタフェース27が、LAN内の装置からデータ(IPパケット)を受信するまで待機し(S810)、ネットワークインタフェース27がデータを受信すると(S810でYes)、NVRAM17が記憶するフィルタリング設定データに基づき、フィルタリング機能がオンにされているか否かを判断する(S820)。具体的には、フィルタリング設定データを構成する機能オンオフ設定データが「有効」との値を示している場合には、フィルタリング機能がオンにされていると判断し、機能オンオフ設定データが「無効」との値を示している場合には、フィルタリング機能がオンにされていない(オフにされている)と判断する。   When the reception control process is executed, the communication control unit 25 waits until the network interface 27 receives data (IP packet) from a device in the LAN (S810), and when the network interface 27 receives data (Yes in S810). ) Based on the filtering setting data stored in the NVRAM 17, it is determined whether or not the filtering function is turned on (S820). Specifically, when the function on / off setting data constituting the filtering setting data indicates a value of “valid”, it is determined that the filtering function is turned on, and the function on / off setting data is “invalid”. When the value of is shown, it is determined that the filtering function is not turned on (turned off).

ここで、フィルタリング機能がオンにされていないと判断すると(S820でNo)、通信制御部25は、S870に移行し、ネットワークインタフェース27が受信したデータを受け付ける。即ち、受信データが示すポート番号に対応するタスクに、受信データを提供する。その後、当該受信制御処理を終了する。   If it is determined that the filtering function is not turned on (No in S820), the communication control unit 25 proceeds to S870 and accepts data received by the network interface 27. That is, the received data is provided to the task corresponding to the port number indicated by the received data. Thereafter, the reception control process ends.

但し、S870にて、ネットワークインタフェース27が受信したデータを対応するタスクに提供するのは、受信データが示すポート番号が、許可ポート番号に設定されている場合のみである(即ち、対応するポートが開いている場合のみである)。受信データが示すポート番号が、許可ポート番号に設定されていない場合、通信制御部25は、S870に移行しても、この受信データを破棄する動作を行う。   However, in S870, the data received by the network interface 27 is provided to the corresponding task only when the port number indicated by the received data is set to the permitted port number (that is, the corresponding port is Only when open). When the port number indicated by the received data is not set as the permitted port number, the communication control unit 25 performs an operation of discarding the received data even after the process proceeds to S870.

一方、フィルタリング機能がオンにされていると判断すると(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 communication control unit 25 proceeds to S830 and determines whether the status flag is set to on. If it is determined that the status flag is not set to ON (No in S830), the process proceeds to S870, and the data received by the network interface 27 is provided to the corresponding task. Thereafter, the reception control process ends.

一方、ステータスフラグがオンに設定されていると判断すると(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 communication control unit 25 proceeds to S840 and determines whether or not the mode setting data indicates a value of “permitted mode”. To do. If the mode setting data indicates a value of “permitted mode”, the process proceeds to S850.

S850に移行すると、通信制御部25は、NVRAM17が記憶する対象範囲設定データが示すアドレス範囲と、受信データが示す送信元アドレスとを照合し、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであるか否かを判断する(S860)。この判断により、通信制御部25は、送信元装置が、対象範囲設定データにアドレス範囲の情報によって登録された受付対象装置であるか否かを判断する。   After shifting to S850, the communication control unit 25 collates the address range indicated by the target range setting data stored in the NVRAM 17 with the transmission source address indicated by the reception data, and the transmission source address indicated by the reception data is the target range setting data. It is determined whether it is included in the address range indicated by (S860). Based on this determination, the communication control unit 25 determines whether or not the transmission source device is a reception target device registered in the target range setting data based on the address range information.

そして、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであると判断すると(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 communication control unit 25 proceeds to S870 and the network interface 27 receives the data. Provide the data to the corresponding task. Thereafter, the reception control process ends.

一方、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものではないと判断すると(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 communication control unit 25 proceeds to S900 and the port indicated by the received data It is determined whether the number is a DHCP port number. When it is determined that the port number indicated by the received data is a DHCP port number (Yes in S900), the process proceeds to S870, and the data received by the network interface 27 is transferred to the corresponding task (DHCP client processing task). provide.

即ち、本実施例では、ネットワークインタフェース27がDHCP用(専用)のポートを宛先としたデータを受信した場合、S900でYesと判断することにより、対象範囲設定データの内容に従えば、受け付けるべきではないデータであっても、このデータを受け付けると判断して、S870に移行し、ネットワークインタフェース27が受信したデータを、対応するタスク(DHCPクライアント処理タスク)に提供する。その後、当該受信制御処理を終了する。   That is, in this embodiment, when the network interface 27 receives data destined for the DHCP (dedicated) port, it should be accepted according to the content of the target range setting data by determining Yes in S900. Even if there is no data, it is determined that the data is accepted, the process proceeds to S870, and the data received by the network interface 27 is provided to the corresponding task (DHCP client processing task). Thereafter, the reception control process ends.

これに対し、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 communication control unit 25 proceeds to S910 and does not accept the data received by the network interface 27 ( That is, the received data is discarded (data is erased) without providing data to the corresponding task).

即ち、本実施例では、ネットワークインタフェース27が受信したデータが、DHCP用(専用)のポートを宛先としたデータではない場合、対象範囲設定データの内容に従って、このデータを受け付けないと判断し(S900でNo)、受信データを破棄する(S910)。その後、当該受信制御処理を終了する。   That is, in this embodiment, when the data received by the network interface 27 is not data destined for the DHCP (dedicated) port, it is determined that the data is not accepted according to the contents of the target range setting data (S900). No), the received data is discarded (S910). Thereafter, the reception control process ends.

その他、通信制御部25は、S840にて、モード設定データが「許可モード」との値を示していないと判断すると(換言すれば、モード設定データが「禁止モード」との値を示していると判断すると)、S880に移行する。   In addition, if the communication control unit 25 determines in S840 that the mode setting data does not indicate a value of “permitted mode” (in other words, the mode setting data indicates a value of “prohibited mode”). If YES, the process proceeds to S880.

S880に移行すると、通信制御部25は、NVRAM17が記憶する対象範囲設定データが示すアドレス範囲と、受信データが示す送信元アドレスとを照合し、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであるか否かを判断する(S890)。   After shifting to S880, the communication control unit 25 collates the address range indicated by the target range setting data stored in the NVRAM 17 with the transmission source address indicated by the reception data, and the transmission source address indicated by the reception data is the target range setting data. Is determined to be included in the address range indicated by (S890).

そして、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものではないと判断すると(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 communication control unit 25 proceeds to S870 and the network interface 27 receives the data. Provide the data to the corresponding task. Thereafter, the reception control process ends.

一方、受信データが示す送信元アドレスが、対象範囲設定データが示すアドレス範囲に含まれるものであると判断すると(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 communication control unit 25 proceeds to S900, and the port indicated by the received data It is determined whether the number is a DHCP port number. When it is determined that the port number indicated by the received data is a DHCP port number (Yes in S900), the process proceeds to S870, and the data received by the network interface 27 is transferred to the corresponding task (DHCP client processing task). provide. Thereafter, the reception control process ends.

これに対し、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 communication control unit 25 proceeds to S910 and does not accept the data received by the network interface 27 ( That is, the received data is discarded (data is erased) without providing data to the corresponding task). Thereafter, the reception control process ends. In this way, the filtering function is realized by the reception control process.

以上、本実施例の通信システム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 printer device 10 after the printer device 10 is started by turning on / off the status flag. The filtering function of the communication control unit 25 is prevented from working. Therefore, according to the present embodiment, if the DHCP server 5 obeys the target range setting data by making an incorrect setting to the printer device 10 through the PC 30 or the like, the rejection target device (outside the reception target device) Even in such a case, communication between the printer device 10 and the DHCP server 5 can be prevented from being interrupted.

従って、本実施例によれば、管理者のプリンタ装置10に対する設定ミスによって、プリンタ装置10がアドレスの自動設定を行うことができなくなるのを防止することができる。よって、本実施例によれば、管理者がプリンタ装置10に対して誤ったフィルタリング機能にかかる設定を行うことにより、プリンタ装置10が、TCP/IPネットワークに参加できなくなるのを防止することができる。   Therefore, according to the present embodiment, it is possible to prevent the printer device 10 from being unable to perform automatic address setting due to a setting error for the printer device 10 by the administrator. Therefore, according to the present embodiment, it is possible to prevent the printer device 10 from being unable to participate in the TCP / IP network due to an administrator setting the printer device 10 for an incorrect filtering function. .

また、本実施例では、DHCP用のポートを宛先とする受信データについては、フィルタリング機能が及ばないようにすることで、DHCPサーバ5が対象範囲設定データに従えば、拒否対象装置(受付対象装置外)となってしまう場合でも、プリンタ装置10とDHCPサーバ5との通信を妨害しないようにした。   Further, in this embodiment, with respect to received data destined for the DHCP port, if the DHCP server 5 obeys the target range setting data by preventing the filtering function from reaching, the rejection target device (acceptance target device) The communication between the printer apparatus 10 and the DHCP server 5 is not disturbed even in the case where the error occurs.

従って、本実施例では、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 DHCP server 5 in accordance with the expiration date of the leased IP address, acquires information on the leased IP address from the DHCP server 5, and obtains the address. Even in the case of automatic setting, this operation is not disturbed by the filtering function. Therefore, according to the present embodiment, in a system in which an IP address needs to be automatically set continuously, the printer device 10 can make a TCP / IP network when the administrator makes an incorrect setting to the printer device 10. Can be prevented from becoming unable to participate.

尚、本発明の通信装置は、プリンタ装置10に相当し、処理実行手段は、印刷ジョブ登録処理タスク、設定変更処理タスク、及びDHCPクライアント処理タスクに相当する。
また、受付判断手段は、受信制御処理において、送信元装置のIPアドレスが、対象範囲設定データが示すアドレス範囲にあるかといった判断基準に従って、その装置から送信されてきたデータを受け付けるか否かを判断する(S860,S890)動作にて実現されている。また、本実施例において、拒否対象のアドレスは、「禁止モード」での対象範囲設定データにて定義され、受付対象のアドレスは、「許可モード」での対象範囲設定データにて定義されている。
The communication device of the present invention corresponds to the printer device 10, and the processing execution means corresponds to a print job registration processing task, a setting change processing task, and a DHCP client processing task.
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 communication control unit 25 that selectively causes the corresponding task to execute the process.
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.

本発明が適用されたプリンタ装置10を備える通信システム1の構成を表す説明図である。It is explanatory drawing showing the structure of the communication system 1 provided with the printer apparatus 10 with which this invention was applied. 通信制御部25の受信動作を示す説明図である。It is explanatory drawing which shows the reception operation | movement of the communication control part 25. FIG. フィルタリング設定データの構成を表す説明図である。It is explanatory drawing showing the structure of filtering setting data. 設定変更処理タスクの動作内容を示した説明図である。It is explanatory drawing which showed the operation content of the setting change process task. CPU11が起動直後に実行するブート処理を表すフローチャートである。It is a flowchart showing the boot process which CPU11 performs immediately after starting. DHCPクライアント処理タスクにより実現される処理を表すフローチャートである。It is a flowchart showing the process implement | achieved by a DHCP client process task. DHCPクライアント処理タスクにより実現されるアドレス取得処理を表すフローチャートである。It is a flowchart showing the address acquisition process implement | achieved by the DHCP client process task. 通信制御部25が実行する受信制御処理を表すフローチャートである。4 is a flowchart illustrating a reception control process executed by a communication control unit 25.

符号の説明Explanation of symbols

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.
前記処理実行手段は、当該通信装置に設定したアドレスの有効期限が経過する前に、前記特定種の装置と通信して、当該通信装置にアドレスを設定する処理を、繰返し実行する構成にされていることを特徴とする請求項1記載の通信装置。 The process execution means is configured to repeatedly execute the process of communicating with the specific type of device and setting the address in the communication device before the expiration date of the address set in the communication device elapses. The communication apparatus according to claim 1, wherein: 前記データ判断手段は、前記受信データが、前記特定種の装置とのデータ通信に用いられる所定のポートを宛先として送信されてきたデータである場合に、当該受信データが、前記ネットワーク上のアドレスを当該通信装置に設定するのに必要なデータであると判断する構成にされていることを特徴とする請求項1又は請求項2記載の通信装置。The data determination means, when the received data is data transmitted with a predetermined port used for data communication with the specific type of device as a destination, the received data indicates an address on the network. 3. The communication apparatus according to claim 1, wherein the communication apparatus is configured to determine that the data is necessary for setting in the communication apparatus. 前記特定種の装置は、DHCP(Dynamic Host Configuration Protocol)サーバであることを特徴とする請求項1〜請求項3のいずれかに記載の通信装置。The communication device according to claim 1, wherein the specific type of device is a DHCP (Dynamic Host Configuration Protocol) server. 前記受付判断手段は、前記ネットワークインタフェースが受信したデータが、予め設定された拒否対象のアドレスが割り当てられた装置から送信されてきたデータである場合には、このデータを受け付けないと判断し、前記ネットワークインタフェースが受信したデータが、前記拒否対象のアドレスが割り当てられた装置から送信されてきたデータではない場合には、このデータを受け付けると判断する構成にされていることを特徴とする請求項1〜請求項4のいずれかに記載の通信装置。 The reception determination means determines that the data received by the network interface is not received when the data transmitted from a device to which a preset address to be rejected is assigned , claim data that the network interface has received, wherein when the address of the rejected target assigned device not data sent from is characterized by being a configuration to determine that accepts this data 1 The communication apparatus according to claim 4 . 前記受付判断手段は、前記ネットワークインタフェースが受信したデータが、予め設定された受付対象のアドレスが割り当てられた装置から送信されてきたデータである場合には、このデータを受け付けると判断し、前記ネットワークインタフェースが受信したデータが、前記受付対象のアドレスが割り当てられた装置から送信されてきたデータではない場合には、このデータを受け付けないと判断する構成にされていることを特徴とする請求項1〜請求項4のいずれかに記載の通信装置。 If the data received by the network interface is data transmitted from a device to which a preset reception target address is assigned , the reception determination unit determines that the data is received, and the network The data received by the interface is configured to determine that the data is not accepted when the data is not transmitted from a device to which the address to be accepted is assigned. The communication apparatus according to claim 4 . 前記第一実行制御手段は、当該通信装置の起動後、当該通信装置に、前記アドレスが初めて設定されるまでの期間には、前記受付判断手段による判断結果に依らず、前記ネットワークインタフェースが受信したデータを受け付けて、前記ネットワークインタフェースが受信したデータに基づく処理を、前記処理実行手段に実行させる構成にされていることを特徴とする請求項1〜請求項6のいずれかに記載の通信装置。The first execution control means receives the network interface during the period until the address is first set in the communication apparatus after the communication apparatus is activated, regardless of the determination result by the reception determination means. The communication apparatus according to claim 1, wherein the communication apparatus is configured to receive data and cause the process execution unit to execute a process based on the data received by the network interface. ネットワークインタフェースを備える通信装置のコンピュータに、In a computer of a communication device having 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;
前記ネットワークインタフェースが受信したデータを受け付けるか否かを、当該受信データの送信元装置に割り当てられたネットワーク上のアドレスに基づいて判断する受付判断手段と、  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
JP2005159972A 2005-05-31 2005-05-31 Communication device and program Expired - Fee Related JP4161981B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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