summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp-server-internal.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-24 22:14:32 +0200
committerTom Gundersen <teg@jklm.no>2014-06-13 16:53:13 +0200
commit816e2e7af96886e4a43194042ef61ba9fec2c77d (patch)
tree8255164a237559ec9c64c7f5437aed09c8e1452a /src/libsystemd-network/dhcp-server-internal.h
parentbe077570f779664ed87b50f60608df9fbe258821 (diff)
sd-dhcp-server: add basic message parsing
Parse the maximum message size the client can accept and the client id, falling back to sane defaults if they are not set.
Diffstat (limited to 'src/libsystemd-network/dhcp-server-internal.h')
-rw-r--r--src/libsystemd-network/dhcp-server-internal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libsystemd-network/dhcp-server-internal.h b/src/libsystemd-network/dhcp-server-internal.h
index 63883fab99..3d49cba917 100644
--- a/src/libsystemd-network/dhcp-server-internal.h
+++ b/src/libsystemd-network/dhcp-server-internal.h
@@ -40,6 +40,21 @@ struct sd_dhcp_server {
int index;
};
+typedef struct DHCPClientId {
+ size_t length;
+ uint8_t *data;
+} DHCPClientId;
+
+typedef struct DHCPRequest {
+ /* received message */
+ DHCPMessage *message;
+
+ /* options */
+ DHCPClientId client_id;
+ size_t max_optlen;
+ be32_t server_id;
+} DHCPRequest;
+
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_dhcp_server*, sd_dhcp_server_unref);
#define _cleanup_dhcp_server_unref_ _cleanup_(sd_dhcp_server_unrefp)