};
+/**
+ * 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/
/* followed by the servicename */
};
+
/**
* DNS query prefix.
*/
/**
* ICMP header.
*/
-struct GNUNET_TUN_IcmpHeader {
+struct GNUNET_TUN_IcmpHeader
+{
uint8_t type;
uint8_t code;
uint16_t crc GNUNET_PACKED;
- union {
+ union
+ {
/**
* ICMP Echo (request/reply)
*/
- struct {
+ struct
+ {
uint16_t identifier GNUNET_PACKED;
uint16_t sequence_number GNUNET_PACKED;
} echo;
/**
* ICMP Destination Unreachable (RFC 1191)
*/
- struct ih_pmtu {
+ struct ih_pmtu
+ {
uint16_t empty GNUNET_PACKED;
uint16_t next_hop_mtu GNUNET_PACKED;
/* followed by original IP header + first 8 bytes of original IP datagram */
GNUNET_TUN_ipv4policy2regex (const char *policy);
+/**
+ * Hash the service name of a hosted service to the
+ * hash code that is used to identify the service on
+ * the network.
+ *
+ * @param service_name a string
+ * @param hc corresponding hash
+ */
+void
+GNUNET_TUN_service_name_to_hash (const char *service_name,
+ struct GNUNET_HashCode *hc);
+
#endif