/* Given a GArray of WTAP_ENCAP_ types, return the per-file encapsulation type that would be needed to write out a file with those types. If there's only one type, it's that type, otherwise it's WTAP_ENCAP_PER_PACKET.  */
int wtap_dump_file_encap_type(const GArray *file_encaps)
/* Given a GArray of WTAP_ENCAP_ types, return the per-file encapsulation type that would be needed to write out a file with those types. If there's only one type, it's that type, otherwise it's WTAP_ENCAP_PER_PACKET.  */
int wtap_dump_file_encap_type(const GArray *file_encaps)
{
	int encap;
	encap = WTAP_ENCAP_PER_PACKET;
	if (file_encaps->len == 1) {
		encap = g_array_index(file_encaps, gint, 0);
	}
	return encap;
}