Patent ID: 8248961

Claim:
A communication apparatus comprising: a decision unit adapted to decide on a role as a communication parameter provider or a communication parameter accepter in a wireless network parameter sharing process when sharing communication parameters for a network with another apparatus, wherein the communication parameters comprise at least one of a network identifier, encryption scheme, encryption key, authentication scheme, and authentication key; a memory adapted to store information specifying roles of a plurality of communication layers corresponding to the role for when sharing the communication parameters; a sharing unit adapted to perform the wireless network parameter sharing process with said another apparatus in accordance with the role in the wireless network parameter sharing process decided on by the decision unit and share the communication parameters for the network; a forming unit adapted to form the network with said another apparatus based on the communication parameters shared at the sharing unit; a setting unit adapted to set roles in a plurality of communication layers of the network corresponding to the role in the wireless network parameter sharing process decided on by said decision unit based on the information stored in the memory, wherein the plurality of communication layers include at least one of a data link layer, an IP (Internet Protocol) layer, a transport layer, and an application layer.