The gentlemen spies were out in force, crowded around a table of canapes at the Chinese Embassy. Maj. Gen. Zhang Wenyi, who jogs six miles a day, plays bridge with a passion and loves ice cream, was pouring tots of maotai for four high-ranking U.S. Air Force officers.

Across the room two white-suited Russians, Lt. Col. Roman F. Yepifanov and Lt. Col. Vyacheslav K. Pavlov, were deep in a discussion of Russian history with another American Air Force officer, Lt. Col. David Miller. A few paces away a knot of bemedaled generals from Brazil, Argentina, Chile and Colombia were chatting in Spanish, while military men from Yugoslavia, Sri Lanka, and Cameroon, to mention a few, moved through the uniformed throng celebrating China's Armed Forces Day.

The mood was festive and the chitchat polite but as usual the finely tuned radar of each guest was scanning the room for useful gossip about weapons and war. It was another gathering of one of Washington's most select and least publicized diplomatic fraternities: its foreign military attaches.

Washington's 400 or so military diplomats are interlopers of a peculiar sort -- "overt spies" who are charged with finding out as much as they can about their host country's military establishment without engaging in clandestine or illegal activities.

Modern electronic gadgetry and a penchant for openness in military matters in this country have taken much of the cloak-and-dagger out of their jobs. As a group they are often overshadowed by their political counterparts and as one historian put it, known more for "their indiscretions" than their achievements.

Still, attaches are an important link between the Pentagon and foreign capitals, a network that complements and sometimes rivals those maintained by the State Department. It is a network gaining in importance in a world where arms sales are at record volumes and conflicts with highly advanced weapons rage or smolder from El Salvador to the South Atlantic to Lebanon and Iraq.

The presence of the world's largest military attache community here reflects not only the United States' status as a superpower but also the fact that Washington is "the new information capital of the world," according to one publisher of military information. Or, as Egyptian defense attache Maj. Gen. Mohamed Abdel Aziz Kabil puts it, "I believe everything is cooked here, it's something like a big kitchen. Here everything is special."

As military men, attaches are cast onto the unfamiliar terrain of diplomacy and must operate in a society that often bears no resemblance to their own in its openness, its civilian control of the military and its democratic processes. As a result these soldiers, sailors and pilots tend to stick together in a close-knit fraternity (there are no female foreign military attaches here) whose camaraderie comes of shared interests and knowledge.

"We try to relate to one another as soldiers," said Canada's Lt. Col. Richard Macintosh. "We spend more time avoiding any discussions which would offend. We don't run up to the Argentine attaches for example and say, 'Why did you seize the Falklands?' We try to leave our political feelings out of our associations."

The military, naval and air attaches represent their armies, navies and air forces respectively and are accredited to the appropriate U.S. service branches. In addition, 56 countries also have defense attaches in Washington who are accredited to the U.S. Defense Intelligence Agency (DIA). They usually come from countries with whom the U.S. shares intelligence and so have access to classified material.

Each branch of the U.S. armed forces has a foreign liaison office for attaches accredited to them. These offices guide attaches through the Pentagon's bureaucracy, answer their requests, and give them briefings and tours of U.S. military installations. Foreign attaches from friendly countries and their immediate families can get free outpatient care at U.S. military hospitals -- a perk even foreign ambassadors do not have.

Like the ambassadorial corps, the attaches have "deans," an honor that comes with longevity of service in Washington. Besides a strong round of embassy receptions and parties which leads "some cynics to say we spend most of our time entertaining each other," according to Air Vice Marshal J. H. Newham, the Australian defense attache, the attaches have several social groups -- among them, the Washington Military Attache Association, the Services' Attaches Golf Association, the Services' Attaches Tennis Association and the Washington Area Air Attaches Association -- that all provide opportunities for the attaches to meet and mix whatever their countries' alliances might be.

