diff options
author | Joachim Wiberg <troglobit@gmail.com> | 2022-12-30 11:02:09 +0100 |
---|---|---|
committer | Joachim Wiberg <troglobit@gmail.com> | 2022-12-30 11:02:09 +0100 |
commit | 76e13690032bc084e69b8bd504a3dec3044ebdd2 (patch) | |
tree | 6ab125ba626c6de1a2a4e06c4cd01cb718f30d8d | |
parent | ef309240b2e36aaa92a39c7da3865f1640aa6b9b (diff) | |
download | libnet-76e13690032bc084e69b8bd504a3dec3044ebdd2.tar.gz |
include: drop internal-only ifaddrlist.h include
Only used in libnet_if_addr.c and never documented as a public API.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/ifaddrlist.h | 58 | ||||
-rw-r--r-- | src/libnet_if_addr.c | 16 |
3 files changed, 16 insertions, 60 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index a92bd28..a61c849 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -6,4 +6,4 @@ nobase_include_HEADERS = libnet.h \ libnet/libnet-structures.h \ libnet/libnet-types.h -EXTRA_DIST = gnuc.h ifaddrlist.h config.h +EXTRA_DIST = gnuc.h config.h diff --git a/include/ifaddrlist.h b/include/ifaddrlist.h deleted file mode 100644 index 331e3ac..0000000 --- a/include/ifaddrlist.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1997 - * The Regents of the University of California. 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - */ - -struct ifaddrlist -{ -#if (HAVE_SOLARIS || HAVE_HPUX11) - uint addr; -#else - uint32_t addr; -#endif - char *device; -}; - -struct libnet_ifaddr_list -{ - uint32_t addr; - char *device; -}; - -int -ifaddrlist( - struct ifaddrlist **, - int8_t * - ); - - -int -set_up_interface( - struct sockaddr_in **, - uint8_t ** - ); - diff --git a/src/libnet_if_addr.c b/src/libnet_if_addr.c index 241904d..1a6d041 100644 --- a/src/libnet_if_addr.c +++ b/src/libnet_if_addr.c @@ -44,7 +44,21 @@ #include <net/if.h> #endif -#include "../include/ifaddrlist.h" +struct ifaddrlist +{ +#if (HAVE_SOLARIS || HAVE_HPUX11) + uint addr; +#else + uint32_t addr; +#endif + char *device; +}; + +struct libnet_ifaddr_list +{ + uint32_t addr; + char *device; +}; #define MAX_IPADDR 512 static size_t ip_addr_num = MAX_IPADDR; |