OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / lib / Libnet / include / libnet.h
1 /*
2  *  $Id: libnet.h,v 1.1.1.1 2000/05/25 00:28:49 route Exp $
3  *
4  *  libnet.h - Network routine library header file
5  *
6  *  Copyright (c) 1998 - 2001 Mike D. Schiffman <mike@infonexus.com>
7  *  All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
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.
17  *
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
28  * SUCH DAMAGE.
29  *
30  */
31
32 #ifndef __LIBNET_H
33 #define __LIBNET_H
34
35 #include <stdio.h>
36 #include <string.h>
37 #include <unistd.h>
38 #include <fcntl.h>
39 #include <signal.h>
40 #include <stdlib.h>
41 #include <sys/ioctl.h>
42 #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFADDR)
43 #include <sys/sockio.h>
44 #endif
45 #include <sys/stat.h>
46 #include <sys/types.h>
47 #include <ctype.h>
48 #include <sys/socket.h>
49 #include <netinet/in.h>
50 #include <netinet/in_systm.h>
51 #include <netinet/ip.h>
52 #include <net/if.h>
53 #if !(__linux__)
54 #include <netinet/ip_var.h>
55 #else   /* __linux__ */
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__)
64 /*
65  *  We get multiple definitions of IGMP_AGE_THRESHOLD if we include netinet.
66  */
67 #include <linux/igmp.h>
68 #else
69 #include <netinet/igmp.h>
70 #endif
71 #include <arpa/inet.h>
72 #include <sys/time.h>
73 #include <netdb.h>
74 #include <errno.h>
75 #include <assert.h>
76 #include <endian.h>
77
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"
84
85 #define LIBNET_VERSION  "1.0.2a"
86
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
93 #else
94 #error "unknown endian"
95 #endif
96
97 #endif  /* __LIBNET_H */
98
99 /* EOF */