Though these social calls are burdensome, most attaches regard them as part of the job. "The primary task of the military attache is to gather information valuable to your country, so when you go to receptions it's not just to enjoy yourself, but also to keep your ears and eyes open and learn . . . . Of course, you must be able to sift fact from fiction," said Sri Lanka's defense attache, Lt. Col. P.B.C. Dharmapala.

It is at such functions that national hostilities get suspended in the balms of alcohol and protocol. For example at the last Air Attache Association luncheon at Bolling Air Force Base, Turkey's air and defense attache, Brigadier Irfan Sarp, had to welcome new arrivals (with a tie) and say farewell to outgoing air attaches (with a silver tray). When it came time for Sarp to present a tray to Col. Nicolaos S. Pappas, the departing air attache of Greece, a country with which Turkey has had less than friendly relations, everyone began laughing.

As they shook hands, everyone laughed again.

"See you in Ankara," said Pappas. More laughter.

"We really are friends, really," said Sarp. Still more laughter.

Obviously the size of an embassy's military staff and the intelligence aspect of its attaches' job depends on the country it represents. At one end of the spectrum are major allies of the U.S. whose attaches here are often high-ranking officers at the twilight of their careers or those being groomed for big jobs back home. Former Israeli Chief of Staff Mordechai Gur and Egypt's Defense Minister Mohamed Abou Ghazala, for example, are former defense attaches here.

Britain's defense attache, Maj. Gen. Anthony Thomas Boam, presides over a staff of eight attaches and more than 100 civilians, including specialists in such things as deep-sea diving, weapons systems and atomic research. Like other major allies, much of Boam's responsiblities deal with coordinating joint military exercises with the U.S. and caring for the 450 British officers stationed with U.S. forces here.

Boam works long hours and is in demand as a speaker to U.S. civic groups. Two or three times a week he visits the Pentagon, where he enjoys a special place of privilege in the world of intelligence-sharing. "Our intelligence requirements are absolutely zero; information is exchanged," Boam says.

The Falklands War "made my job much easier. I was dealing with things I know about," Boam said, sitting behind a large desk draped with his Scots Guards tartan. "It's easier to have a straightforward military briefing than to deal with some nebulous political issue," he added.

During that war Boam "played a key role in getting U.S. equipment into Britain and keeping the Americans briefed," said one civilian who follows military affairs closely.

The attache channel was also vital on the Argentine side during that conflict, U.S. officials said. After the U.S. broke its neutrality to side with Britain, the Pentagon told the Argentine attaches here that this should not affect their own relationship. "We wanted them to know there was still this channel open to them," said DIA's former foreign liaison Lt. Col. John McFadden.

At the other end of the attache spectrum are those military representatives of the Soviet Union and its allies in the Warsaw Pact. According to U.S. military officials and other observers these attaches engage in the most traditional kind of spying here. Last February, for example, the senior Soviet military attache, Maj. Gen. Vasiliy I. Chitov, was expelled after FBI agents caught him red-handed trying to buy secret information.

Like their political counterparts here, and like U.S. personnel stationed in Moscow, the communist military attaches in Washington are restricted in their physical movements in the U.S. and are not allowed onto American bases except for special occasions. As Soviet assistant air attache Lt. Col. Anatoliy Y. Troyan said plaintively and pointedly within earshot of a U.S. Air Force officer during the air attache luncheon at Bolling, "Oh this is the only base I have been to and I think it is the superior one because it is the only one."

Most attaches fall between these two extremes. As Pakistan's defense attache, the urbane and articulate Brigadier Mahmud Ali Durrani put it, "I cannot get half the intelligence the man from Great Britain gets, even if I stood on my head. But what I get, the Soviet Union attaches could not even dream of getting."

Attaches of every political persuasion downplay their espionage role, preferring such terms as "liaisons" and "observers." It is true that many of their activities are nothing more than what they appear to be on the surface, but as Howard Fish, former deputy assistant secretary of state for security assistance and arms sales, notes, the underlying purpose is always to lubricate the way for more intelligence.

