aboutsummaryrefslogtreecommitdiff
path: root/lib/libstand
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2017-03-09 06:01:24 +0000
committerMariusz Zaborski <oshogbo@FreeBSD.org>2017-03-09 06:01:24 +0000
commit4cd385d9e9f4d4331a9fc287ca8cee1800b4da97 (patch)
tree2e4c5144d83cfbc68446bc82e1e54855c3aa3a8c /lib/libstand
parent312227566c8b049d777219855438891ab4ee59fd (diff)
Notes
Diffstat (limited to 'lib/libstand')
-rw-r--r--lib/libstand/bootp.c11
-rw-r--r--lib/libstand/bootp.h6
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/libstand/bootp.c b/lib/libstand/bootp.c
index 4b8918e71838..5d993ce5f07e 100644
--- a/lib/libstand/bootp.c
+++ b/lib/libstand/bootp.c
@@ -344,6 +344,17 @@ bad:
return (-1);
}
+int
+dhcp_try_rfc1048(u_char *cp, u_int len)
+{
+
+ expected_dhcpmsgtype = DHCPACK;
+ if (bcmp(vm_rfc1048, cp, sizeof(vm_rfc1048)) == 0) {
+ return (vend_rfc1048(cp, len));
+ }
+ return (-1);
+}
+
static int
vend_rfc1048(cp, len)
u_char *cp;
diff --git a/lib/libstand/bootp.h b/lib/libstand/bootp.h
index 9f4d4139a5b1..4a57df26e1bd 100644
--- a/lib/libstand/bootp.h
+++ b/lib/libstand/bootp.h
@@ -22,6 +22,8 @@
* $FreeBSD$
*/
+#ifndef _BOOTP_H_
+#define _BOOTP_H_
struct bootp {
unsigned char bp_op; /* packet opcode type */
@@ -145,3 +147,7 @@ struct cmu_vend {
/* v_flags values */
#define VF_SMASK 1 /* Subnet mask field contains valid data */
+
+int dhcp_try_rfc1048(u_char *cp, u_int len);
+
+#endif /* _BOOTP_H_ */