Back to Site
Loading...
Searching...
No Matches
mdns.h File Reference
#include "socket.h"
#include "logger.h"
#include <string>
#include <vector>
#include <memory>
#include <functional>
#include <thread>
#include <atomic>
#include <mutex>
#include <chrono>
#include <map>
#include <cstdint>
#include <condition_variable>
#include <random>
Include dependency graph for mdns.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  librats::MdnsService
 
struct  librats::DnsHeader
 
struct  librats::DnsQuestion
 
struct  librats::DnsResourceRecord
 
struct  librats::DnsMessage
 
class  librats::MdnsClient
 

Namespaces

namespace  librats
 

Macros

#define LOG_MDNS_DEBUG(message)   LOG_DEBUG("mdns", message)
 
#define LOG_MDNS_INFO(message)   LOG_INFO("mdns", message)
 
#define LOG_MDNS_WARN(message)   LOG_WARN("mdns", message)
 
#define LOG_MDNS_ERROR(message)   LOG_ERROR("mdns", message)
 

Typedefs

using librats::MdnsServiceCallback = std::function< void(const MdnsService &service, bool is_new)>
 

Enumerations

enum class  librats::DnsRecordType : uint16_t {
  librats::A = 1 , librats::PTR = 12 , librats::TXT = 16 , librats::AAAA = 28 ,
  librats::SRV = 33
}
 
enum class  librats::DnsRecordClass : uint16_t { librats::CLASS_IN = 1 , librats::CLASS_IN_FLUSH = 0x8001 }
 
enum class  librats::MdnsFlags : uint16_t { librats::QUERY = 0x0000 , librats::RESPONSE = 0x8000 , librats::AUTHORITATIVE = 0x8400 }
 

Variables

const uint16_t librats::MDNS_PORT = 5353
 
const std::string librats::MDNS_MULTICAST_IPv4 = "224.0.0.251"
 
const std::string librats::MDNS_MULTICAST_IPv6 = "ff02::fb"
 
const std::string librats::LIBRATS_SERVICE_TYPE = "_librats._tcp.local."
 
const std::string librats::LIBRATS_SERVICE_INSTANCE_SUFFIX = ".local."
 

Macro Definition Documentation

◆ LOG_MDNS_DEBUG

#define LOG_MDNS_DEBUG (   message)    LOG_DEBUG("mdns", message)

Definition at line 20 of file mdns.h.

◆ LOG_MDNS_ERROR

#define LOG_MDNS_ERROR (   message)    LOG_ERROR("mdns", message)

Definition at line 23 of file mdns.h.

◆ LOG_MDNS_INFO

#define LOG_MDNS_INFO (   message)    LOG_INFO("mdns", message)

Definition at line 21 of file mdns.h.

◆ LOG_MDNS_WARN

#define LOG_MDNS_WARN (   message)    LOG_WARN("mdns", message)

Definition at line 22 of file mdns.h.