Blame compat/ether.h

Packit 6bd9ab
/*
Packit 6bd9ab
   ether.h - ethernet definitions for systems lacking those
Packit 6bd9ab
Packit 6bd9ab
   Copyright (C) 2008-2017 Arthur de Jong
Packit 6bd9ab
Packit 6bd9ab
   This library is free software; you can redistribute it and/or
Packit 6bd9ab
   modify it under the terms of the GNU Lesser General Public
Packit 6bd9ab
   License as published by the Free Software Foundation; either
Packit 6bd9ab
   version 2.1 of the License, or (at your option) any later version.
Packit 6bd9ab
Packit 6bd9ab
   This library is distributed in the hope that it will be useful,
Packit 6bd9ab
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6bd9ab
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6bd9ab
   Lesser General Public License for more details.
Packit 6bd9ab
Packit 6bd9ab
   You should have received a copy of the GNU Lesser General Public
Packit 6bd9ab
   License along with this library; if not, write to the Free Software
Packit 6bd9ab
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit 6bd9ab
   02110-1301 USA
Packit 6bd9ab
*/
Packit 6bd9ab
Packit 6bd9ab
#ifndef COMPAT__ETHER_H
Packit 6bd9ab
#define COMPAT__ETHER_H 1
Packit 6bd9ab
Packit 6bd9ab
#include <sys/types.h>
Packit 6bd9ab
#include <sys/socket.h>
Packit 6bd9ab
#include <net/if.h>
Packit 6bd9ab
#include <netinet/in.h>
Packit 6bd9ab
#include <netinet/if_ether.h>
Packit 6bd9ab
#ifdef HAVE_NETINET_ETHER_H
Packit 6bd9ab
#include <netinet/ether.h>
Packit 6bd9ab
#endif
Packit 6bd9ab
Packit 6bd9ab
#ifndef HAVE_STRUCT_ETHER_ADDR
Packit 6bd9ab
struct ether_addr {
Packit 6bd9ab
  uint8_t ether_addr_octet[6];
Packit 6bd9ab
};
Packit 6bd9ab
#endif /* not HAVE_STRUCT_ETHER_ADDR */
Packit 6bd9ab
Packit 6bd9ab
#ifndef HAVE_ETHER_ATON_R
Packit 6bd9ab
struct ether_addr *ether_aton_r(const char *asc, struct ether_addr *addr);
Packit 6bd9ab
#endif /* not HAVE_ETHER_ATON_R */
Packit 6bd9ab
Packit 6bd9ab
#ifdef HAVE_ETHER_ATON
Packit 6bd9ab
#if !HAVE_DECL_ETHER_ATON
Packit 6bd9ab
/* we define ether_aton() here because on some platforms the function is
Packit 6bd9ab
   undefined */
Packit 6bd9ab
extern struct ether_addr *ether_aton(const char *s);
Packit 6bd9ab
#endif /* not HAVE_DECL_ETHER_ATON */
Packit 6bd9ab
#endif /* HAVE_ETHER_ATON */
Packit 6bd9ab
Packit 6bd9ab
#endif /* not COMPAT__ETHER_H */