A method for controlling a network device includes a receiving step of
receiving a data packet complying with a predetermined protocol via a
network, a setting step of setting recovery conditions corresponding to
the protocol of the received data packet, and a recovering step of
recovering the network device from a power saving condition according to
the recovery conditions set in the setting step.