All Projects → haesbaert → Mdnsd

haesbaert / Mdnsd

Mdns daemon for OpenBSD.

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Mdnsd

Pyroute2
Python Netlink and PF_ROUTE library — network setup and monitoring
Stars: ✭ 658 (+558%)
Mutual labels:  openbsd
Obsd
Redacted config files
Stars: ✭ 34 (-66%)
Mutual labels:  openbsd
Ruby Vmstat
A focused and fast library to gather memory, cpu, network, load avg and disk information
Stars: ✭ 68 (-32%)
Mutual labels:  openbsd
Dbxfs
User-space file system for Dropbox
Stars: ✭ 673 (+573%)
Mutual labels:  openbsd
Arcan
Arcan - [Display Server, Multimedia Framework, Game Engine] -> "Desktop Engine"
Stars: ✭ 885 (+785%)
Mutual labels:  openbsd
Login otp
OTP authentication for OpenBSD implementing RFC 6238 and RFC 4226.
Stars: ✭ 43 (-57%)
Mutual labels:  openbsd
Rdrview
Firefox Reader View as a command line tool
Stars: ✭ 622 (+522%)
Mutual labels:  openbsd
Openbsd Cookbooks
Setup environment in OpenBSD using Ansible playbook
Stars: ✭ 80 (-20%)
Mutual labels:  openbsd
Meta Data
meta-data datasource for OpenBSD vmd(8)
Stars: ✭ 20 (-80%)
Mutual labels:  openbsd
Vpn At Home
1-click, self-hosted deployment of OpenVPN with DNS ad blocking sinkhole
Stars: ✭ 1,106 (+1006%)
Mutual labels:  openbsd
Duf
Disk Usage/Free Utility - a better 'df' alternative
Stars: ✭ 7,240 (+7140%)
Mutual labels:  openbsd
Dank Selfhosted
Automated solution for hosting email, web, DNS, XMPP, and ZNC on OpenBSD.
Stars: ✭ 800 (+700%)
Mutual labels:  openbsd
Wasmjit
Small Embeddable WebAssembly Runtime
Stars: ✭ 1,063 (+963%)
Mutual labels:  openbsd
Solo5
A sandboxed execution environment for unikernels
Stars: ✭ 659 (+559%)
Mutual labels:  openbsd
Zapret
Обход DPI в linux
Stars: ✭ 1,148 (+1048%)
Mutual labels:  openbsd
Htop
htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
Stars: ✭ 5,626 (+5526%)
Mutual labels:  openbsd
Awesome Unix
All the UNIX and UNIX-Like: Linux, BSD, macOS, Illumos, 9front, and more.
Stars: ✭ 973 (+873%)
Mutual labels:  openbsd
Snap
OpenBSD upgrade tool (OpenBSD,Shell)
Stars: ✭ 92 (-8%)
Mutual labels:  openbsd
Qtfm
Qt File Manager
Stars: ✭ 73 (-27%)
Mutual labels:  openbsd
O
🌀 Text editor suitable for writing git commit messages and editing Markdown files. Can build executables and jump to errors at the press of `ctrl-space`, for several programming languages. Can format code with `ctrl-w`. Provides general syntax highlighting, rainbow parenthesis and cut/paste portals. o is intentionally limited to VT100.
Stars: ✭ 54 (-46%)
Mutual labels:  openbsd

Copyright (c) 2010, Christiano F. Haesbaert [email protected]

Multicast Domain Name System for OpenBSD

Quickstart

If you're looking for a quickstart jump to the end of this document.

Intro

This 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.

My 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:

  • Have a mdns responder/querier as an user process (mdnsd).
  • Have integration with libc's resolver, read: make gethostbyname and friends resolve names through mdns.
  • Have an application interface so other software can publish names/services as they see fit.
  • Have a mdns control program, which is mainly a crude interface to the API.

MDNSD Design

The "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.

As 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.

The 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.

There 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.

The basic data flow would be:

 __________                              _______  
| Programs | <--Control Socket (API)--> | MDNSD | <-- Mcast Packets -->
 ----------                              -------

LIBMDNS Design (API)

Libmdns 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:

  • Means for looking up names. (DONE)
  • Means for publishing names. (DONE)
  • Means for browsing services (dns-service-discovery). (DONE)
  • Means for publishing services. (DONE)

By 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/.

On libc integration:

After a chat with [email protected] we have decided not to worry about libc right now, maybe never. See the README file on mdns-libc branch if you're curious.

MDNSCTL

It'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.

How do I use this thing ?

Install it from openbsd ports (net/openmdns)

Run mdnsd on the desired interface: mdnsd -d rl0

Play with mdnsctl:

 # Lookup a host as well as the HINFO record
 mdnsctl lookup -h foobar.local
 # Reverse lookup an address
 mdnsctl rlookup 192.168.8.32
 # Browse up all services in the local network
 mdnsctl browse
 # Browse and resolve all services
 mdnsctl browse -r
 # Browse and resolve all the http services in the local network
 mdnsctl browse -r http tcp
 # Publish a simple ftp service
 mdnsctl publish myftp ftp tcp 21 "user=foobar"
 # Proxy publish a https service that has www.mysite.com as the target
 mdnsctl proxy mysite https tcp 443 www.mysite.com 12.3.45.6 "user=foobar"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].