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 main(int argc, char *argv[])
{
int port = 113;
- char buf[ADDRLEN];
- union addr a;
ego(argv[0]);
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"))
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);