A system and method for providing advertisements in a peer-to-peer
networking environment is described. In one embodiment, the peer-to-peer
protocols may use advertisements to describe and publish the existence of
peer resources. An advertisement may be defined as a structured, language
neutral metadata structure that names, describes, and publishes the
existence of a peer-to-peer platform resource, such as a peer, a peer
group, a pipe, or a service. In one embodiment, user-defined
advertisement subtypes (for example, using XML schemas) may be formed
from these basic types. A peer in a peer-to-peer network may publish a
resource advertisement to make the resource corresponding to the
advertisement available to other peers on the network. Peers may discover
published advertisements by broadcasting discovery query messages. Other
peers may respond to discovery query messages by sending response
messages that may include advertisements.