Changeset 1960

Show
Ignore:
Timestamp:
01/17/08 09:36:20 (12 months ago)
Author:
aturner
Message:

sync up workspace to allow merge of 3.2.4 changes. refs #42

Location:
trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1616*.tmproj 
        1717*.exe 
         18*.tar.gz 
  • trunk/aclocal.m4

    r1885 r1960  
    74997499dnl DO NOT EDIT THIS FILE   (libopts.m4) 
    75007500dnl  
    7501 dnl It has been AutoGen-ed  Saturday May  5, 2007 at 12:02:37 PM PDT 
     7501dnl It has been AutoGen-ed  Saturday July 28, 2007 at 01:01:51 PM PDT 
    75027502dnl From the definitions    libopts.def 
    75037503dnl and the template file   conftest.tpl 
     
    75827582  AC_CHECK_LIB(gen, pathfind) 
    75837583  AC_FUNC_VPRINTF 
    7584   AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr strrchr]) 
     7584  AC_CHECK_FUNCS([strsignal mmap canonicalize_file_name snprintf strdup strchr strrchr]) 
    75857585[  INVOKE_LIBOPTS_MACROS_FIRST_done=yes 
    75867586fi]]) 
     
    79177917dnl @synopsis  LIBOPTS_CHECK 
    79187918dnl 
    7919 dnl Time-stamp:        "2006-09-23 19:36:24 bkorb" 
     7919dnl Time-stamp:        "2007-07-04 11:41:40 bkorb" 
    79207920dnl Last Committed:    $Date$ 
    79217921dnl 
     
    79247924dnl the config tests that the library needs.  Invoke the 
    79257925dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts. 
     7926dnl 
     7927dnl  This file is part of AutoGen. 
     7928dnl  AutoGen copyright (c) 1992-2007 Bruce Korb - all rights reserved 
     7929dnl 
     7930dnl  AutoGen is free software: you can redistribute it and/or modify it 
     7931dnl  under the terms of the GNU General Public License as published by the 
     7932dnl  Free Software Foundation, either version 3 of the License, or 
     7933dnl  (at your option) any later version. 
     7934dnl 
     7935dnl  AutoGen is distributed in the hope that it will be useful, but 
     7936dnl  WITHOUT ANY WARRANTY; without even the implied warranty of 
     7937dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
     7938dnl  See the GNU General Public License for more details. 
     7939dnl 
     7940dnl  You should have received a copy of the GNU General Public License along 
     7941dnl  with this program.  If not, see <http://www.gnu.org/licenses/>. 
    79267942dnl 
    79277943dnl Default to system libopts 
     
    80058021]) 
    80068022# liboptschk.m4 serial 1 (autogen - 5.7.3) 
    8007 dnl Copyright (C) 2005 Free Software Foundation, Inc. 
     8023dnl copyright (c) 2005 by Bruce Korb - all rights reserved 
    80088024dnl This file is free software; the Free Software Foundation 
    80098025dnl gives unlimited permission to copy and/or distribute it, 
  • trunk/src/config.h.in

    r1877 r1960  
    1 /* src/config.h.in.  Generated from configure.in by autoheader.  */ 
     1/* src/config.h.in.  Generated from configure.ac by autoheader.  */ 
    22 
    33/* Enable debuging code and support for the -d option */ 
    44#undef DEBUG 
    55 
     6/* Enable dmalloc function arg checking */ 
     7#undef DMALLOC_FUNC_CHECK 
     8 
    69/* Enable Electric Fence memory debugger */ 
    710#undef EFENCE 
     
    1013#undef ENABLE_64BITS 
    1114 
     15/* Enable dmalloc */ 
     16#undef ENABLE_DMALLOC 
     17 
    1218/* Enable dynamically linking libs */ 
    1319#undef ENABLE_DYNAMIC_LINK 
    1420 
    15 /* Enable building flowreplay (alpha) */ 
    16 #undef ENABLE_FLOWREPLAY 
     21/* Enable fragroute module */ 
     22#undef ENABLE_FRAGROUTE 
    1723 
    1824/* Enable use of pcap_findalldevs() */ 
     
    122128#undef HAVE_INTTYPES_H 
    123129 
     130/* Do we have libdnet? */ 
     131#undef HAVE_LIBDNET 
     132 
    124133/* Define to 1 if you have the `gen' library (-lgen). */ 
    125134#undef HAVE_LIBGEN 
     
    252261#undef HAVE_STRRCHR 
    253262 
     263/* Define to 1 if you have the `strsignal' function. */ 
     264#undef HAVE_STRSIGNAL 
     265 
    254266/* Define to 1 if you have the `strtol' function. */ 
    255267#undef HAVE_STRTOL 
     
    260272/* Define to 1 if `tv_sec' is member of `struct timeval'. */ 
    261273#undef HAVE_STRUCT_TIMEVAL_TV_SEC 
     274 
     275/* Define to 1 if you have the <sysexits.h> header file. */ 
     276#undef HAVE_SYSEXITS_H 
    262277 
    263278/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. 
     
    363378   <sysmacros.h>. */ 
    364379#undef MAJOR_IN_SYSMACROS 
     380 
     381/* Define this if optional arguments are disallowed */ 
     382#undef NO_OPTIONAL_OPT_ARGS 
    365383 
    366384/* This is our package name */ 
  • trunk/src/fragroute/mod.c

    r1949 r1960  
    9191                return (-1); 
    9292        } 
    93          
     93    warn("opened config file..."); 
    9494        /* read the file, one line at a time... */ 
    9595        for (i = 1; fgets(buf, sizeof(buf), fp) != NULL; i++) { 
     
    106106                } 
    107107                 
     108        warnx("argc = %d, %s, %s, %s", argc, argv[0], argv[1], argv[2]); 
    108109                /* check first keyword against modules */ 
    109110                for (m = mods; *m != NULL; m++) { 
    110                         if (strcasecmp((*m)->name, argv[0]) == 0) 
     111                        if (strcasecmp((*m)->name, argv[0]) == 0) { 
     112                warnx("comparing %s to %s", argv[0], (*m)->name); 
    111113                                break; 
     114                        } 
    112115                } 
    113116                 
     
    141144        /* close the file */ 
    142145        fclose(fp); 
    143  
     146    warn("close file..."); 
     147     
    144148        if (ret == 0) { 
    145149                buf[0] = '\0'; 
     
    149153                } 
    150154                buf[strlen(buf) - 4] = '\0'; 
    151                 sprintf(errbuf, "%s", buf); 
    152         ret = -1; 
     155                sprintf(errbuf, "wtf: %s", buf); 
     156        // ret = -1; 
    153157        } 
    154158        return (ret); 
  • trunk/src/tcpr.h

    r1757 r1960  
    7171#define TCPR_TCP_DNSV4_H      0x0e    /**< TCP DNS v4 header:   14 bytes */ 
    7272#define TCPR_ETH_H            0x0e    /**< Ethernet header:     14 bytes */ 
     73#define TCPR_ETH_MTU          1500    /**< Ethernet MTU size: 1500 bytes */ 
    7374#define TCPR_FDDI_H           0x15    /**< FDDI header:         21 bytes */ 
    7475#define TCPR_ICMPV4_H         0x04    /**< ICMP header base:     4 bytes */ 
     
    15881589}; 
    15891590 
     1591 
    15901592/* 
    15911593 *  Token Ring Header 
  • trunk/src/tcprewrite.c

    r1950 r1960  
    107107                tcpedit_geterr(tcpedit)); 
    108108    } 
    109  
     109     
    110110   /* open up the output file */ 
    111111    options.outfile = safe_strdup(OPT_ARG(OUTFILE)); 
     
    118118        pcap_datalink_val_to_name(pcap_datalink(dlt_pcap))); 
    119119 
     120#ifdef ENABLE_FRAGROUTE 
    120121    if (options.fragroute_args) { 
    121122        if ((options.frag_ctx = fragroute_init(65535, options.fragroute_args, ebuf)) == NULL) 
    122123            errx(1, "%s", ebuf); 
    123124    } 
     125#endif 
    124126 
    125127#ifdef ENABLE_VERBOSE 
     
    227229    const u_char *pktdata = NULL;               /* packet from libpcap */ 
    228230    u_char **packet = NULL;                     /* packet from tcpedit */ 
    229     char *frag = NULL; 
     231    static char *frag = NULL; 
    230232    COUNTER packetnum = 0; 
    231     int rcode, frag_len; 
     233    int rcode, frag_len, i; 
    232234 
    233235    pkthdr_ptr = &pkthdr; 
     236 
     237    if (frag == NULL) 
     238        frag = (char *)safe_malloc(65535); /* mtu size */ 
    234239 
    235240    /* MAIN LOOP  
     
    279284                    (cache_result == TCPR_DIR_C2S && options.fragroute_dir == FRAGROUTE_DIR_C2S) || 
    280285                    (cache_result == TCPR_DIR_S2C && options.fragroute_dir == FRAGROUTE_DIR_S2C)) { 
    281                 fragroute_process(options.frag_ctx, *packet, pkthdr_ptr->caplen); 
     286                if (fragroute_process(options.frag_ctx, *packet, pkthdr_ptr->caplen) != 0) { 
     287                    errx(1, "Error processing packet via fragroute %s", options.frag_ctx->errbuf); 
     288                } 
     289                i = 0; 
    282290                while ((frag_len = fragroute_getfragment(options.frag_ctx, &frag)) > 0) { 
    283291                    /* frags get the same timestamp as the original packet */ 
     292                    notice("processing frag: %u", i++); 
    284293                    pkthdr_ptr->caplen = frag_len; 
    285294                    pkthdr_ptr->len = frag_len;