diff options
Diffstat (limited to 'avahi-daemon')
-rw-r--r-- | avahi-daemon/example.service | 2 | ||||
-rw-r--r-- | avahi-daemon/main.c | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/avahi-daemon/example.service b/avahi-daemon/example.service index a5f9071..3df961c 100644 --- a/avahi-daemon/example.service +++ b/avahi-daemon/example.service @@ -14,7 +14,7 @@ <service> <type>_telnet._tcp</type> <domain-name>local</domain-name> - <host-name>ecstasy.local</host-name> + <host-name>fuck.local</host-name> <port>23</port> <txt-record>foo=bar</txt-record> <txt-record>waldo=buzz</txt-record> diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index 4a8d44d..d59e9fb 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -49,6 +49,26 @@ static void server_callback(AvahiServer *s, AvahiServerState state, gpointer use } } +static void help(FILE *f, const gchar *argv0) { + fprintf(f, + "%s [options]\n" + " -h --help Show this help\n" + " -D --daemon Daemonize after startup\n" + " -k --kill Kill a running daemon\n" + " -v --version Show version\n", + argv0); +} + +static gint parse_command_line(AvahiServerConfig *config, int argc, char *argv[]) { + + return 0; +} + +static gint load_config_file(AvahiServerConfig *config) { + + return 0; +} + int main(int argc, char *argv[]) { GMainLoop *loop = NULL; gint r = 255; @@ -56,6 +76,12 @@ int main(int argc, char *argv[]) { avahi_server_config_init(&config); + if (load_config_file(&config) < 0) + goto finish; + + if (parse_command_line(&config, argc, argv) < 0) + goto finish; + loop = g_main_loop_new(NULL, FALSE); if (simple_protocol_setup(NULL) < 0) |