A communication apparatus for communicating within an ad-hoc communication-parameter configuration network for configuring a wireless network, the wireless network being configured by the exchange of wireless communication parameters, the apparatus comprising: a master device determination means configured to determine a communication apparatus on the ad-hoc communication-parameter configuration network as a master device of the communication-parameter configuration network; collection means for, if the master determination means determines that the communication apparatus is the master device, collecting information that indicates the capabilities of one or more other communication apparatuses existing on the ad-hoc communication-parameter configuration network; determination means for determining, based on information collected by the collection means, a providing apparatus that is to provide wireless communication parameters for forming the wireless network, and one or more reception apparatus that is to receive the wireless communication parameters from the providing apparatus, wherein the communication parameters include Service Set Identifiers, SSIDs, encryption method, encryption key, authentication method and authentication key; notification means for notifying a transfer direction of the wireless communication parameters to the one or more reception apparatus determined by the determination means; communication parameter transfer means configured to transfer communication parameters to the one or more reception apparatus in a case that the communication apparatus is determined to be the providing apparatus by the determination means; and communication-parameter configuration network termination means configured to exit the ad-hoc communication-parameter configuration network and to form the wireless network using the communication parameters transferred by the communication parameter transfer means. a master device determination means configured to determine a communication apparatus on the ad-hoc communication-parameter configuration network as a master device of the communication-parameter configuration network; collection means for, if the master determination means determines that the communication apparatus is the master device, collecting information that indicates the capabilities of one or more other communication apparatuses existing on the ad-hoc communication-parameter configuration network; determination means for determining, based on information collected by the collection means, a providing apparatus that is to provide wireless communication parameters for forming the wireless network, and one or more reception apparatus that is to receive the wireless communication parameters from the providing apparatus, wherein the communication parameters include Service Set Identifiers, SSIDs, encryption method, encryption key, authentication method and authentication key; notification means for notifying a transfer direction of the wireless communication parameters to the one or more reception apparatus determined by the determination means; communication parameter transfer means configured to transfer communication parameters to the one or more reception apparatus in a case that the communication apparatus is determined to be the providing apparatus by the determination means; and communication-parameter configuration network termination means configured to exit the ad-hoc communication-parameter configuration network and to form the wireless network using the communication parameters transferred by the communication parameter transfer means.