Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

libnet.h

Go to the documentation of this file.
00001 /*
00002  *  $Id$
00003  *
00004  *  libnet.h - Network routine library header file
00005  *
00006  *  Copyright (c) 1998, 1999, 2000 Mike D. Schiffman <mike@infonexus.com>
00007  *  All rights reserved.
00008  *
00009  * Redistribution and use in source and binary forms, with or without
00010  * modification, are permitted provided that the following conditions
00011  * are met:
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer.
00014  * 2. Redistributions in binary form must reproduce the above copyright
00015  *    notice, this list of conditions and the following disclaimer in the
00016  *    documentation and/or other materials provided with the distribution.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
00019  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
00022  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00023  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00024  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00025  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00026  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00027  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00028  * SUCH DAMAGE.
00029  *
00030  */
00031 
00032 #ifndef __LIBNET_H
00033 #define __LIBNET_H
00034 
00035 #include <stdio.h>
00036 #include <string.h>
00037 #include <unistd.h>
00038 #include <fcntl.h>
00039 #include <signal.h>
00040 #include <stdlib.h>
00041 #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFADDR)
00042 #include <sys/sockio.h>
00043 #endif
00044 #include <sys/stat.h>
00045 #include <sys/types.h>
00046 #include <ctype.h>
00047 #if(WIN32)
00048 #include "LibnetNT.h"
00049 #else
00050 #include <sys/ioctl.h>
00051 #include <sys/socket.h>
00052 #include <netinet/in.h>
00053 #include <netinet/in_systm.h>
00054 #include <netinet/ip.h>
00055 #include <net/if.h>
00056 #if !(__linux__)
00057 #include <netinet/ip_var.h>
00058 #else   /* __linux__ */
00059 #if (HAVE_NET_ETHERNET_H)
00060 #include <net/ethernet.h>
00061 #endif  /* HAVE_NET_ETHERNET_H */
00062 #endif  /* __linux__ */
00063 #include <netinet/tcp.h>
00064 #include <netinet/udp.h>
00065 #include <netinet/ip_icmp.h>
00066 #if (__linux__) && !(__GLIBC__)
00067 /*
00068  *  We get multiple definitions of IGMP_AGE_THRESHOLD if we include netinet.
00069  */
00070 #include <linux/igmp.h>
00071 #else
00072 #include <netinet/igmp.h>
00073 #endif
00074 #include <arpa/inet.h>
00075 #include <sys/time.h>
00076 #include <netdb.h>
00077 #endif
00078 
00079 
00080 #include <errno.h>
00081 #include <assert.h>
00082 
00083 #include "./libnet/libnet-headers.h"
00084 #include "./libnet/libnet-structures.h"
00085 #include "./libnet/libnet-macros.h"
00086 #include "./libnet/libnet-asn1.h"
00087 #include "./libnet/libnet-functions.h"
00088 #include "./libnet/libnet-ospf.h"
00089 
00090 #define LIBNET_VERSION  "1.0.1a"
00091 
00092 #if (!LIBNET_LIL_ENDIAN && !LIBNET_BIG_ENDIAN)
00093 #error "byte order has not been specified, you'll
00094 need to #define either LIBNET_LIL_ENDIAN or LIBNET_BIG_ENDIAN.  See the
00095 documentation regarding the libnet-config script."
00096 #endif
00097 
00098 #endif  /* __LIBNET_H */
00099 
00100 /* EOF */

Generated on Sun May 14 14:51:19 2006 by  doxygen 1.4.2