summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/network-internal.c
diff options
context:
space:
mode:
authorVinay Kulkarni <vskibum@gmail.com>2016-03-30 16:33:55 -0700
committerVinay Kulkarni <vskibum@gmail.com>2016-03-30 16:33:55 -0700
commit413708d106afb5ec36464c3fad56f081373320e0 (patch)
tree706d63a6190036d3015d3100d0935e1a016fbab6 /src/libsystemd-network/network-internal.c
parent1eb963a32ddd2147057178cc230d919b66a90db7 (diff)
DHCP DUID, IAID configuration options
Diffstat (limited to 'src/libsystemd-network/network-internal.c')
-rw-r--r--src/libsystemd-network/network-internal.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index cb7252bbeb..0e2d757b2b 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -335,6 +335,35 @@ int config_parse_hwaddr(const char *unit,
return 0;
}
+int config_parse_iaid(const char *unit,
+ const char *filename,
+ unsigned line,
+ const char *section,
+ unsigned section_line,
+ const char *lvalue,
+ int ltype,
+ const char *rvalue,
+ void *data,
+ void *userdata) {
+ uint32_t iaid;
+ int r;
+
+ assert(filename);
+ assert(lvalue);
+ assert(rvalue);
+ assert(data);
+
+ r = safe_atou32(rvalue, &iaid);
+ if (r < 0) {
+ log_syntax(unit, LOG_ERR, filename, line, 0, "Unable to read IAID: %s", rvalue);
+ return r;
+ }
+
+ *((uint32_t *)data) = iaid;
+
+ return 0;
+}
+
void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size) {
unsigned i;