Patent ID: 8681703

Claim:
A communication device that includes an authentication unit that authenticates a wireless communication device depending on whether a predetermined authentication condition is satisfied when a connection request is received from the wireless communication device, and a relay unit that relays communication performed by the wireless communication device when the authentication unit successfully authenticates the wireless communication device, comprising: a first information reception unit that receives connected-terminal information held by other communication devices, the connected-terminal information including identification information identifying a wireless communication device which communication is relayable and receives identification information identifying the other communication devices; a recording unit that records the received connected-terminal information and the identification information identifying the other communication devices; a first judging unit that judges, when the connection request is received from the wireless communication device, whether the identification information identifying the wireless communication device is included in the recorded connected-terminal information; a permitting unit that permits relaying of communication performed by the wireless communication device when the identification information of the wireless communication device is included in the recorded connected-terminal information; a providing unit that provides, for the wireless communication device which communication is permitted by the permitting unit, the recorded identification information identifying the other communication devices; a second information reception unit that receives condition information which includes a predetermined authentication condition from the other communication devices; a second judging unit that judges whether a received condition information matches a predetermined authentication condition of own communication device; and a recording control unit that controls the recording unit to record, when the second judging unit judges that the received condition information matches the predetermined authentication condition of the own communication device, a relayable connected-terminal information held by other communication device which sends the condition information.