annotate src/if-options.h @ 5535:a0d828e25482 draft

Add --noconfigure option With this set dhcpcd will not configure anything on the host. The expectation is that a 3rd party script will instead.
author Roy Marples <roy@marples.name>
date Wed, 04 Nov 2020 14:18:48 +0000
parents 5b2272a0f3c3
children 2a519da0f1a2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4548
c7df03794de3 Add SPDX identifiers to all dhcpcd source files.
Yegor Yefremov <yegorslists@googlemail.com>
parents: 4379
diff changeset
1 /* SPDX-License-Identifier: BSD-2-Clause */
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
2 /*
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
3 * dhcpcd - DHCP client daemon
4922
555d7d1a4939 Welcome to 2020!
Roy Marples <roy@marples.name>
parents: 4840
diff changeset
4 * Copyright (c) 2006-2020 Roy Marples <roy@marples.name>
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
5 * All rights reserved
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
6
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
7 * Redistribution and use in source and binary forms, with or without
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
8 * modification, are permitted provided that the following conditions
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
9 * are met:
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
10 * 1. Redistributions of source code must retain the above copyright
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
11 * notice, this list of conditions and the following disclaimer.
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
14 * documentation and/or other materials provided with the distribution.
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
15 *
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
26 * SUCH DAMAGE.
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
27 */
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
28
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
29 #ifndef IF_OPTIONS_H
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
30 #define IF_OPTIONS_H
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
31
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
32 #include <sys/param.h>
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
33 #include <sys/socket.h>
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
34 #include <net/if.h>
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
35 #include <netinet/in.h>
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
36
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
37 #include <getopt.h>
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
38 #include <limits.h>
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
39 #include <stdint.h>
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
40
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
41 #include "auth.h"
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
42 #include "route.h"
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
43
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
44 /* Don't set any optional arguments here so we retain POSIX
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
45 * compatibility with getopt */
4010
746684127581 logerr: errx with logging
Roy Marples <roy@marples.name>
parents: 3975
diff changeset
46 #define IF_OPTS "146bc:de:f:gh:i:j:kl:m:no:pqr:s:t:u:v:wxy:z:" \
4067
1c2136f8886d Restore -G, --nogateway.
Roy Marples <roy@marples.name>
parents: 4010
diff changeset
47 "ABC:DEF:GHI:JKLMNO:PQ:S:TUVW:X:Z:"
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
48 #define NOERR_IF_OPTS ":" IF_OPTS
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
49
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
50 #define DEFAULT_TIMEOUT 30
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
51 #define DEFAULT_REBOOT 5
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
52
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
53 #ifndef HOSTNAME_MAX_LEN
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
54 #define HOSTNAME_MAX_LEN 250 /* 255 - 3 (FQDN) - 2 (DNS enc) */
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
55 #endif
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
56 #define VENDORCLASSID_MAX_LEN 255
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
57 #define CLIENTID_MAX_LEN 48
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
58 #define USERCLASS_MAX_LEN 255
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
59 #define VENDOR_MAX_LEN 255
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
60 #define MUDURL_MAX_LEN 255
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
61
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
62 #define DHCPCD_ARP (1ULL << 0)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
63 #define DHCPCD_RELEASE (1ULL << 1)
4648
16b119f7fc39 inet6: Don't install a default route if no global address
Roy Marples <roy@marples.name>
parents: 4632
diff changeset
64 #define DHCPCD_RTBUILD (1ULL << 2)
4067
1c2136f8886d Restore -G, --nogateway.
Roy Marples <roy@marples.name>
parents: 4010
diff changeset
65 #define DHCPCD_GATEWAY (1ULL << 3)
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
66 #define DHCPCD_STATIC (1ULL << 4)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
67 #define DHCPCD_DEBUG (1ULL << 5)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
68 #define DHCPCD_LASTLEASE (1ULL << 7)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
69 #define DHCPCD_INFORM (1ULL << 8)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
70 #define DHCPCD_REQUEST (1ULL << 9)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
71 #define DHCPCD_IPV4LL (1ULL << 10)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
72 #define DHCPCD_DUID (1ULL << 11)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
73 #define DHCPCD_PERSISTENT (1ULL << 12)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
74 #define DHCPCD_DAEMONISE (1ULL << 14)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
75 #define DHCPCD_DAEMONISED (1ULL << 15)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
76 #define DHCPCD_TEST (1ULL << 16)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
77 #define DHCPCD_MASTER (1ULL << 17)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
78 #define DHCPCD_HOSTNAME (1ULL << 18)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
79 #define DHCPCD_CLIENTID (1ULL << 19)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
80 #define DHCPCD_LINK (1ULL << 20)
4958
a120f447fe74 Implement Anonymity Profiles for DHCP Clients, RFC 7844
Roy Marples <roy@marples.name>
parents: 4923
diff changeset
81 #define DHCPCD_ANONYMOUS (1ULL << 21)
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
82 #define DHCPCD_BACKGROUND (1ULL << 22)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
83 #define DHCPCD_VENDORRAW (1ULL << 23)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
84 #define DHCPCD_NOWAITIP (1ULL << 24) /* To force daemonise */
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
85 #define DHCPCD_WAITIP (1ULL << 25)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
86 #define DHCPCD_SLAACPRIVATE (1ULL << 26)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
87 #define DHCPCD_CSR_WARNED (1ULL << 27)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
88 #define DHCPCD_XID_HWADDR (1ULL << 28)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
89 #define DHCPCD_BROADCAST (1ULL << 29)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
90 #define DHCPCD_DUMPLEASE (1ULL << 30)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
91 #define DHCPCD_IPV6RS (1ULL << 31)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
92 #define DHCPCD_IPV6RA_REQRDNSS (1ULL << 32)
4840
073fcd86db9b privsep: Add support for priviledge separation
Roy Marples <roy@marples.name>
parents: 4648
diff changeset
93 #define DHCPCD_PRIVSEP (1ULL << 33)
5535
a0d828e25482 Add --noconfigure option
Roy Marples <roy@marples.name>
parents: 5501
diff changeset
94 #define DHCPCD_CONFIGURE (1ULL << 34)
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
95 #define DHCPCD_IPV4 (1ULL << 35)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
96 #define DHCPCD_FORKED (1ULL << 36)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
97 #define DHCPCD_IPV6 (1ULL << 37)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
98 #define DHCPCD_STARTED (1ULL << 38)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
99 #define DHCPCD_NOALIAS (1ULL << 39)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
100 #define DHCPCD_IA_FORCED (1ULL << 40)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
101 #define DHCPCD_STOPPING (1ULL << 41)
5501
5b2272a0f3c3 privsep: Only log chrooting from the launcher process
Roy Marples <roy@marples.name>
parents: 5486
diff changeset
102 #define DHCPCD_LAUNCHER (1ULL << 42)
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
103 #define DHCPCD_HOSTNAME_SHORT (1ULL << 43)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
104 #define DHCPCD_EXITING (1ULL << 44)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
105 #define DHCPCD_WAITIP4 (1ULL << 45)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
106 #define DHCPCD_WAITIP6 (1ULL << 46)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
107 #define DHCPCD_DEV (1ULL << 47)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
108 #define DHCPCD_IAID (1ULL << 48)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
109 #define DHCPCD_DHCP (1ULL << 49)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
110 #define DHCPCD_DHCP6 (1ULL << 50)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
111 #define DHCPCD_IF_UP (1ULL << 51)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
112 #define DHCPCD_INFORM6 (1ULL << 52)
4632
a52cb3bec112 DHCP: Allow DHCP over PtP interfaces.
Roy Marples <roy@marples.name>
parents: 4548
diff changeset
113 #define DHCPCD_WANTDHCP (1ULL << 53)
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
114 #define DHCPCD_IPV6RA_AUTOCONF (1ULL << 54)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
115 #define DHCPCD_ROUTER_HOST_ROUTE_WARNED (1ULL << 55)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
116 #define DHCPCD_LASTLEASE_EXTEND (1ULL << 56)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
117 #define DHCPCD_BOOTP (1ULL << 57)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
118 #define DHCPCD_INITIAL_DELAY (1ULL << 58)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
119 #define DHCPCD_PRINT_PIDFILE (1ULL << 59)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
120 #define DHCPCD_ONESHOT (1ULL << 60)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
121 #define DHCPCD_INACTIVE (1ULL << 61)
5153
8248b3a04908 inet6: Add 'temporary' directive to the slaac option
Roy Marples <roy@marples.name>
parents: 4958
diff changeset
122 #define DHCPCD_SLAACTEMP (1ULL << 62)
5207
84b63f09c8a4 privsep: Handle all file IO in the Priviledged Actioneer
Roy Marples <roy@marples.name>
parents: 5185
diff changeset
123 #define DHCPCD_PRIVSEPROOT (1ULL << 63)
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
124
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
125 #define DHCPCD_NODROP (DHCPCD_EXITING | DHCPCD_PERSISTENT)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
126
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
127 #define DHCPCD_WAITOPTS (DHCPCD_WAITIP | DHCPCD_WAITIP4 | DHCPCD_WAITIP6)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
128
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
129 #define DHCPCD_WARNINGS (DHCPCD_CSR_WARNED | \
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
130 DHCPCD_ROUTER_HOST_ROUTE_WARNED)
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
131
5183
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
132 /* These options only make sense in the config file, so don't use any
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
133 valid short options for them */
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
134 #define O_BASE MAX('z', 'Z') + 1
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
135 #define O_ARPING O_BASE + 1
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
136 #define O_FALLBACK O_BASE + 2
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
137 #define O_DESTINATION O_BASE + 3
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
138 #define O_IPV6RS O_BASE + 4
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
139 #define O_NOIPV6RS O_BASE + 5
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
140 #define O_IPV6RA_FORK O_BASE + 6
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
141 #define O_LINK_RCVBUF O_BASE + 7
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
142 #define O_ANONYMOUS O_BASE + 8
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
143 #define O_NOALIAS O_BASE + 9
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
144 #define O_IA_NA O_BASE + 10
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
145 #define O_IA_TA O_BASE + 11
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
146 #define O_IA_PD O_BASE + 12
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
147 #define O_HOSTNAME_SHORT O_BASE + 13
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
148 #define O_DEV O_BASE + 14
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
149 #define O_NODEV O_BASE + 15
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
150 #define O_NOIPV4 O_BASE + 16
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
151 #define O_NOIPV6 O_BASE + 17
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
152 #define O_IAID O_BASE + 18
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
153 #define O_DEFINE O_BASE + 19
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
154 #define O_DEFINE6 O_BASE + 20
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
155 #define O_EMBED O_BASE + 21
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
156 #define O_ENCAP O_BASE + 22
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
157 #define O_VENDOPT O_BASE + 23
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
158 #define O_VENDCLASS O_BASE + 24
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
159 #define O_AUTHPROTOCOL O_BASE + 25
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
160 #define O_AUTHTOKEN O_BASE + 26
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
161 #define O_AUTHNOTREQUIRED O_BASE + 27
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
162 #define O_NODHCP O_BASE + 28
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
163 #define O_NODHCP6 O_BASE + 29
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
164 #define O_DHCP O_BASE + 30
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
165 #define O_DHCP6 O_BASE + 31
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
166 #define O_IPV4 O_BASE + 32
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
167 #define O_IPV6 O_BASE + 33
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
168 #define O_CONTROLGRP O_BASE + 34
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
169 #define O_SLAAC O_BASE + 35
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
170 #define O_GATEWAY O_BASE + 36
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
171 #define O_NOUP O_BASE + 37
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
172 #define O_IPV6RA_AUTOCONF O_BASE + 38
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
173 #define O_IPV6RA_NOAUTOCONF O_BASE + 39
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
174 #define O_REJECT O_BASE + 40
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
175 #define O_BOOTP O_BASE + 42
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
176 #define O_DEFINEND O_BASE + 43
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
177 #define O_NODELAY O_BASE + 44
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
178 #define O_INFORM6 O_BASE + 45
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
179 #define O_LASTLEASE_EXTEND O_BASE + 46
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
180 #define O_INACTIVE O_BASE + 47
5185
532e88420b25 Align whitespace
Roy Marples <roy@marples.name>
parents: 5183
diff changeset
181 #define O_MUDURL O_BASE + 48
532e88420b25 Align whitespace
Roy Marples <roy@marples.name>
parents: 5183
diff changeset
182 #define O_MSUSERCLASS O_BASE + 49
5535
a0d828e25482 Add --noconfigure option
Roy Marples <roy@marples.name>
parents: 5501
diff changeset
183 #define O_CONFIGURE O_BASE + 50
a0d828e25482 Add --noconfigure option
Roy Marples <roy@marples.name>
parents: 5501
diff changeset
184 #define O_NOCONFIGURE O_BASE + 51
5183
09e3f731e43e privsep: Add --chroot configurable
Roy Marples <roy@marples.name>
parents: 5153
diff changeset
185
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
186 extern const struct option cf_options[];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
187
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
188 struct if_sla {
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
189 char ifname[IF_NAMESIZE];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
190 uint32_t sla;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
191 uint8_t prefix_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
192 uint64_t suffix;
5359
e6b89e1a4077 DHCP6: Use sla setting when calculating delegated prefix length
Roy Marples <roy@marples.name>
parents: 5255
diff changeset
193 bool sla_set;
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
194 };
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
195
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
196 struct if_ia {
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
197 uint8_t iaid[4];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
198 #ifdef INET6
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
199 uint16_t ia_type;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
200 uint8_t iaid_set;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
201 struct in6_addr addr;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
202 uint8_t prefix_len;
4072
475b9492af64 Warn about IA_PD support not being compiled in when requesting it
Roy Marples <roy@marples.name>
parents: 4067
diff changeset
203 #ifndef SMALL
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
204 uint32_t sla_max;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
205 size_t sla_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
206 struct if_sla *sla;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
207 #endif
4072
475b9492af64 Warn about IA_PD support not being compiled in when requesting it
Roy Marples <roy@marples.name>
parents: 4067
diff changeset
208 #endif
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
209 };
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
210
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
211 struct vivco {
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
212 size_t len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
213 uint8_t *data;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
214 };
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
215
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
216 struct if_options {
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
217 time_t mtime;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
218 uint8_t iaid[4];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
219 int metric;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
220 uint8_t requestmask[256 / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
221 uint8_t requiremask[256 / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
222 uint8_t nomask[256 / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
223 uint8_t rejectmask[256 / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
224 uint8_t dstmask[256 / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
225 uint8_t requestmasknd[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
226 uint8_t requiremasknd[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
227 uint8_t nomasknd[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
228 uint8_t rejectmasknd[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
229 uint8_t requestmask6[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
230 uint8_t requiremask6[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
231 uint8_t nomask6[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
232 uint8_t rejectmask6[(UINT16_MAX + 1) / NBBY];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
233 uint32_t leasetime;
4923
4fcca755943e eloop: Allow for for timeouts greater than time_t and time wrapping
Roy Marples <roy@marples.name>
parents: 4922
diff changeset
234 uint32_t timeout;
4fcca755943e eloop: Allow for for timeouts greater than time_t and time wrapping
Roy Marples <roy@marples.name>
parents: 4922
diff changeset
235 uint32_t reboot;
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
236 unsigned long long options;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
237
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
238 struct in_addr req_addr;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
239 struct in_addr req_mask;
4207
d9c3c7008d20 ipv4: allow configuration of static broadcast address
Roy Marples <roy@marples.name>
parents: 4197
diff changeset
240 struct in_addr req_brd;
4379
e9573d5cbf1e Replace route TAILQ macros with rbtree(3) from NetBSD.
Roy Marples <roy@marples.name>
parents: 4333
diff changeset
241 rb_tree_t routes;
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
242 struct in6_addr req_addr6;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
243 uint8_t req_prefix_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
244 unsigned int mtu;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
245 char **config;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
246
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
247 char **environ;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
248
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
249 char hostname[HOSTNAME_MAX_LEN + 1]; /* We don't store the length */
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
250 uint8_t fqdn;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
251 uint8_t vendorclassid[VENDORCLASSID_MAX_LEN + 2];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
252 uint8_t clientid[CLIENTID_MAX_LEN + 2];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
253 uint8_t userclass[USERCLASS_MAX_LEN + 2];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
254 uint8_t vendor[VENDOR_MAX_LEN + 2];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
255 uint8_t mudurl[MUDURL_MAX_LEN + 2];
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
256
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
257 size_t blacklist_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
258 in_addr_t *blacklist;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
259 size_t whitelist_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
260 in_addr_t *whitelist;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
261 ssize_t arping_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
262 in_addr_t *arping;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
263 char *fallback;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
264
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
265 struct if_ia *ia;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
266 size_t ia_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
267
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
268 struct dhcp_opt *dhcp_override;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
269 size_t dhcp_override_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
270 struct dhcp_opt *nd_override;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
271 size_t nd_override_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
272 struct dhcp_opt *dhcp6_override;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
273 size_t dhcp6_override_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
274 uint32_t vivco_en;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
275 struct vivco *vivco;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
276 size_t vivco_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
277 struct dhcp_opt *vivso_override;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
278 size_t vivso_override_len;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
279
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
280 struct auth auth;
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
281 };
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
282
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
283 struct if_options *default_config(struct dhcpcd_ctx *);
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
284 struct if_options *read_config(struct dhcpcd_ctx *,
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
285 const char *, const char *, const char *);
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
286 int add_options(struct dhcpcd_ctx *, const char *,
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
287 struct if_options *, int, char **);
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
288 void free_dhcp_opt_embenc(struct dhcp_opt *);
4249
c30233f8cca3 routes: allow a head clear with a context
Roy Marples <roy@marples.name>
parents: 4207
diff changeset
289 void free_options(struct dhcpcd_ctx *, struct if_options *);
3932
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
290
e802a4235d75 Move the source files along with dev, crypt and comapt into src dir.
Roy Marples <roy@marples.name>
parents:
diff changeset
291 #endif