summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-06-18 16:18:49 +0000
committerLennart Poettering <lennart@poettering.net>2005-06-18 16:18:49 +0000
commit768d6a386735d3a0805547a2de728886f2aa8798 (patch)
treea74635e23ba8677502fbefd2831333def0aa61ad /avahi-core
parent964e9764b0ea8a7580bbdecb40ac2b89f4d2858c (diff)
* rename the configuration variables register_xxx and announce_xxx to publish_xxx
* implement command line parsing and configuration file parsing * implement daemonizing support (partially) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@127 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/avahi-reflector.c8
-rw-r--r--avahi-core/core.h12
-rw-r--r--avahi-core/iface.c4
-rw-r--r--avahi-core/server.c22
4 files changed, 23 insertions, 23 deletions
diff --git a/avahi-core/avahi-reflector.c b/avahi-core/avahi-reflector.c
index 60e19b6..7af0dd4 100644
--- a/avahi-core/avahi-reflector.c
+++ b/avahi-core/avahi-reflector.c
@@ -36,10 +36,10 @@ int main(int argc, char*argv[]) {
GMainLoop *loop;
avahi_server_config_init(&config);
- config.register_hinfo = FALSE;
- config.register_addresses = FALSE;
- config.register_workstation = FALSE;
- config.announce_domain = FALSE;
+ config.publish_hinfo = FALSE;
+ config.publish_addresses = FALSE;
+ config.publish_workstation = FALSE;
+ config.publish_domain = FALSE;
config.use_ipv6 = FALSE;
config.enable_reflector = TRUE;
diff --git a/avahi-core/core.h b/avahi-core/core.h
index 6e8d9dd..c9274c4 100644
--- a/avahi-core/core.h
+++ b/avahi-core/core.h
@@ -75,14 +75,14 @@ typedef struct AvahiServerConfig {
gchar *domain_name; /**< Default domain name. If left empty defaults to .local */
gboolean use_ipv4; /**< Enable IPv4 support */
gboolean use_ipv6; /**< Enable IPv6 support */
- gboolean register_hinfo; /**< Register a HINFO record for the host containing the local OS and CPU type */
- gboolean register_addresses; /**< Register A, AAAA and PTR records for all local IP addresses */
- gboolean register_workstation; /**< Register a _workstation._tcp service */
+ gboolean publish_hinfo; /**< Register a HINFO record for the host containing the local OS and CPU type */
+ gboolean publish_addresses; /**< Register A, AAAA and PTR records for all local IP addresses */
+ gboolean publish_workstation; /**< Register a _workstation._tcp service */
+ gboolean publish_domain; /**< Announce the local domain for browsing */
gboolean check_response_ttl; /**< If enabled the server ignores all incoming responses with IP TTL != 255 */
- gboolean announce_domain; /**< Announce the local domain for browsing */
- gboolean use_iff_running; /**< Require IFF_RUNNING on local network interfaces. This is the official way to check for link beat. Unfortunately this doesn't work with all drivers. So bettere leave this off. */
+ gboolean use_iff_running; /**< Require IFF_RUNNING on local network interfaces. This is the official way to check for link beat. Unfortunately this doesn't work with all drivers. So bettere leave this off. */
gboolean enable_reflector; /**< Reflect incoming mDNS traffic to all local networks. This allows mDNS based network browsing beyond ethernet borders */
- gboolean ipv_reflect; /**< if enable_reflector is TRUE, enable/disable reflecting between IPv4 and IPv6 */
+ gboolean reflect_ipv; /**< if enable_reflector is TRUE, enable/disable reflecting between IPv4 and IPv6 */
} AvahiServerConfig;
/** Allocate a new mDNS responder object. */
diff --git a/avahi-core/iface.c b/avahi-core/iface.c
index 73f4cdf..7972a5c 100644
--- a/avahi-core/iface.c
+++ b/avahi-core/iface.c
@@ -45,7 +45,7 @@ static void update_address_rr(AvahiInterfaceMonitor *m, AvahiInterfaceAddress *a
if (avahi_interface_address_relevant(a) &&
!remove &&
- m->server->config.register_addresses &&
+ m->server->config.publish_addresses &&
(m->server->state == AVAHI_SERVER_RUNNING ||
m->server->state == AVAHI_SERVER_REGISTERING)) {
@@ -87,7 +87,7 @@ static void update_hw_interface_rr(AvahiInterfaceMonitor *m, AvahiHwInterface *h
update_interface_rr(m, i, remove);
if (!remove &&
- m->server->config.register_workstation &&
+ m->server->config.publish_workstation &&
(m->server->state == AVAHI_SERVER_RUNNING ||
m->server->state == AVAHI_SERVER_REGISTERING)) {
diff --git a/avahi-core/server.c b/avahi-core/server.c
index 1630b29..0c00658 100644
--- a/avahi-core/server.c
+++ b/avahi-core/server.c
@@ -484,7 +484,7 @@ static void reflect_response(AvahiServer *s, AvahiInterface *i, AvahiRecord *r,
return;
for (j = s->monitor->interfaces; j; j = j->interface_next)
- if (j != i && (s->config.ipv_reflect || j->protocol == i->protocol))
+ if (j != i && (s->config.reflect_ipv || j->protocol == i->protocol))
avahi_interface_post_response(j, r, flush_cache, NULL, TRUE);
}
@@ -511,7 +511,7 @@ static void reflect_query(AvahiServer *s, AvahiInterface *i, AvahiKey *k) {
return;
for (j = s->monitor->interfaces; j; j = j->interface_next)
- if (j != i && (s->config.ipv_reflect || j->protocol == i->protocol)) {
+ if (j != i && (s->config.reflect_ipv || j->protocol == i->protocol)) {
/* Post the query to other networks */
avahi_interface_post_query(j, k, TRUE);
@@ -533,7 +533,7 @@ static void reflect_probe(AvahiServer *s, AvahiInterface *i, AvahiRecord *r) {
return;
for (j = s->monitor->interfaces; j; j = j->interface_next)
- if (j != i && (s->config.ipv_reflect || j->protocol == i->protocol))
+ if (j != i && (s->config.reflect_ipv || j->protocol == i->protocol))
avahi_interface_post_probe(j, r, TRUE);
}
@@ -775,7 +775,7 @@ static void reflect_legacy_unicast_query_packet(AvahiServer *s, AvahiDnsPacket *
for (j = s->monitor->interfaces; j; j = j->interface_next)
if (avahi_interface_relevant(j) &&
j != i &&
- (s->config.ipv_reflect || j->protocol == i->protocol)) {
+ (s->config.reflect_ipv || j->protocol == i->protocol)) {
if (j->protocol == AF_INET && s->fd_legacy_unicast_ipv4 >= 0) {
avahi_send_dns_packet_ipv4(s->fd_legacy_unicast_ipv4, j->hardware->index, p, NULL, 0);
@@ -1105,7 +1105,7 @@ static void register_hinfo(AvahiServer *s) {
g_assert(s);
- if (!s->config.register_hinfo || s->hinfo_entry_group)
+ if (!s->config.publish_hinfo || s->hinfo_entry_group)
return;
s->hinfo_entry_group = avahi_entry_group_new(s, avahi_host_rr_entry_group_callback, NULL);
@@ -1136,7 +1136,7 @@ static void register_localhost(AvahiServer *s) {
static void register_browse_domain(AvahiServer *s) {
g_assert(s);
- if (!s->config.announce_domain || s->browse_domain_entry_group)
+ if (!s->config.publish_domain || s->browse_domain_entry_group)
return;
s->browse_domain_entry_group = avahi_entry_group_new(s, NULL, NULL);
@@ -1870,18 +1870,18 @@ AvahiServerConfig* avahi_server_config_init(AvahiServerConfig *c) {
g_assert(c);
memset(c, 0, sizeof(AvahiServerConfig));
- c->register_hinfo = TRUE;
- c->register_addresses = TRUE;
c->use_ipv6 = TRUE;
c->use_ipv4 = TRUE;
c->host_name = NULL;
c->domain_name = NULL;
c->check_response_ttl = TRUE;
- c->announce_domain = TRUE;
+ c->publish_hinfo = TRUE;
+ c->publish_addresses = TRUE;
+ c->publish_workstation = TRUE;
+ c->publish_domain = TRUE;
c->use_iff_running = FALSE;
c->enable_reflector = FALSE;
- c->ipv_reflect = FALSE;
- c->register_workstation = TRUE;
+ c->reflect_ipv = FALSE;
return c;
}