aboutsummaryrefslogtreecommitdiffstats
path: root/randpkt.c
AgeCommit message (Collapse)AuthorFilesLines
2011-06-28Replace all strerror() with g_strerror().stig1-2/+2
Remove our local strerror implementation. Mark strerror as locale unsafe API. This fixes bug 5715. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37812 f5534014-38df-0310-8fa8-9805f1628bb7
2011-06-23Use ws_open/ws_read to avoid prohibited APIs.stig1-2/+4
Close file handle after usage. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37769 f5534014-38df-0310-8fa8-9805f1628bb7
2011-05-24Move the Windows argument list conversion code to a common routine.gerald1-15/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37372 f5534014-38df-0310-8fa8-9805f1628bb7
2011-01-06On Windows, convert all of our command-line arguments from UTF-16 togerald1-0/+22
UTF-8 where we don't already do so. In Wireshark use g_utf16_to_utf8 instead of utf_16to8. This should fix bug 5520. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35411 f5534014-38df-0310-8fa8-9805f1628bb7
2010-05-28Move some code (including the optional objects) into libwsutilmorriss1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33012 f5534014-38df-0310-8fa8-9805f1628bb7
2010-01-06Use /dev/urandom (which is non-blocking) instead of /dev/random (whichgerald1-6/+8
can block forever) for our seed. This fixes a problem with our new Linux build slave, which is running Linux 2.6 as a VM guest, and which was timing out waiting for entropy. Add a comment about using CryptGenRandom on Windows. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31456 f5534014-38df-0310-8fa8-9805f1628bb7
2009-10-06Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_Hstig1-5/+4
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30370 f5534014-38df-0310-8fa8-9805f1628bb7
2009-05-17From Márton Németh via bug 2137:gerald1-25/+90
Currently the randpkt random packet generator does not have support to generate WTAP_ENCAP_USB and WTAP_ENCAP_USB_LINUX type packets. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28388 f5534014-38df-0310-8fa8-9805f1628bb7
2008-11-17Make "-h" a valid flag.gerald1-1/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26799 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-31On non-Windows systems, try /dev/random and, if it exists, use it,guy1-23/+53
otherwise fall back on time(). Print error messages to stderr, and put the name of the program in them. Exit with 1 on command-line syntax errors, 2 on other errors. Fix indentation. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26661 f5534014-38df-0310-8fa8-9805f1628bb7
2008-10-31Fixed some "ignoring return value" warnings.stig1-1/+2
This is the last commit to make it compile clean on Ubuntu 8.10. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26654 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-25From Mike Harvey: Support for WiMAX and the WiMAX M2M encapsulation protocol.gerald1-8/+20
Add support for WiMAX and M2M to various makefiles and installer files. Add basic support for M2M to randpkt. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21945 f5534014-38df-0310-8fa8-9805f1628bb7
2006-04-26Check for NULL return value from wtap_dump_open().gram1-0/+4
Fixes coverity bug 159. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18005 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-14added compression support for capture file output. The Save/As dialog now ↵ulfl1-1/+1
has a checkbox "Compress with gzip" currently limited to Ethereal and all the variants of libpcap filetypes only. We might want to add output compression support to the other tools as well (tethereal, mergecap, ...). We might also want to add support for the other filetypes, but this is only possible if the filetype functions doesn't use special output operations like fseek. One bug is still left: if the input and output filetypes while saving are the same, Ethereal currently optimizes this by simply copy the binary file instead of using wiretap (so it will be faster but it will ignore the compress setting). Don't know a good workaround for this, as I don't know a way to find out if the input file is currently compressed or not. One idea might be to use a heuristic on the filesize (compared to the packet size summmary). Another workaround I see is to remove this optimization, which is of course not the way I like to do it ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15804 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-24The time stamp in a Wiretap packet header is now a wtap_nstime, not aguy1-3/+3
"struct timeval". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15522 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-26From Brice Augustin: Use the correct packet length in randpkt.gerald1-1/+1
Build randpkt.exe by default under Windows. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15092 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-23More 'char*' -> 'const char*' changes to fix warnings.jmayer1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15015 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-27Add SCTP and MEGACO types, so that we can add SCTP to the "random" test.gerald1-16/+61
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13931 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-17Insert "%s" at various points in an attempt to trigger format string bugs.gerald1-1/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13792 f5534014-38df-0310-8fa8-9805f1628bb7
2005-03-16For UDP output, set the length to 65535 instead of 0.gerald1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13768 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18Set the svn:eol-style property on all text files to "native", so thatguy1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11400 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-23Remove a comma at end of enumjmayer1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10198 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-17Clean up the TDS dissector a bit. Change a lot of signed ints togerald1-1/+24
unsigned, and set their size to match the protocol data assigned to them. Make sure the number of columns read doesn't exceed MAX_COLUMNS. Explicitly check for integer values > 0. Switch from using memcpy with tvb_get_ptr to tvb_memcpy. Make indentation consistent. Add TDS support to randpkt. Most of the generated packets won't pass the heuristic checks, but enough should make it through to adequately test the dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6653 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-16Add support for building randpkt under Windows.gerald1-1/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6433 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-15Fix signed/unsigned type mismatches, as pointed out by Silvio.gerald1-2/+35
Add BGP output to randpkt. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6420 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-18Add initial support for GIOP.gerald1-3/+37
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5501 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-24From Peter Valchev: fix editcap to assign the result of "getopt()" to anguy1-2/+2
"int" and to check "getopt()"s return value with -1 rather than EOF. Fix other "getopt()" loops to check against -1 as well (EOF is -1 on most if not all platforms, but the Single UNIX Specification says "getopt()" returns -1, so we should check against -1, not EOF). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4793 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-14Add ncp2222 as a type of packet than randpkt can produce.gram1-6/+29
If type passed in with -t option is unknown, die instead of using Ethernet as a default. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4737 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-13Hopefully the last time I have to change my e-mail address.gram1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4199 f5534014-38df-0310-8fa8-9805f1628bb7
2001-03-31BACNET support, from Hartmut Mueller.guy1-3/+24
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3214 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-21Make sure to pass the sent/received direction from pppdump.c ingram1-4/+4
pseudo_header. Use generic "p2p_phdr" instead of "lapd_phdr". Modify toshiba.c and packet-lapd.c to take that into account. Add frame.p2p_dir, a filterable field, 0=sent, 1=recvd Make p2p_dir available in packe_info, as I think it will be needed in VJ COMP and UNCOMP dissection. Rename WTAP_ENCAP_TR to WTAP_ENCAP_TOKEN_RING. Mention pppd-log support in man page. Mention atmsnoop in README. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2455 f5534014-38df-0310-8fa8-9805f1628bb7
2000-06-11Add syslog support to randpkt.gerald1-2/+24
Fix problems revealed by randpkt, add OS-specific info. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2056 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-19Add wtap-int.h. Move definitions relevant to the internal workins of wiretapgram1-2/+2
to that file, leave public definitions in wtap.h. Rename "union pseudo_header" to "union wtap_pseudo_header". Make the wtap_pseudo_header pointer available in packet_info struct. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1989 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-19Use new-style wtap_dump().gram1-2/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1978 f5534014-38df-0310-8fa8-9805f1628bb7
1999-10-07Add NBNS support.guy1-2/+24
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@780 f5534014-38df-0310-8fa8-9805f1628bb7
1999-10-06Added ICMP and DNS to randpkt.gram1-1/+41
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@777 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-17Fixed randpkt so it isn't linked to X11 libs. Removed randpkt from defaultgram1-2/+2
target list, so a 'make randpkt' is required if you want to build it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@684 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-10Added ip, tcp, and udp to randpkt.gram1-3/+54
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@650 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-10Added random packet generator.gram1-0/+293
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@645 f5534014-38df-0310-8fa8-9805f1628bb7