summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-03-19 22:45:57 +0000
committerRoy Marples <roy@marples.name>2009-03-19 22:45:57 +0000
commit263e8fdd42025e4c1f3bafbad5fdc85d71eb832c (patch)
tree76aa4dfee15970765199ab36e9ce2a099808e585
parent048ab309bba81a0c2e5533d4b8137dbb34c01599 (diff)
downloaddhcpcd-263e8fdd42025e4c1f3bafbad5fdc85d71eb832c.tar.xz
Move dhcpf.h into dhcp.h were it belongs
-rw-r--r--bind.c1
-rw-r--r--configure.c1
-rw-r--r--dhcp.c1
-rw-r--r--dhcp.h29
-rw-r--r--dhcpcd.c1
-rw-r--r--dhcpf.h59
-rw-r--r--if-options.c1
7 files changed, 29 insertions, 64 deletions
diff --git a/bind.c b/bind.c
index 9595996f..647e915e 100644
--- a/bind.c
+++ b/bind.c
@@ -40,7 +40,6 @@
#include "common.h"
#include "configure.h"
#include "dhcpcd.h"
-#include "dhcpf.h"
#include "eloop.h"
#include "if-options.h"
#include "net.h"
diff --git a/configure.c b/configure.c
index bb1bba50..1e13f7fc 100644
--- a/configure.c
+++ b/configure.c
@@ -42,7 +42,6 @@
#include "config.h"
#include "common.h"
#include "configure.h"
-#include "dhcpf.h"
#include "if-options.h"
#include "if-pref.h"
#include "net.h"
diff --git a/dhcp.c b/dhcp.c
index 15b21c98..203dc939 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -35,7 +35,6 @@
#include "config.h"
#include "common.h"
#include "dhcp.h"
-#include "dhcpf.h"
#define REQUEST (1 << 0)
#define UINT8 (1 << 1)
diff --git a/dhcp.h b/dhcp.h
index d3d366bc..c8d8d6fe 100644
--- a/dhcp.h
+++ b/dhcp.h
@@ -165,4 +165,33 @@ struct dhcp_lease {
uint8_t frominfo;
};
+#include "dhcpcd.h"
+#include "if-options.h"
+#include "net.h"
+
+#define add_option_mask(var, val) (var[val >> 3] |= 1 << (val & 7))
+#define del_option_mask(var, val) (var[val >> 3] &= ~(1 << (val & 7)))
+#define has_option_mask(var, val) (var[val >> 3] & (1 << (val & 7)))
+int make_option_mask(uint8_t *, const char *, int);
+void print_options(void);
+char *get_option_string(const struct dhcp_message *, uint8_t);
+int get_option_addr(uint32_t *, const struct dhcp_message *, uint8_t);
+int get_option_uint32(uint32_t *, const struct dhcp_message *, uint8_t);
+int get_option_uint16(uint16_t *, const struct dhcp_message *, uint8_t);
+int get_option_uint8(uint8_t *, const struct dhcp_message *, uint8_t);
+#define is_bootp(m) (m && \
+ !IN_LINKLOCAL(htonl((m)->yiaddr)) && \
+ get_option_uint8(NULL, m, DHO_MESSAGETYPE) == -1)
+struct rt *get_option_routes(const struct dhcp_message *);
+ssize_t configure_env(char **, const char *, const struct dhcp_message *,
+ const struct if_options *);
+
+ssize_t make_message(struct dhcp_message **, const struct interface *,
+ uint8_t);
+int valid_dhcp_packet(unsigned char *);
+
+ssize_t write_lease(const struct interface *, const struct dhcp_message *);
+struct dhcp_message *read_lease(const struct interface *);
+void get_lease(struct dhcp_lease *, const struct dhcp_message *);
+
#endif
diff --git a/dhcpcd.c b/dhcpcd.c
index 53952259..2c08c8ac 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -59,7 +59,6 @@ const char copyright[] = "Copyright (c) 2006-2009 Roy Marples";
#include "configure.h"
#include "control.h"
#include "dhcpcd.h"
-#include "dhcpf.h"
#include "duid.h"
#include "eloop.h"
#include "if-options.h"
diff --git a/dhcpf.h b/dhcpf.h
deleted file mode 100644
index b3c30cc3..00000000
--- a/dhcpf.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * dhcpcd - DHCP client daemon
- * Copyright 2006-2009 Roy Marples <roy@marples.name>
- * All rights reserved
-
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef DHCPF_H
-#define DHCPF_H
-
-#include "dhcp.h"
-#include "if-options.h"
-#include "net.h"
-
-#define add_option_mask(var, val) (var[val >> 3] |= 1 << (val & 7))
-#define del_option_mask(var, val) (var[val >> 3] &= ~(1 << (val & 7)))
-#define has_option_mask(var, val) (var[val >> 3] & (1 << (val & 7)))
-int make_option_mask(uint8_t *, const char *, int);
-void print_options(void);
-char *get_option_string(const struct dhcp_message *, uint8_t);
-int get_option_addr(uint32_t *, const struct dhcp_message *, uint8_t);
-int get_option_uint32(uint32_t *, const struct dhcp_message *, uint8_t);
-int get_option_uint16(uint16_t *, const struct dhcp_message *, uint8_t);
-int get_option_uint8(uint8_t *, const struct dhcp_message *, uint8_t);
-#define is_bootp(m) (m && \
- !IN_LINKLOCAL(htonl((m)->yiaddr)) && \
- get_option_uint8(NULL, m, DHO_MESSAGETYPE) == -1)
-struct rt *get_option_routes(const struct dhcp_message *);
-ssize_t configure_env(char **, const char *, const struct dhcp_message *,
- const struct if_options *);
-
-ssize_t make_message(struct dhcp_message **, const struct interface *,
- uint8_t);
-int valid_dhcp_packet(unsigned char *);
-
-ssize_t write_lease(const struct interface *, const struct dhcp_message *);
-struct dhcp_message *read_lease(const struct interface *);
-void get_lease(struct dhcp_lease *, const struct dhcp_message *);
-#endif
diff --git a/if-options.c b/if-options.c
index e7c38d24..7d048844 100644
--- a/if-options.c
+++ b/if-options.c
@@ -42,7 +42,6 @@
#include "config.h"
#include "common.h"
-#include "dhcpf.h"
#include "if-options.h"
#include "net.h"