diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-12-20 17:16:17 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-12-22 14:37:49 +0100 |
commit | 234fc2dfce0e749f6e88301f2c82a3e54ccaa5fa (patch) | |
tree | dee2f72347d5795b86f09eeecab883ea75a0673f /src/libsystemd-dhcp/dhcp-internal.h | |
parent | 2fba7b03b515b842f5a33d9e1ec46bfa7767d393 (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/dhcp-internal.h')
-rw-r--r-- | src/libsystemd-dhcp/dhcp-internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-dhcp/dhcp-internal.h b/src/libsystemd-dhcp/dhcp-internal.h index 4472d95095..43b5b1d000 100644 --- a/src/libsystemd-dhcp/dhcp-internal.h +++ b/src/libsystemd-dhcp/dhcp-internal.h @@ -29,8 +29,11 @@ #include "dhcp-protocol.h" int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link); +int dhcp_network_bind_udp_socket(int index, be32_t client_address); int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, const void *packet, size_t len); +int dhcp_network_send_udp_socket(int s, be32_t server_address, + const void *packet, size_t len); int dhcp_option_append(uint8_t **buf, size_t *buflen, uint8_t code, size_t optlen, const void *optval); |