+
+ /**
+ * Flags.
+ */
+ struct GNUNET_TUN_DnsFlags flags;
+
+ /**
+ * Number of queries.
+ */
+ uint16_t query_count GNUNET_PACKED;
+
+ /**
+ * Number of answers.
+ */
+ uint16_t answer_rcount GNUNET_PACKED;
+
+ /**
+ * Number of authoritative answers.
+ */
+ uint16_t authority_rcount GNUNET_PACKED;
+
+ /**
+ * Number of additional records.
+ */
+ uint16_t additional_rcount GNUNET_PACKED;
+};
+
+
+/**
+ * Payload of DNS SOA record (header).
+ */
+struct GNUNET_TUN_DnsSoaRecord
+{
+ /**
+ * The version number of the original copy of the zone. (NBO)
+ */
+ uint32_t serial GNUNET_PACKED;
+
+ /**
+ * Time interval before the zone should be refreshed. (NBO)
+ */
+ uint32_t refresh GNUNET_PACKED;
+
+ /**
+ * Time interval that should elapse before a failed refresh should
+ * be retried. (NBO)
+ */
+ uint32_t retry GNUNET_PACKED;
+
+ /**
+ * Time value that specifies the upper limit on the time interval
+ * that can elapse before the zone is no longer authoritative. (NBO)
+ */
+ uint32_t expire GNUNET_PACKED;
+
+ /**
+ * The bit minimum TTL field that should be exported with any RR
+ * from this zone. (NBO)
+ */
+ uint32_t minimum GNUNET_PACKED;
+};
+
+
+/**
+ * Payload of DNS SRV record (header).
+ */
+struct GNUNET_TUN_DnsSrvRecord
+{
+
+ /**
+ * Preference for this entry (lower value is higher preference). Clients
+ * will contact hosts from the lowest-priority group first and fall back
+ * to higher priorities if the low-priority entries are unavailable. (NBO)
+ */
+ uint16_t prio GNUNET_PACKED;
+
+ /**
+ * Relative weight for records with the same priority. Clients will use
+ * the hosts of the same (lowest) priority with a probability proportional
+ * to the weight given. (NBO)
+ */
+ uint16_t weight GNUNET_PACKED;
+
+ /**
+ * TCP or UDP port of the service. (NBO)
+ */
+ uint16_t port GNUNET_PACKED;
+
+ /* followed by 'target' name */
+};
+
+
+/**
+ * Payload of DNS CERT record.
+ */
+struct GNUNET_TUN_DnsCertRecord
+{
+
+ /**
+ * Certificate type
+ */
+ uint16_t cert_type;
+
+ /**
+ * Certificate KeyTag
+ */
+ uint16_t cert_tag;
+
+ /**
+ * Algorithm
+ */
+ uint8_t algorithm;
+
+ /* Followed by the certificate */
+};
+
+
+/**
+ * Payload of DNSSEC TLSA record.
+ * http://datatracker.ietf.org/doc/draft-ietf-dane-protocol/
+ */
+struct GNUNET_TUN_DnsTlsaRecord
+{
+
+ /**
+ * Certificate usage
+ * 0: CA cert
+ * 1: Entity cert
+ * 2: Trust anchor
+ * 3: domain-issued cert
+ */
+ uint8_t usage;
+
+ /**
+ * Selector
+ * What part will be matched against the cert
+ * presented by server
+ * 0: Full cert (in binary)
+ * 1: Full cert (in DER)
+ */
+ uint8_t selector;
+
+ /**
+ * Matching type (of selected content)
+ * 0: exact match
+ * 1: SHA-256 hash
+ * 2: SHA-512 hash
+ */
+ uint8_t matching_type;
+
+ /**
+ * followed by certificate association data
+ * The "certificate association data" to be matched.
+ * These bytes are either raw data (that is, the full certificate or
+ * its SubjectPublicKeyInfo, depending on the selector) for matching
+ * type 0, or the hash of the raw data for matching types 1 and 2.
+ * The data refers to the certificate in the association, not to the
+ * TLS ASN.1 Certificate object.
+ *
+ * The data is represented as a string of hex chars
+ */
+};
+
+
+/**
+ * Payload of GNS VPN record
+ */
+struct GNUNET_TUN_GnsVpnRecord
+{
+ /**
+ * The peer to contact
+ */
+ struct GNUNET_PeerIdentity peer;
+
+ /**
+ * The protocol to use
+ */
+ uint16_t proto;
+
+ /* followed by the servicename */
+};
+
+
+/**
+ * DNS query prefix.
+ */
+struct GNUNET_TUN_DnsQueryLine
+{
+ /**
+ * Desired type (GNUNET_DNSPARSER_TYPE_XXX). (NBO)
+ */
+ uint16_t type GNUNET_PACKED;
+
+ /**
+ * Desired class (usually GNUNET_TUN_DNS_CLASS_INTERNET). (NBO)
+ */
+ uint16_t dns_traffic_class GNUNET_PACKED;
+};
+
+
+/**
+ * General DNS record prefix.
+ */
+struct GNUNET_TUN_DnsRecordLine
+{
+ /**
+ * Record type (GNUNET_DNSPARSER_TYPE_XXX). (NBO)
+ */
+ uint16_t type GNUNET_PACKED;
+
+ /**
+ * Record class (usually GNUNET_TUN_DNS_CLASS_INTERNET). (NBO)
+ */
+ uint16_t dns_traffic_class GNUNET_PACKED;
+
+ /**
+ * Expiration for the record (in seconds). (NBO)
+ */
+ uint32_t ttl GNUNET_PACKED;
+
+ /**
+ * Number of bytes of data that follow. (NBO)
+ */
+ uint16_t data_len GNUNET_PACKED;