summaryrefslogtreecommitdiffstats
path: root/pacredir.h
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-07-05 14:44:30 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-07-05 14:44:30 +0200
commiteeb439db30c82c429a7a02bb0287713556ef7785 (patch)
tree1fa776df51ae5b41f2dcd65472458fa806f4d12e /pacredir.h
parentad79ff8b22318c22eb25a157d5e2a210afa77de6 (diff)
parentb8aeafb0377321d8443fc36a7a1ae660f407cfd2 (diff)
downloadpacredir-eeb439db30c82c429a7a02bb0287713556ef7785.tar.gz
pacredir-eeb439db30c82c429a7a02bb0287713556ef7785.tar.zst
Merge branch 'bind-mount'
Diffstat (limited to 'pacredir.h')
-rw-r--r--pacredir.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/pacredir.h b/pacredir.h
index fa26dbd..75017b7 100644
--- a/pacredir.h
+++ b/pacredir.h
@@ -44,18 +44,6 @@
#define PROGNAME "pacredir"
-/* services */
-struct services {
- /* network port */
- uint16_t port;
- /* true if host/service is online */
- uint8_t online;
- /* unix timestamp of last bad request */
- __time_t badtime;
- /* count the number of bad requests */
- unsigned int badcount;
-};
-
/* hosts */
struct hosts {
/* host name */
@@ -64,9 +52,14 @@ struct hosts {
AvahiProtocol proto;
/* resolved address */
char address[AVAHI_ADDRESS_STR_MAX];
- /* online status and bad time for services */
- struct services pacserve;
- struct services pacdbserve;
+ /* network port */
+ uint16_t port;
+ /* true if host/service is online */
+ uint8_t online;
+ /* unix timestamp of last bad request */
+ __time_t badtime;
+ /* count the number of bad requests */
+ unsigned int badcount;
/* pointer to next struct element */
struct hosts * next;
};
@@ -81,10 +74,8 @@ struct ignore_interfaces {
/* request */
struct request {
- /* host name */
- const char * host;
- /* pointer to service */
- struct services * service;
+ /* host infos */
+ struct hosts * host;
/* url */
char * url;
/* HTTP status code */
@@ -100,7 +91,7 @@ int write_log(FILE *stream, const char *format, ...);
/* get_fqdn */
char * get_fqdn(const char * hostname, const char * domainname);
/* get_url */
-char * get_url(const char * hostname, AvahiProtocol proto, const char * address, const uint16_t port, const char * uri);
+char * get_url(const char * hostname, AvahiProtocol proto, const char * address, const uint16_t port, const uint8_t dbfile, const char * uri);
/* add_host */
int add_host(const char * host, AvahiProtocol proto, const char * address, const uint16_t port, const char * type);