Annotation of embedaddon/libnet/include/libnet.h.in, revision 1.1.1.1

1.1       misho       1: /*
                      2:  *  $Id: libnet.h.in,v 1.5 2004/01/17 07:51:19 mike Exp $
                      3:  *
                      4:  *  libnet.h - Network routine library header file
                      5:  *
                      6:  *  Copyright (c) 1998 - 2004 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:  * @file libnet.h
                     36:  * @brief toplevel libnet header file
                     37:  */
                     38: 
                     39: /** 
                     40:  * @mainpage Libnet Packet Assembly Library
                     41:  *
                     42:  * @section intro Overview
                     43:  *
                     44:  * Libnet is a high-level API (toolkit) allowing the application programmer to 
                     45:  * construct and inject network packets. It provides a portable and simplified 
                     46:  * interface for low-level network packet shaping, handling and injection. 
                     47:  * Libnet hides much of the tedium of packet creation from the application 
                     48:  * programmer such as multiplexing, buffer management, arcane packet header 
                     49:  * information, byte-ordering, OS-dependent issues, and much more. Libnet 
                     50:  * features portable packet creation interfaces at the IP layer and link layer,
                     51:  * as well as a host of supplementary and complementary functionality. Using 
                     52:  * libnet, quick and simple packet assembly applications can be whipped up with
                     53:  * little effort. With a bit more time, more complex programs can be written 
                     54:  * (Traceroute and ping were easily rewritten using libnet and 
                     55:  * <a href="www.tcpdump.org">libpcap</a>).
                     56:  */ 
                     57: 
                     58: #ifdef __cplusplus
                     59: extern "C" {
                     60: #endif
                     61: 
                     62: #define _GNU_SOURCE
                     63: #include <stdio.h>
                     64: #include <string.h>
                     65: #include <unistd.h>
                     66: #include <fcntl.h>
                     67: #include <signal.h>
                     68: #include <stdlib.h>
                     69: #if !defined(__WIN32__)
                     70: #include <sys/ioctl.h>
                     71: #endif /* __WIN32__ */
                     72: #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFADDR)
                     73: #include <sys/sockio.h>
                     74: #endif
                     75: #include <sys/stat.h>
                     76: #include <sys/types.h>
                     77: #include <ctype.h>
                     78: #if !defined(__WIN32__)
                     79: #include <sys/socket.h>
                     80: #include <netinet/in.h>
                     81: #include <netinet/in_systm.h>
                     82: #include <netinet/ip.h>
                     83: #include <net/if.h>
                     84: #else /* __WIN32__ */
                     85: #if (__CYGWIN__)
                     86: #include <sys/socket.h>
                     87: #endif
                     88: #include <ws2tcpip.h>
                     89: #include <windows.h>
                     90: #include <winsock2.h>
                     91: #include <win32/in_systm.h>
                     92: #endif /* __WIN32__ */
                     93: #if !(__linux__) && !(__WIN32__) && !(__APPLE__) && !(__CYGWIN__)
                     94: #include <netinet/ip_var.h>
                     95: #else   /* __linux__ */
                     96: #if (HAVE_NET_ETHERNET_H)
                     97: #include <net/ethernet.h>
                     98: #endif  /* HAVE_NET_ETHERNET_H */
                     99: #endif  /* __linux__ */
                    100: #if !defined(__WIN32__)
                    101: #include <netinet/tcp.h>
                    102: #include <netinet/udp.h>
                    103: #if (__linux__) && !(__GLIBC__)
                    104: /* we get multiple definitions of IGMP_AGE_THRESHOLD if we include netinet */
                    105: #include <linux/igmp.h>
                    106: #else
                    107: #include <netinet/igmp.h>
                    108: #endif
                    109: #include <arpa/inet.h>
                    110: #include <sys/time.h>
                    111: #include <netdb.h>
                    112: #endif /* __WIN32__ */
                    113: #include <errno.h>
                    114: #include <stdarg.h>
                    115: 
                    116: #define LIBNET_VERSION  "@LIBNET_VERSION@"
                    117: #define @ENDIANESS@ 1
                    118: 
                    119: #include "./libnet/libnet-types.h"
                    120: #include "./libnet/libnet-macros.h"
                    121: #include "./libnet/libnet-headers.h"
                    122: #include "./libnet/libnet-structures.h"
                    123: #include "./libnet/libnet-asn1.h"
                    124: #include "./libnet/libnet-functions.h"
                    125: 
                    126: #ifdef __cplusplus
                    127: }
                    128: #endif
                    129: 
                    130: #endif  /* __LIBNET_H */
                    131: 
                    132: /* EOF */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>