]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Move dhcpf.h into dhcp.h were it belongs
authorRoy Marples <roy@marples.name>
Thu, 19 Mar 2009 22:45:57 +0000 (22:45 +0000)
committerRoy Marples <roy@marples.name>
Thu, 19 Mar 2009 22:45:57 +0000 (22:45 +0000)
bind.c
configure.c
dhcp.c
dhcp.h
dhcpcd.c
dhcpf.h [deleted file]
if-options.c

diff --git a/bind.c b/bind.c
index 9595996f5fafe6e44b641c6fd4f6fecfea88be1f..647e915ebb5ef3945112449e5082097d5fde4e44 100644 (file)
--- 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"
index bb1bba50d87190d28b7be6b5eb7b886675b24620..1e13f7fc0dc20a30fa0283033603107bbe4c50dc 100644 (file)
@@ -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 15b21c98ee3194fe3915d994fd46e4e3d7f2ee84..203dc939fde6484a1d9bffd26a8ee9e116c24c95 100644 (file)
--- 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 d3d366bc563fad0257b32bbd44679b82f74fcb38..c8d8d6fe7dd96bbb5f3390a8119053048047a9ae 100644 (file)
--- 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
index 53952259afe9a3983a07c8dece2c557fa9144632..2c08c8ac1053cae39039de2817189188e03f0330 100644 (file)
--- 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 (file)
index b3c30cc..0000000
--- 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
index e7c38d24c051d6692f2aac2ff4bde0016c9155c5..7d0488449ef4fa9adf2fd444a531b4bc1b1a931d 100644 (file)
@@ -42,7 +42,6 @@
 
 #include "config.h"
 #include "common.h"
-#include "dhcpf.h"
 #include "if-options.h"
 #include "net.h"