libnet.h

Go to the documentation of this file.
00001 /*
00002  *  $Id: libnet.h.in,v 1.5 2004/01/17 07:51:19 mike Exp $
00003  *
00004  *  libnet.h - Network routine library header file
00005  *
00006  *  Copyright (c) 1998 - 2004 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 
00058 #ifdef __cplusplus
00059 extern "C" {
00060 #endif
00061 
00062 #define _GNU_SOURCE
00063 #include <stdio.h>
00064 #include <string.h>
00065 #include <unistd.h>
00066 #include <fcntl.h>
00067 #include <signal.h>
00068 #include <stdlib.h>
00069 #if !defined(__WIN32__)
00070 #include <sys/ioctl.h>
00071 #endif /* __WIN32__ */
00072 #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFADDR)
00073 #include <sys/sockio.h>
00074 #endif
00075 #include <sys/stat.h>
00076 #include <sys/types.h>
00077 #include <ctype.h>
00078 #if !defined(__WIN32__)
00079 #include <sys/socket.h>
00080 #include <netinet/in.h>
00081 #include <netinet/in_systm.h>
00082 #include <netinet/ip.h>
00083 #include <net/if.h>
00084 #else /* __WIN32__ */
00085 #if (__CYGWIN__)
00086 #include <sys/socket.h>
00087 #endif
00088 #include <ws2tcpip.h>
00089 #include <windows.h>
00090 #include <winsock2.h>
00091 #include <win32/in_systm.h>
00092 #endif /* __WIN32__ */
00093 #if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__) && !(__GNU__)
00094 #include <netinet/ip_var.h>
00095 #else   /* __linux__ */
00096 #if (HAVE_NET_ETHERNET_H)
00097 #include <net/ethernet.h>
00098 #endif  /* HAVE_NET_ETHERNET_H */
00099 #endif  /* __linux__ */
00100 #if !defined(__WIN32__)
00101 #include <netinet/tcp.h>
00102 #include <netinet/udp.h>
00103 #if (__linux__) && !(__GLIBC__)
00104 /* we get multiple definitions of IGMP_AGE_THRESHOLD if we include netinet */
00105 #include <linux/igmp.h>
00106 #else
00107 #include <netinet/igmp.h>
00108 #endif
00109 #include <arpa/inet.h>
00110 #include <sys/time.h>
00111 #include <netdb.h>
00112 #endif /* __WIN32__ */
00113 #include <errno.h>
00114 #include <stdarg.h>
00115 
00116 #define LIBNET_VERSION  "1.1.3"
00117 
00118 #define LIBNET_LIL_ENDIAN 1
00119 
00120 #include "./libnet/libnet-types.h"
00121 #include "./libnet/libnet-macros.h"
00122 #include "./libnet/libnet-headers.h"
00123 #include "./libnet/libnet-structures.h"
00124 #include "./libnet/libnet-asn1.h"
00125 #include "./libnet/libnet-functions.h"
00126 
00127 #ifdef __cplusplus
00128 }
00129 #endif
00130 
00131 #endif  /* __LIBNET_H */
00132 
00133 /* EOF */

Generated on Mon May 11 17:22:06 2009 for libnet by  doxygen 1.5.3