summaryrefslogtreecommitdiff
path: root/src/libsystemd-dhcp/test-dhcp-client.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-12-20 17:16:17 +0200
committerTom Gundersen <teg@jklm.no>2013-12-22 14:37:49 +0100
commit234fc2dfce0e749f6e88301f2c82a3e54ccaa5fa (patch)
treedee2f72347d5795b86f09eeecab883ea75a0673f /src/libsystemd-dhcp/test-dhcp-client.c
parent2fba7b03b515b842f5a33d9e1ec46bfa7767d393 (diff)
libsystemd-dhcp: Add functions for sending unicast UDP messages
Create a helper functions setting up an unicast DHCP UDP socket and sending data. Add function stubs for the test program. [tomegun: initialize structs when allocating, and drop unneccesary 'err']
Diffstat (limited to 'src/libsystemd-dhcp/test-dhcp-client.c')
-rw-r--r--src/libsystemd-dhcp/test-dhcp-client.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libsystemd-dhcp/test-dhcp-client.c b/src/libsystemd-dhcp/test-dhcp-client.c
index 1ff78c1144..617236b5df 100644
--- a/src/libsystemd-dhcp/test-dhcp-client.c
+++ b/src/libsystemd-dhcp/test-dhcp-client.c
@@ -184,6 +184,17 @@ int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link)
return test_fd[0];
}
+int dhcp_network_bind_udp_socket(int index, be32_t client_address)
+{
+ return 0;
+}
+
+int dhcp_network_send_udp_socket(int s, be32_t server_address,
+ const void *packet, size_t len)
+{
+ return 0;
+}
+
static void test_discover_message(sd_event *e)
{
sd_dhcp_client *client;