# Uncomment/modify the following options to configure WS-Discovery Host
#
# The syntax of this file is TOML (https://toml.io/en/).
#
# Any options specified on command line take precedence over options
# in this file 
#
# After editing this file you must reload WS-Discovery Host 
# if it is running via:
#
#{RELOAD_INSTRUCTIONS} 

###############################################################################
#
#        Networking options
#

# Specify on which interfaces wsddn will be listening on. If no interfaces 
# are specified, or the list is empty all suitable detected interfaces will be
# used. Loop-back interfaces are never used, even when explicitly specified. 
# For interfaces with IPv6 addresses, only link-local addresses will be used 
# for announcing the host on the network.

interfaces="wm0"

# Restrict communications to the given address family. Valid values 
# are "IPv4" or "IPv6" case-insensitive.

allowed_address_family="IPv4"

# Set the hop limit for multicast packets. The default is 1 which should 
# prevent packets from leaving the local network segment.

#hoplimit=1

# Set the source port for outgoing multicast messages, so that replies will
# use this as the destination port.
# This is useful for firewalls that do not detect incoming unicast replies
# to a multicast as part of the flow, so the port needs to be fixed in order
# to be allowed manually.

#source_port=12345

###############################################################################
#
#        Machine information
#

# WS-Discovery protocol requires your machine to have a unique identifier that 
# is stable across reboots or changes in networks.  
# By default, wsddn uses UUID version 5 with private namespace and the 
# host name of the machine. This will remain stable as long as the hostname 
# doesn't change. If desired, you can override this with a fixed UUID using 
# this option.

#uuid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

# Hostname to be reported to Windows machines. By default the local machine's 
# hostname (with domain part, if any, removed) is used. 
# If you set the value to ":NETBIOS:" then Netbios hostname will be used. 
# The Netbios hostname is either detected from SMB configuration, if found, or 
# produced by capitalizing normal machine hostname.

#hostname="DesktopPC"

# Report whether the host is a member of a given workgroup or domain.
# To specify a workgroup use "Workgroup/name" syntax.
# To specify a domain use "Domain/name"
# The "workgroup/" and "domain/" prefixes are not case sensitive.
# If not specified workgroup/domain membership is detected from SMB 
# configuration. If no SMB configuration is found it is set to a workgroup 
# named WORKGROUP. 

member_of="WORKGROUP"

# Path to smb.conf file to extract the SMB configuration from. This option is 
# not available on macOS. By default wsddn tries to locate this file on 
# its own.

smb_conf="/usr/pkg/etc/samba/smb.conf"

# Path to a custom metadata file. Custom metadata allows you to completely 
# replace the information normally supplied by `wsddn` to Windows with your own. 
# See https://github.com/gershnik/wsdd-native/blob/master/config/metadata/README.md
# for details about the metadata format and content.

#metadata="/path/to/metadata.xml"


###############################################################################
#
#        Behavior options
#

# Set verbosity of the log output. The default value is 4. Log levels range 
# from 0 (disable logging) to 6 (detailed trace). Passing values bigger than 6 
# is equivalent to 6

#log_level=4

# Set the path of log file. If not specified wsddn outputs the log 
# messages as follows
# - If invoked without any daemon flags: to standard output
# - If invoked with --systemd: to standard output, with systemd severity 
#   prefixes
# - If invoked with --launchd: to standard output
# - If invoked with --unixd: to /dev/null (no logging)

#log_file="/var/log/wsdd.log"

# macOS only. Send log output to system log (visible via Console app or
# log command line tool)
# Setting it to true option is mutually exclusive with log-file

#log_os_log=false

# Set the path to PID file. If not specified no PID file is written
# Send SIGHUP signal to the process ID in the PID file to reload 
# configuration.

#pid_file="/var/run/wsdd.pid"

# Set the identity under which the process that performs network communications
# will run. The value can be either just username or username:groupname. 
# If groupname is not specified, primary group of the username is used.
# If this option is not specified then the behavior is as follows:
# - If wsddn process is run under the root account it tries to use a special 
#   unprivileged account name (_wsddn:_wsddn on macOS, wsddn:wsddn otherwise)
#   The user and group are created if they do not exist. Any failures in these
#   steps stop the process.
# - Otherwise, wsddn uses the account it is run under.
# The net effect of these rules is that wsddn under no circumstances will 
# perform network communications under root account.

#user_group="username:groupname"

# Set the directory into which process that performs network communications
# should chroot into. This further limits any impact of potential network
# exploits into wsddn. If not specified the behavior is as follows
# - If wsddn process is run under the root account: use /var/empty on macOS
#   and /var/run/wsddn on other platforms 
#   This directory will be created if it does not exist. 
# - Otherwise: do not chroot
# Note: do not use external methods to chroot wsddn process (e.g. using
# launchd config plist). Non-networking parts of it need access to the 
# normal filesystem to detect things like SMB configuration etc. 

#chroot="/path/to/an/empty/dir"

