c) Diplomatic Espionage
Diplomacy is closely linked to espionage or gathering of intelligence. Embassies are bases for both diplomats and spies, and some diplomats are essentially openly acknowledged spies.
For instance, the job of military attachés includes learning as much as possible about the military of the nation to which they are assigned. They do not try to hide this role and, as such, are only invited to events allowed by their hosts, such as military parades or air shows.
There are also deep-cover spies operating in many embassies. These individuals are given fake positions at the embassy, but their main task is to illegally gather intelligence, usually by coordinating spy rings of locals or other spies.
For the most part, spies operating out of embassies gather little intelligence themselves and their identities tend to be known by the opposition. If discovered, these diplomats can be expelled from an embassy, but for the most part counter-intelligence agencies prefer to keep these agents in situ and under close monitoring.
The information gathered by spies plays an increasingly important role in diplomacy. Arms-control treaties would be impossible without the power of reconnaissance satellites and agents to monitor compliance. Information gleaned from espionage is useful in almost all forms of diplomacy, everything from trade agreements to border disputes.