There is formally no such thing as an ‘ESSID’ in 802.11 standards. In 802.11 standard documents, the logical network (ESS or independent-BSS) service set identifier is simply abbreviated ‘SSID’,irrespective of whether an SSID identifies an infrastructure-BSS’s ESS, or the peer-to-peer network of an independent-BSS.
An extended service set (ESS) is a set of one or more infrastructure basic service sets on a common logical network segment (i.e. same IP subnet and VLAN). Key to the concept is that the participating basic service sets appear as a single network to the logical link control layer. Thus, from the perspective of the logical link control layer, stations within an ESS may communicate with one another, and mobile stations may move transparently from one participating BSS to another (within the same ESS).
Extended service sets make possible distribution services such as centralized authentication and seamless roaming between infrastructure-BSSs. From the perspective of the link layer, all stations within an ESS are all on the same link, and transfer from one BSS to another is transparent to logical link control.
The basic service sets formed in wireless ad-hoc networks are, by definition, independent from other BSSs, and an independent-BSS cannot therefore be part of an extended infrastructure. In that formal sense an independent-BSS has no extended service set.
However, the network packets of both independent-BSSs and infrastructure-BSSs have a logical network service set identifier (described below), and the logical link control does not distinguish between the use of that field to name an ESS network, and the use of that field to name a peer-to-peer ad-hoc network. The two are effectively indistinguishable at the logical link control layer level.