"Military attaches give military advice to their ambassadors; they promote arms sales and the exchange of people; but they do all these things to get additional entree for intelligence-sharing, even if it's in-house gossip like who are the rising stars in the Pentagon, who makes the decisions and the state of squabbling between Army and Navy," Fish said.

Military historian Alan Gropman of the National War College is even more direct: "An attache is really a spy, whether he is on your side or not."

Advances in electronic and satellite spying, the communicatons revolution as well as the openness of American society have all undercut the attache's traditional role as purveyors of first-hand secret information and as one congressional aide said, allowed them "to come out of the closet."

"We cannot compete with the mass media," said Japanese defense attache Maj. Gen. Toshiyuki Shikata. "They are faster than us, in quality and quantity, it is much better than we can get . . . . So much information is released to the public, we do not need to sneak around to find out top secrets."

But this surfeit of information does not always make their jobs easier. "You get so much information, you don't know what to do with it. starting with the paper in the morning, you can get choked," said Canada's Macintosh.

"Attaches don't want to have their superiors read something in the papers first," said Fish. "It's a black mark against them if this happens. They can spend a lot of time gathering congressional reports, specialized press publications and can work their tails off collecting this which is fairly unglamorous work. There is an enormous amount of data to read and screen. It's more arduous work than if they were assigned to a country where it is not so easy to get information and they had to struggle and what they got would be significant just because they got it."

Many attaches are concerned with something else: that the United States releases too much military material for its own good. "Your country is very open and I feel very worried about that," said Egypt's Kabil, expressing the nearly universal view of attaches. "Everything you can find it, so you facilitate information to your enemy . . . . Let the Russians spend some time; let them make an effort. Don't give them everything in a spoon. They will find it out, but after a while, five minutes in a war is important."

Kabil said that after he gave a speech on desert armor warfare at Fort Bragg, he was telephoned by a Soviet attache and asked for a copy of the speech. He declined, saying he had spoken from notes.

Another development that has altered the role of the military attache in recent decades has been the explosion in global arms sales. Washington is a major supplier to over 120 countries with sales that have gone from $4.9 billion in 1971 to over $20 billion this year, according to Pentagon figures.

For many attaches, negotiating these arms contracts is a big part of their job. Some countries, among them Egypt, Israel and Brazil to mention a few, buy so much that they have set up separate arms procurement offices, sometimes with larger staffs than those of the military section of the embassy.

As a result, weapons technology and "performance" is now the prime type of intelligence many attaches are after, as was evident during the Falklands conflict. Noting his country buys "on the order of" one billion dollars of U.S. military equipment each year, Australia's Newham, explained, We are here to pick brains in military technology."

For some attaches, intelligence on the U.S. is a second priority and Washington is more important as a listening post to find out what rivals are up to. As Guatemala's Col. Mario Paiz-Bolanos Paiz said: "Any Latin American attaches, they are not spies. Maybe we spy on each other, you know, someone says, 'Honduras bought 10 tanks,' and someone else asks, 'They did? What for?' "

Whatever their main interests, military attaches regard Washington as a plum assignment not only for the boost it gives their careers but also for its new perspective. As Japan's Shikata explained, "Here, we can observe the Japanese Defense Force from outside Japan. In Tokyo, we are like fish, who cannot see the water they are in. But if a fish gets out of the water, the fish can see the entire world he has left."

But not all military men adjust well to the life of a diplomat-spy. At the Chinese Armed Forces Day party the Soviet Union's assistant air attache, Lt. Col. Yepifanov, was disgruntled. "You know, I don't like this job; I have nothing to do except this, alcohol and protocol," he said holding up his glass. "I am a pilot and once you get the feeling of the stick in your hand and of flying through the air, it's a feeling you never forget. I liked being in command of a squadron. I had a job then."