Changeset 1960
- Timestamp:
- 01/17/08 09:36:20 (12 months ago)
- Location:
- trunk
- Files:
-
- 6 modified
-
. (modified) (1 prop)
-
aclocal.m4 (modified) (5 diffs)
-
src/config.h.in (modified) (6 diffs)
-
src/fragroute/mod.c (modified) (4 diffs)
-
src/tcpr.h (modified) (2 diffs)
-
src/tcprewrite.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 16 16 *.tmproj 17 17 *.exe 18 *.tar.gz
-
- Property svn:ignore
-
trunk/aclocal.m4
r1885 r1960 7499 7499 dnl DO NOT EDIT THIS FILE (libopts.m4) 7500 7500 dnl 7501 dnl It has been AutoGen-ed Saturday May 5, 2007 at 12:02:37PM PDT7501 dnl It has been AutoGen-ed Saturday July 28, 2007 at 01:01:51 PM PDT 7502 7502 dnl From the definitions libopts.def 7503 7503 dnl and the template file conftest.tpl … … 7582 7582 AC_CHECK_LIB(gen, pathfind) 7583 7583 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]) 7585 7585 [ INVOKE_LIBOPTS_MACROS_FIRST_done=yes 7586 7586 fi]]) … … 7917 7917 dnl @synopsis LIBOPTS_CHECK 7918 7918 dnl 7919 dnl Time-stamp: "200 6-09-23 19:36:24bkorb"7919 dnl Time-stamp: "2007-07-04 11:41:40 bkorb" 7920 7920 dnl Last Committed: $Date$ 7921 7921 dnl … … 7924 7924 dnl the config tests that the library needs. Invoke the 7925 7925 dnl "INVOKE_LIBOPTS_MACROS" macro iff we are building libopts. 7926 dnl 7927 dnl This file is part of AutoGen. 7928 dnl AutoGen copyright (c) 1992-2007 Bruce Korb - all rights reserved 7929 dnl 7930 dnl AutoGen is free software: you can redistribute it and/or modify it 7931 dnl under the terms of the GNU General Public License as published by the 7932 dnl Free Software Foundation, either version 3 of the License, or 7933 dnl (at your option) any later version. 7934 dnl 7935 dnl AutoGen is distributed in the hope that it will be useful, but 7936 dnl WITHOUT ANY WARRANTY; without even the implied warranty of 7937 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 7938 dnl See the GNU General Public License for more details. 7939 dnl 7940 dnl You should have received a copy of the GNU General Public License along 7941 dnl with this program. If not, see <http://www.gnu.org/licenses/>. 7926 7942 dnl 7927 7943 dnl Default to system libopts … … 8005 8021 ]) 8006 8022 # liboptschk.m4 serial 1 (autogen - 5.7.3) 8007 dnl Copyright (C) 2005 Free Software Foundation, Inc.8023 dnl copyright (c) 2005 by Bruce Korb - all rights reserved 8008 8024 dnl This file is free software; the Free Software Foundation 8009 8025 dnl gives unlimited permission to copy and/or distribute it, -
trunk/src/config.h.in
r1877 r1960 1 /* src/config.h.in. Generated from configure. inby autoheader. */1 /* src/config.h.in. Generated from configure.ac by autoheader. */ 2 2 3 3 /* Enable debuging code and support for the -d option */ 4 4 #undef DEBUG 5 5 6 /* Enable dmalloc function arg checking */ 7 #undef DMALLOC_FUNC_CHECK 8 6 9 /* Enable Electric Fence memory debugger */ 7 10 #undef EFENCE … … 10 13 #undef ENABLE_64BITS 11 14 15 /* Enable dmalloc */ 16 #undef ENABLE_DMALLOC 17 12 18 /* Enable dynamically linking libs */ 13 19 #undef ENABLE_DYNAMIC_LINK 14 20 15 /* Enable building flowreplay (alpha)*/16 #undef ENABLE_F LOWREPLAY21 /* Enable fragroute module */ 22 #undef ENABLE_FRAGROUTE 17 23 18 24 /* Enable use of pcap_findalldevs() */ … … 122 128 #undef HAVE_INTTYPES_H 123 129 130 /* Do we have libdnet? */ 131 #undef HAVE_LIBDNET 132 124 133 /* Define to 1 if you have the `gen' library (-lgen). */ 125 134 #undef HAVE_LIBGEN … … 252 261 #undef HAVE_STRRCHR 253 262 263 /* Define to 1 if you have the `strsignal' function. */ 264 #undef HAVE_STRSIGNAL 265 254 266 /* Define to 1 if you have the `strtol' function. */ 255 267 #undef HAVE_STRTOL … … 260 272 /* Define to 1 if `tv_sec' is member of `struct timeval'. */ 261 273 #undef HAVE_STRUCT_TIMEVAL_TV_SEC 274 275 /* Define to 1 if you have the <sysexits.h> header file. */ 276 #undef HAVE_SYSEXITS_H 262 277 263 278 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. … … 363 378 <sysmacros.h>. */ 364 379 #undef MAJOR_IN_SYSMACROS 380 381 /* Define this if optional arguments are disallowed */ 382 #undef NO_OPTIONAL_OPT_ARGS 365 383 366 384 /* This is our package name */ -
trunk/src/fragroute/mod.c
r1949 r1960 91 91 return (-1); 92 92 } 93 93 warn("opened config file..."); 94 94 /* read the file, one line at a time... */ 95 95 for (i = 1; fgets(buf, sizeof(buf), fp) != NULL; i++) { … … 106 106 } 107 107 108 warnx("argc = %d, %s, %s, %s", argc, argv[0], argv[1], argv[2]); 108 109 /* check first keyword against modules */ 109 110 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); 111 113 break; 114 } 112 115 } 113 116 … … 141 144 /* close the file */ 142 145 fclose(fp); 143 146 warn("close file..."); 147 144 148 if (ret == 0) { 145 149 buf[0] = '\0'; … … 149 153 } 150 154 buf[strlen(buf) - 4] = '\0'; 151 sprintf(errbuf, " %s", buf);152 ret = -1;155 sprintf(errbuf, "wtf: %s", buf); 156 // ret = -1; 153 157 } 154 158 return (ret); -
trunk/src/tcpr.h
r1757 r1960 71 71 #define TCPR_TCP_DNSV4_H 0x0e /**< TCP DNS v4 header: 14 bytes */ 72 72 #define TCPR_ETH_H 0x0e /**< Ethernet header: 14 bytes */ 73 #define TCPR_ETH_MTU 1500 /**< Ethernet MTU size: 1500 bytes */ 73 74 #define TCPR_FDDI_H 0x15 /**< FDDI header: 21 bytes */ 74 75 #define TCPR_ICMPV4_H 0x04 /**< ICMP header base: 4 bytes */ … … 1588 1589 }; 1589 1590 1591 1590 1592 /* 1591 1593 * Token Ring Header -
trunk/src/tcprewrite.c
r1950 r1960 107 107 tcpedit_geterr(tcpedit)); 108 108 } 109 109 110 110 /* open up the output file */ 111 111 options.outfile = safe_strdup(OPT_ARG(OUTFILE)); … … 118 118 pcap_datalink_val_to_name(pcap_datalink(dlt_pcap))); 119 119 120 #ifdef ENABLE_FRAGROUTE 120 121 if (options.fragroute_args) { 121 122 if ((options.frag_ctx = fragroute_init(65535, options.fragroute_args, ebuf)) == NULL) 122 123 errx(1, "%s", ebuf); 123 124 } 125 #endif 124 126 125 127 #ifdef ENABLE_VERBOSE … … 227 229 const u_char *pktdata = NULL; /* packet from libpcap */ 228 230 u_char **packet = NULL; /* packet from tcpedit */ 229 char *frag = NULL;231 static char *frag = NULL; 230 232 COUNTER packetnum = 0; 231 int rcode, frag_len ;233 int rcode, frag_len, i; 232 234 233 235 pkthdr_ptr = &pkthdr; 236 237 if (frag == NULL) 238 frag = (char *)safe_malloc(65535); /* mtu size */ 234 239 235 240 /* MAIN LOOP … … 279 284 (cache_result == TCPR_DIR_C2S && options.fragroute_dir == FRAGROUTE_DIR_C2S) || 280 285 (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; 282 290 while ((frag_len = fragroute_getfragment(options.frag_ctx, &frag)) > 0) { 283 291 /* frags get the same timestamp as the original packet */ 292 notice("processing frag: %u", i++); 284 293 pkthdr_ptr->caplen = frag_len; 285 294 pkthdr_ptr->len = frag_len;
