aboutsummaryrefslogtreecommitdiffstats
path: root/config.def.h
blob: 12a2728676cd5d9cf8aeae12963d88276e8d8c4d (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * (C) 2013-2014 by Christian Hesse <mail@eworm.de>
 *
 * This software may be used and distributed according to the terms
 * of the GNU General Public License, incorporated herein by reference.
 */

#ifndef _CONFIG_H
#define _CONFIG_H

/* the binary needs to know its own architecture */
#if defined __x86_64__
#	define ARCH	"x86_64"
#elif defined __i386__
#	define ARCH	"i686"
#elif defined __ARM_ARCH_7__
#	define ARCH	"armv7h"
#elif defined __ARM_ARCH_6__
#	if defined __VFP_FP__
#		define ARCH	"armv6h"
#	else
#		define ARCH	"arm"
#	endif
#else
#	error Unknown architecture!
#endif

/* This is used for default documents. Usually you will not see this anyway. */
#define PAGE307 "<html><head><title>307 temporary redirect</title>" \
		"</head><body>307 temporary redirect: " \
		"<a href=\"%s\">%s</a></body></html>"
#define PAGE404 "<html><head><title>404 Not Found</title>" \
		"</head><body>404 Not Found: %s</body></html>"

/* the ports pacredir, pacserve and pacdbserve listen to */
#define PORT_PACREDIR	7077
#define PORT_PACSERVE	7078
#define PORT_PACDBSERVE	7079

/* avahi service names */
#define PACSERVE	"_pacserve._tcp"
#define PACDBSERVE	"_pacdbserve_" ARCH "._tcp"

/* path to the config file */
#define CONFIGFILE	"/etc/pacredir.conf"
/* these characters are used as delimiter in config file */
#define DELIMITER	" ,;"

/* this is where pacman stores its local copy of db files */
#define SYNCPATH	"/var/lib/pacman/sync"

/* This defines the initial time in seconds after which a host is queried
 * again after a bad request. Time is doubled after every subsequent
 * request. */
#define BADTIME	30

#endif /* _CONFIG_H */

// vim: set syntax=c: