summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/sd-device.h2
-rw-r--r--src/systemd/sd-dhcp-client.h10
-rw-r--r--src/systemd/sd-dhcp-lease.h10
-rw-r--r--src/systemd/sd-dhcp-server.h9
-rw-r--r--src/systemd/sd-dhcp6-client.h15
-rw-r--r--src/systemd/sd-dhcp6-lease.h7
-rw-r--r--src/systemd/sd-hwdb.h4
-rw-r--r--src/systemd/sd-ipv4acd.h8
-rw-r--r--src/systemd/sd-ipv4ll.h8
-rw-r--r--src/systemd/sd-lldp.h13
-rw-r--r--src/systemd/sd-ndisc.h6
-rw-r--r--src/systemd/sd-path.h6
-rw-r--r--src/systemd/sd-pppoe.h6
-rw-r--r--src/systemd/sd-resolve.h7
14 files changed, 90 insertions, 21 deletions
diff --git a/src/systemd/sd-device.h b/src/systemd/sd-device.h
index 38cb2a1102..fc11725821 100644
--- a/src/systemd/sd-device.h
+++ b/src/systemd/sd-device.h
@@ -24,7 +24,7 @@
***/
#include <sys/types.h>
-#include <stdint.h>
+#include <inttypes.h>
#include "_sd-common.h"
diff --git a/src/systemd/sd-dhcp-client.h b/src/systemd/sd-dhcp-client.h
index 4291fb7ebc..c0146158f3 100644
--- a/src/systemd/sd-dhcp-client.h
+++ b/src/systemd/sd-dhcp-client.h
@@ -22,12 +22,18 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <netinet/in.h>
+#include <inttypes.h>
#include <net/ethernet.h>
+#include <netinet/in.h>
+#include <sys/types.h>
#include "sd-event.h"
#include "sd-dhcp-lease.h"
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
+
enum {
SD_DHCP_CLIENT_EVENT_STOP = 0,
SD_DHCP_CLIENT_EVENT_IP_ACQUIRE = 1,
@@ -72,4 +78,6 @@ int sd_dhcp_client_attach_event(sd_dhcp_client *client, sd_event *event, int pri
int sd_dhcp_client_detach_event(sd_dhcp_client *client);
sd_event *sd_dhcp_client_get_event(sd_dhcp_client *client);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-dhcp-lease.h b/src/systemd/sd-dhcp-lease.h
index ed5bceecdd..38222594e7 100644
--- a/src/systemd/sd-dhcp-lease.h
+++ b/src/systemd/sd-dhcp-lease.h
@@ -23,8 +23,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <netinet/in.h>
+#include <inttypes.h>
#include <net/ethernet.h>
+#include <netinet/in.h>
+#include <sys/types.h>
+
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
typedef struct sd_dhcp_lease sd_dhcp_lease;
struct sd_dhcp_route;
@@ -52,4 +58,6 @@ int sd_dhcp_lease_get_vendor_specific(sd_dhcp_lease *lease, const void **data, s
int sd_dhcp_lease_get_client_id(sd_dhcp_lease *lease, const void **client_id, size_t *client_id_len);
int sd_dhcp_lease_get_timezone(sd_dhcp_lease *lease, const char **timezone);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-dhcp-server.h b/src/systemd/sd-dhcp-server.h
index 4b0c7a1852..55bceb1ea5 100644
--- a/src/systemd/sd-dhcp-server.h
+++ b/src/systemd/sd-dhcp-server.h
@@ -23,10 +23,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdbool.h>
+#include <inttypes.h>
#include <netinet/in.h>
#include "sd-event.h"
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
typedef struct sd_dhcp_server sd_dhcp_server;
@@ -39,7 +42,7 @@ int sd_dhcp_server_attach_event(sd_dhcp_server *client, sd_event *event, int pri
int sd_dhcp_server_detach_event(sd_dhcp_server *client);
sd_event *sd_dhcp_server_get_event(sd_dhcp_server *client);
-bool sd_dhcp_server_is_running(sd_dhcp_server *server);
+int sd_dhcp_server_is_running(sd_dhcp_server *server);
int sd_dhcp_server_start(sd_dhcp_server *server);
int sd_dhcp_server_stop(sd_dhcp_server *server);
@@ -55,4 +58,6 @@ int sd_dhcp_server_set_default_lease_time(sd_dhcp_server *server, uint32_t t);
int sd_dhcp_server_forcerenew(sd_dhcp_server *server);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-dhcp6-client.h b/src/systemd/sd-dhcp6-client.h
index 90c35ef3f6..13182a481d 100644
--- a/src/systemd/sd-dhcp6-client.h
+++ b/src/systemd/sd-dhcp6-client.h
@@ -22,12 +22,17 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <inttypes.h>
#include <net/ethernet.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,
@@ -48,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);
@@ -67,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
diff --git a/src/systemd/sd-dhcp6-lease.h b/src/systemd/sd-dhcp6-lease.h
index dc3df3bbf7..3fc0ee4bed 100644
--- a/src/systemd/sd-dhcp6-lease.h
+++ b/src/systemd/sd-dhcp6-lease.h
@@ -23,8 +23,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <inttypes.h>
#include <netinet/in.h>
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
+
typedef struct sd_dhcp6_lease sd_dhcp6_lease;
void sd_dhcp6_lease_reset_address_iter(sd_dhcp6_lease *lease);
@@ -42,4 +47,6 @@ int sd_dhcp6_lease_get_ntp_fqdn(sd_dhcp6_lease *lease, char ***ntp_fqdn);
sd_dhcp6_lease *sd_dhcp6_lease_ref(sd_dhcp6_lease *lease);
sd_dhcp6_lease *sd_dhcp6_lease_unref(sd_dhcp6_lease *lease);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-hwdb.h b/src/systemd/sd-hwdb.h
index 3c44b981d6..49269a073a 100644
--- a/src/systemd/sd-hwdb.h
+++ b/src/systemd/sd-hwdb.h
@@ -39,9 +39,11 @@ int sd_hwdb_get(sd_hwdb *hwdb, const char *modalias, const char *key, const char
int sd_hwdb_seek(sd_hwdb *hwdb, const char *modalias);
int sd_hwdb_enumerate(sd_hwdb *hwdb, const char **key, const char **value);
-/* the inverse condition avoids ambiguity of danling 'else' after the macro */
+/* the inverse condition avoids ambiguity of dangling 'else' after the macro */
#define SD_HWDB_FOREACH_PROPERTY(hwdb, modalias, key, value) \
if (sd_hwdb_seek(hwdb, modalias) < 0) { } \
else while (sd_hwdb_enumerate(hwdb, &(key), &(value)) > 0)
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-ipv4acd.h b/src/systemd/sd-ipv4acd.h
index adcb2c7b92..6337d61452 100644
--- a/src/systemd/sd-ipv4acd.h
+++ b/src/systemd/sd-ipv4acd.h
@@ -23,11 +23,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdbool.h>
#include <netinet/in.h>
#include <net/ethernet.h>
#include "sd-event.h"
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
enum {
SD_IPV4ACD_EVENT_STOP = 0,
@@ -45,11 +47,13 @@ int sd_ipv4acd_set_callback(sd_ipv4acd *ll, sd_ipv4acd_cb_t cb, void *userdata);
int sd_ipv4acd_set_mac(sd_ipv4acd *ll, const struct ether_addr *addr);
int sd_ipv4acd_set_index(sd_ipv4acd *ll, int interface_index);
int sd_ipv4acd_set_address(sd_ipv4acd *ll, const struct in_addr *address);
-bool sd_ipv4acd_is_running(sd_ipv4acd *ll);
+int sd_ipv4acd_is_running(sd_ipv4acd *ll);
int sd_ipv4acd_start(sd_ipv4acd *ll);
int sd_ipv4acd_stop(sd_ipv4acd *ll);
sd_ipv4acd *sd_ipv4acd_ref(sd_ipv4acd *ll);
sd_ipv4acd *sd_ipv4acd_unref(sd_ipv4acd *ll);
int sd_ipv4acd_new (sd_ipv4acd **ret);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-ipv4ll.h b/src/systemd/sd-ipv4ll.h
index cc85140acd..2949f1dfb2 100644
--- a/src/systemd/sd-ipv4ll.h
+++ b/src/systemd/sd-ipv4ll.h
@@ -22,11 +22,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdbool.h>
#include <netinet/in.h>
#include <net/ethernet.h>
#include "sd-event.h"
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
enum {
SD_IPV4LL_EVENT_STOP = 0,
@@ -45,11 +47,13 @@ int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr);
int sd_ipv4ll_set_index(sd_ipv4ll *ll, int interface_index);
int sd_ipv4ll_set_address(sd_ipv4ll *ll, const struct in_addr *address);
int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, unsigned seed);
-bool sd_ipv4ll_is_running(sd_ipv4ll *ll);
+int sd_ipv4ll_is_running(sd_ipv4ll *ll);
int sd_ipv4ll_start(sd_ipv4ll *ll);
int sd_ipv4ll_stop(sd_ipv4ll *ll);
sd_ipv4ll *sd_ipv4ll_ref(sd_ipv4ll *ll);
sd_ipv4ll *sd_ipv4ll_unref(sd_ipv4ll *ll);
int sd_ipv4ll_new (sd_ipv4ll **ret);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h
index 30d9dedf2c..31651ce132 100644
--- a/src/systemd/sd-lldp.h
+++ b/src/systemd/sd-lldp.h
@@ -1,5 +1,8 @@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+#ifndef foosdlldphfoo
+#define foosdlldphfoo
+
/***
This file is part of systemd.
@@ -20,9 +23,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#pragma once
+#include <net/ethernet.h>
+#include <inttypes.h>
#include "sd-event.h"
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
enum {
SD_LLDP_EVENT_UPDATE_INFO = 0,
@@ -72,3 +79,7 @@ sd_lldp_packet *sd_lldp_packet_unref(sd_lldp_packet *tlv);
int sd_lldp_packet_get_destination_type(sd_lldp_packet *tlv, int *dest);
int sd_lldp_get_packets(sd_lldp *lldp, sd_lldp_packet ***tlvs);
+
+_SD_END_DECLARATIONS;
+
+#endif
diff --git a/src/systemd/sd-ndisc.h b/src/systemd/sd-ndisc.h
index 83575c6908..570e1741d6 100644
--- a/src/systemd/sd-ndisc.h
+++ b/src/systemd/sd-ndisc.h
@@ -22,9 +22,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <inttypes.h>
#include <net/ethernet.h>
#include "sd-event.h"
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
enum {
SD_NDISC_EVENT_ROUTER_ADVERTISMENT_NONE = 0,
@@ -68,4 +72,6 @@ int sd_ndisc_router_discovery_start(sd_ndisc *nd);
be16toh((address).s6_addr16[6]), \
be16toh((address).s6_addr16[7])
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-path.h b/src/systemd/sd-path.h
index e238c0ce20..3280303633 100644
--- a/src/systemd/sd-path.h
+++ b/src/systemd/sd-path.h
@@ -24,6 +24,10 @@
#include <inttypes.h>
+#include "_sd-common.h"
+
+_SD_BEGIN_DECLARATIONS;
+
enum {
/* Temporary files */
SD_PATH_TEMPORARY = 0x0ULL,
@@ -84,4 +88,6 @@ enum {
int sd_path_home(uint64_t type, const char *suffix, char **path);
int sd_path_search(uint64_t type, const char *suffix, char ***paths);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-pppoe.h b/src/systemd/sd-pppoe.h
index 90878ffa27..80d9fc2862 100644
--- a/src/systemd/sd-pppoe.h
+++ b/src/systemd/sd-pppoe.h
@@ -22,12 +22,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdbool.h>
#include <net/ethernet.h>
#include "sd-event.h"
+#include "_sd-common.h"
-#include "sparse-endian.h"
+_SD_BEGIN_DECLARATIONS;
enum {
SD_PPPOE_EVENT_RUNNING = 0,
@@ -50,4 +50,6 @@ sd_pppoe *sd_pppoe_ref(sd_pppoe *ppp);
sd_pppoe *sd_pppoe_unref(sd_pppoe *ppp);
int sd_pppoe_new (sd_pppoe **ret);
+_SD_END_DECLARATIONS;
+
#endif
diff --git a/src/systemd/sd-resolve.h b/src/systemd/sd-resolve.h
index 80c5852e45..82c4b39efe 100644
--- a/src/systemd/sd-resolve.h
+++ b/src/systemd/sd-resolve.h
@@ -22,12 +22,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/types.h>
-#include <sys/socket.h>
+#include <inttypes.h>
#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/types.h>
-#include "_sd-common.h"
#include "sd-event.h"
+#include "_sd-common.h"
_SD_BEGIN_DECLARATIONS;