X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fsystemd%2Fsd-dhcp-client.h;h=9ab6105e5b67d9870fb2f583e9e4c26a183f88cc;hp=e387d54046d7e2697eed4ce875d1a09d5f6b1e8e;hb=edb85f0d8d0a84f27308a3728f3fde3c52b9dce2;hpb=1346b1f0388f4100bb3c2a2bb23bc881769c020c diff --git a/src/systemd/sd-dhcp-client.h b/src/systemd/sd-dhcp-client.h index e387d5404..9ab6105e5 100644 --- a/src/systemd/sd-dhcp-client.h +++ b/src/systemd/sd-dhcp-client.h @@ -26,6 +26,7 @@ #include #include "sd-event.h" +#include "sd-dhcp-lease.h" enum { DHCP_EVENT_STOP = 0, @@ -33,6 +34,7 @@ enum { DHCP_EVENT_IP_ACQUIRE = 2, DHCP_EVENT_IP_CHANGE = 3, DHCP_EVENT_EXPIRED = 4, + DHCP_EVENT_RENEW = 5, }; typedef struct sd_dhcp_client sd_dhcp_client; @@ -49,18 +51,20 @@ int sd_dhcp_client_set_request_address(sd_dhcp_client *client, int sd_dhcp_client_set_index(sd_dhcp_client *client, int interface_index); int sd_dhcp_client_set_mac(sd_dhcp_client *client, const struct ether_addr *addr); - -int sd_dhcp_client_get_address(sd_dhcp_client *client, struct in_addr *addr); -int sd_dhcp_client_get_netmask(sd_dhcp_client *client, struct in_addr *addr); -int sd_dhcp_client_prefixlen(const struct in_addr *addr); -int sd_dhcp_client_get_router(sd_dhcp_client *client, struct in_addr *addr); -int sd_dhcp_client_get_dns(sd_dhcp_client *client, struct in_addr ***addr); -int sd_dhcp_client_get_mtu(sd_dhcp_client *client, uint16_t *mtu); -int sd_dhcp_client_get_hostname(sd_dhcp_client *client, const char **hostname); +int sd_dhcp_client_set_hostname(sd_dhcp_client *client, const char *hostname); +int sd_dhcp_client_set_vendor_class_identifier(sd_dhcp_client *client, const char *vci); +int sd_dhcp_client_get_lease(sd_dhcp_client *client, sd_dhcp_lease **ret); int sd_dhcp_client_stop(sd_dhcp_client *client); int sd_dhcp_client_start(sd_dhcp_client *client); -sd_dhcp_client *sd_dhcp_client_free(sd_dhcp_client *client); -sd_dhcp_client *sd_dhcp_client_new(sd_event *event); + +sd_dhcp_client *sd_dhcp_client_ref(sd_dhcp_client *client); +sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client); + +int sd_dhcp_client_new(sd_dhcp_client **ret); + +int sd_dhcp_client_attach_event(sd_dhcp_client *client, sd_event *event, int priority); +int sd_dhcp_client_detach_event(sd_dhcp_client *client); +sd_event *sd_dhcp_client_get_event(sd_dhcp_client *client); #endif