ident.c, yaid.c, yaid.h: Make `get_default_gw' be internal to `ident.c'.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 17 Oct 2012 04:40:57 +0000 (05:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 18 Oct 2012 09:46:04 +0000 (10:46 +0100)
Don't really need the diagnostics any more.

ident.c
yaid.c
yaid.h

diff --git a/ident.c b/ident.c
index ae3cf13..91c03aa 100644 (file)
--- a/ident.c
+++ b/ident.c
@@ -85,7 +85,7 @@ static int sockeq(const struct addrfamily *af,
                  const struct socket *sa, const struct socket *sb)
   { return (af->addreq(&sa->addr, &sb->addr) && sa->port == sb->port); }
 
                  const struct socket *sa, const struct socket *sb)
   { return (af->addreq(&sa->addr, &sb->addr) && sa->port == sb->port); }
 
-int get_default_gw(int af, union addr *a)
+static int get_default_gw(int af, union addr *a)
 {
   int fd;
   char buf[32768];
 {
   int fd;
   char buf[32768];
diff --git a/yaid.c b/yaid.c
index affa522..4bb44fd 100644 (file)
--- a/yaid.c
+++ b/yaid.c
@@ -668,8 +668,6 @@ static int make_listening_socket(int af, int port, const char *proto)
 int main(int argc, char *argv[])
 {
   int port = 113;
 int main(int argc, char *argv[])
 {
   int port = 113;
-  char buf[ADDRLEN];
-  union addr a;
 
   ego(argv[0]);
 
 
   ego(argv[0]);
 
@@ -686,11 +684,6 @@ int main(int argc, char *argv[])
        strerror(errno));
   }
 
        strerror(errno));
   }
 
-  if (get_default_gw(AF_INET, &a))
-    printf("ipv4 gw = %s\n", inet_ntop(AF_INET, &a, buf, sizeof(buf)));
-  if (get_default_gw(AF_INET6, &a))
-    printf("ipv6 gw = %s\n", inet_ntop(AF_INET6, &a, buf, sizeof(buf)));
-
   sel_init(&sel);
   if (make_listening_socket(AF_INET, port, "IPv4") &&
       make_listening_socket(AF_INET6, port, "IPv6"))
   sel_init(&sel);
   if (make_listening_socket(AF_INET, port, "IPv4") &&
       make_listening_socket(AF_INET6, port, "IPv6"))
diff --git a/yaid.h b/yaid.h
index d8215da..e0d13c1 100644 (file)
--- a/yaid.h
+++ b/yaid.h
@@ -192,7 +192,6 @@ DA_DECL(policy_v, struct policy);
 void logmsg(const struct query *q, int prio, const char *msg, ...);
 
 void identify(struct query *q);
 void logmsg(const struct query *q, int prio, const char *msg, ...);
 
 void identify(struct query *q);
-int get_default_gw(int af, union addr *a);
 
 void init_policy(struct policy *p);
 void free_policy(struct policy *p);
 
 void init_policy(struct policy *p);
 void free_policy(struct policy *p);