*: simplify Ethernet header includes

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Dan Fandrich
2011-06-10 05:17:59 +02:00
committed by Denys Vlasenko
parent d488f5e8db
commit f533ec8767
10 changed files with 33 additions and 59 deletions

View File

@@ -25,14 +25,8 @@
#include "dhcpd.h"
#include "dhcpc.h"
#include <asm/types.h>
#if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION)
# include <netpacket/packet.h>
# include <net/ethernet.h>
#else
# include <linux/if_packet.h>
# include <linux/if_ether.h>
#endif
#include <netinet/if_ether.h>
#include <netpacket/packet.h>
#include <linux/filter.h>
/* struct client_config_t client_config is in bb_common_bufsiz1 */

View File

@@ -6,18 +6,11 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
#include <netinet/in.h>
#if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION
# include <netpacket/packet.h>
# include <net/ethernet.h>
#else
# include <asm/types.h>
# include <linux/if_packet.h>
# include <linux/if_ether.h>
#endif
#include "common.h"
#include "dhcpd.h"
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <netpacket/packet.h>
void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type)
{

View File

@@ -22,17 +22,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <net/if.h>
#if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION
# include <netpacket/packet.h>
# include <net/ethernet.h>
#else
# include <asm/types.h>
# include <linux/if_packet.h>
# include <linux/if_ether.h>
#endif
#include "common.h"
#include <net/if.h>
int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *mac)
{