{"id":13577726,"url":"https://github.com/haesbaert/mdnsd","last_synced_at":"2026-02-25T17:09:19.966Z","repository":{"id":40329686,"uuid":"531141","full_name":"haesbaert/mdnsd","owner":"haesbaert","description":"Mdns daemon for OpenBSD.","archived":false,"fork":false,"pushed_at":"2026-01-29T20:13:54.000Z","size":3705,"stargazers_count":140,"open_issues_count":17,"forks_count":29,"subscribers_count":12,"default_branch":"master","last_synced_at":"2026-01-30T08:43:49.491Z","etag":null,"topics":["c","mdns","mdns-stack","openbsd","openmdns"],"latest_commit_sha":null,"homepage":"www.haesbaert.org/openmdns","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haesbaert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2010-02-23T00:04:50.000Z","updated_at":"2026-01-29T20:13:59.000Z","dependencies_parsed_at":"2022-08-18T18:30:45.495Z","dependency_job_id":null,"html_url":"https://github.com/haesbaert/mdnsd","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/haesbaert/mdnsd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesbaert%2Fmdnsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesbaert%2Fmdnsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesbaert%2Fmdnsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesbaert%2Fmdnsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haesbaert","download_url":"https://codeload.github.com/haesbaert/mdnsd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haesbaert%2Fmdnsd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29832100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T15:41:19.027Z","status":"ssl_error","status_checked_at":"2026-02-25T15:40:47.150Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","mdns","mdns-stack","openbsd","openmdns"],"created_at":"2024-08-01T15:01:23.859Z","updated_at":"2026-02-25T17:09:19.932Z","avatar_url":"https://github.com/haesbaert.png","language":"C","funding_links":[],"categories":["C","Third Party repositories"],"sub_categories":["Interviews with OpenBSD developers","Related projects"],"readme":"Copyright (c) 2010, Christiano F. Haesbaert \u003chaesbaert@haesbaert.org\u003e\n\n# Multicast Domain Name System for OpenBSD\n\n## Quickstart\n\nIf you're looking for a quickstart jump to the end of this document. \n\n## Intro\n\nThis is an attempt to bring native mdns/dns-sd to OpenBSD. Mainly cause all the other options suck and proper network browsing is a nice feature these days. \n\nMy goal is to first provide a solid mdns framework without the service-discovery capabilities which are much more complex. When that is working properly, work on service-discovery will begin, the architecture was designed in order to support it. So goals: \n\n* Have a mdns responder/querier as an user process (`mdnsd`).\n* Have integration with libc's resolver, read: make `gethostbyname` and friends resolve names through mdns.\n* Have an application interface so other software can publish names/services as they see fit.\n* Have a mdns control program, which is mainly a crude interface to the API. \n\n## MDNSD Design\n\nThe \"Multicast Domain Name System Daemon\" is an user process that runs without privileges, it binds to udp port 5353 and acts as the querier/responder for all mdns requests. By responder we understand who is responsible for answering mdns queries, and by querier the other way around, read: This is different from libc's unicast resolver, we *NEED* to cache answers and maintain state. \n\nAs most OpenBSD daemons, it drops privilege upon startup and none task requires super-user privilege. All work is done on a single process, my first design had a process per interface, but that became overkill and overcomplex. \n\nThe API is designed above Henning Brauer `imsg` framework, so we have a unix domain socket that listen to requests from other processes, much like `ripctl` and `ospfctl` do, but we need a fancier API.  We use libevent and all it's glorious features to have a proper unix daemon. \n\nThere is a routing socket in order to be notified when link goes up and down, or when an interface address changes, this is *required* in order to publish records, every time link comes up we need to re-probe for our records and things like that, we use as our main name the short name from /etc/myname in the .local domain. \n\nThe basic data flow would be: \n\n     __________                              _______  \n    | Programs | \u003c--Control Socket (API)--\u003e | MDNSD | \u003c-- Mcast Packets --\u003e\n     ----------                              -------\n\n## LIBMDNS Design (API)\n\nLibmdns is a shared library in which programs can link against in order to have mdns capabilities, like publishing services, browsing the network and so on, by now you can lookup resources, browse and publish services. All the library does is sending and receiving messages to `mdnsd` through the imsg framework.  The library should provides: \n\n* Means for looking up names. (DONE)\n* Means for publishing names. (DONE)\n* Means for browsing services (dns-service-discovery). (DONE)\n* Means for publishing services. (DONE) \n\nBy now no library is being used to make it easier for people to test `mdnsctl` (read no shared objecto), everything is being kept on `mdnsl.c` in `mdnsctl/`. \n\nOn libc integration: \n\nAfter a chat with nicm@ we have decided not to worry about libc right now, maybe never. See the README file on mdns-libc branch if you're curious. \n\n## MDNSCTL\n\nIt's a simple interface for the library, code is inspired in `ripctl`. By now you can use it to lookup hosts, and browse and publish services. \n\n## How do I use this thing ?\n\nInstall it from openbsd ports (net/openmdns) \n\nRun `mdnsd` on the desired interface: `mdnsd -d rl0` \n\nPlay with `mdnsctl`:\n\n\n     # Lookup a host as well as the HINFO record\n     mdnsctl lookup -h foobar.local\n     # Reverse lookup an address\n     mdnsctl rlookup 192.168.8.32\n     # Browse up all services in the local network\n     mdnsctl browse\n     # Browse and resolve all services\n     mdnsctl browse -r\n     # Browse and resolve all the http services in the local network\n     mdnsctl browse -r http tcp\n     # Publish a simple ftp service\n     mdnsctl publish myftp ftp tcp 21 \"user=foobar\"\n     # Proxy publish a https service that has www.mysite.com as the target\n     mdnsctl proxy mysite https tcp 443 www.mysite.com 12.3.45.6 \"user=foobar\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaesbaert%2Fmdnsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaesbaert%2Fmdnsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaesbaert%2Fmdnsd/lists"}