2 * $Id: libnet.h,v 1.1.1.1 2000/05/25 00:28:49 route Exp $
4 * libnet.h - Network routine library header file
6 * Copyright (c) 1998 - 2001 Mike D. Schiffman <mike@infonexus.com>
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 #include <sys/ioctl.h>
42 #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFADDR)
43 #include <sys/sockio.h>
46 #include <sys/types.h>
48 #include <sys/socket.h>
49 #include <netinet/in.h>
50 #include <netinet/in_systm.h>
51 #include <netinet/ip.h>
54 #include <netinet/ip_var.h>
56 #if (HAVE_NET_ETHERNET_H)
57 #include <net/ethernet.h>
58 #endif /* HAVE_NET_ETHERNET_H */
59 #endif /* __linux__ */
60 #include <netinet/tcp.h>
61 #include <netinet/udp.h>
62 #include <netinet/ip_icmp.h>
63 #if (__linux__) && !(__GLIBC__)
65 * We get multiple definitions of IGMP_AGE_THRESHOLD if we include netinet.
67 #include <linux/igmp.h>
69 #include <netinet/igmp.h>
71 #include <arpa/inet.h>
78 #include "./libnet/libnet-headers.h"
79 #include "./libnet/libnet-structures.h"
80 #include "./libnet/libnet-macros.h"
81 #include "./libnet/libnet-asn1.h"
82 #include "./libnet/libnet-functions.h"
83 #include "./libnet/libnet-ospf.h"
85 #define LIBNET_VERSION "1.0.2a"
87 #if __BYTE_ORDER == __LITTLE_ENDIAN
88 #undef LIBNET_LIL_ENDIAN
89 #define LIBNET_LIL_ENDIAN 1
90 #elif __BYTE_ORDER == __BIG_ENDIAN
91 #undef LIBNET_BIG_ENDIAN
92 #define LIBNET_BIG_ENDIAN 1
94 #error "unknown endian"
97 #endif /* __LIBNET_H */