summaryrefslogtreecommitdiff
path: root/src/systemd/sd-dhcp6-client.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-24 23:42:56 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-24 23:42:56 +0200
commit04c0136989b7eb896bfb0fb176e11233d69e1453 (patch)
tree8d5bf1ed8a693e902ad3d79fab480cc6e2de85a2 /src/systemd/sd-dhcp6-client.h
parent00229fe48f7577946bb95dd2b0ca96d8e6447f94 (diff)
sd-*.h: clean up exported (or to-be-exported) header files
Exported header files should not include internal headers. Fix that. Exported header files should not use the bool type. So far we opted to stick to C89 for exported headers, and hence use "int" for bools in them. Continue to do so. Exported header files should have #include lines for everything they use including inttypes.h and sys/types.h, so that they may be included in any order. Exported header files should have C++ guards, hence add them. Exported header files should not use gcc extensions like #pragma once, get rid of it.
Diffstat (limited to 'src/systemd/sd-dhcp6-client.h')
-rw-r--r--src/systemd/sd-dhcp6-client.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/systemd/sd-dhcp6-client.h b/src/systemd/sd-dhcp6-client.h
index e95d758815..13182a481d 100644
--- a/src/systemd/sd-dhcp6-client.h
+++ b/src/systemd/sd-dhcp6-client.h
@@ -22,13 +22,17 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <inttypes.h>
#include <net/ethernet.h>
-#include <stdbool.h>
+#include <sys/types.h>
#include "sd-event.h"
-
#include "sd-dhcp6-lease.h"
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
+
enum {
SD_DHCP6_CLIENT_EVENT_STOP = 0,
SD_DHCP6_CLIENT_EVENT_RESEND_EXPIRE = 10,
@@ -49,10 +53,8 @@ int sd_dhcp6_client_set_mac(sd_dhcp6_client *client, const uint8_t *addr,
size_t addr_len, uint16_t arp_type);
int sd_dhcp6_client_set_duid(sd_dhcp6_client *client, uint16_t type, uint8_t *duid,
size_t duid_len);
-int sd_dhcp6_client_set_information_request(sd_dhcp6_client *client,
- bool enabled);
-int sd_dhcp6_client_get_information_request(sd_dhcp6_client *client,
- bool *enabled);
+int sd_dhcp6_client_set_information_request(sd_dhcp6_client *client, int enabled);
+int sd_dhcp6_client_get_information_request(sd_dhcp6_client *client, int *enabled);
int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client,
uint16_t option);
@@ -68,4 +70,6 @@ sd_dhcp6_client *sd_dhcp6_client_ref(sd_dhcp6_client *client);
sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client);
int sd_dhcp6_client_new(sd_dhcp6_client **ret);
+_SD_END_DECLARATIONS;
+
#endif