The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / randpkt.c @ master

History | View | Annotate | Download (15.8 KB)

# Date Author Comment
97546165 08/24/2014 04:04 AM Graham Bloice

Modify includes of config.h so that out-of-tree builds, i.e. CMake
don't pick up the in-tree copy.

Change-Id: I7ec473876cdba1a025c52362d7f6adc62d24ce71
Reviewed-on: https://code.wireshark.org/review/3798
Petri-Dish: Graham Bloice <>...

6db77b00 05/24/2014 02:31 PM Guy Harris

Allow wtap_read() and wtap_seek_read() to return records other than packets.

Add a "record type" field to "struct wtap_pkthdr"; currently, it can be
REC_TYPE_PACKET, for a record containing a packet, or
REC_TYPE_FILE_TYPE_SPECIFIC, for records containing file-type-specific...

9e2db542 05/23/2014 07:24 PM Guy Harris

Set the presence flags.

If we're going to stuff a time stamp in there, let's at least indicate
that it's there.

Change-Id: Idc3d4ba5fdc109b21b5c6034906664a763b2ddda
Reviewed-on: https://code.wireshark.org/review/1767
Reviewed-by: Guy Harris <>

a1b1c8be 05/09/2014 01:21 AM Guy Harris

Revert "Refactor Wiretap"

This reverts commit 1abeb277f5e6bd27fbaebfecc8184e37ba9d008a.

This isn't building, and looks as if it requires significant work to fix.

Change-Id: I622b1bb243e353e874883a302ab419532b7601f2
Reviewed-on: https://code.wireshark.org/review/1568...

1abeb277 05/08/2014 11:04 PM Michael Mann

Refactor Wiretap

Start of refactoring Wiretap and breaking structures down into "generally useful fields for dissection" and "capture specific". Since this in intended as a "base" for Wiretap and Filetap, the "wft" prefix is used for "common" functionality....

29659139 03/04/2014 09:27 AM Alexis La Goutte

Remove all $Id$ from top of file

(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <>

6b4944ec 12/31/2013 11:17 AM Bill Meier

Follow convention for -h option:
Output to stdout & then exit(0).
Add editor modelines.

svn path=/trunk/; revision=54513

853da2eb 11/08/2013 04:53 AM Guy Harris

The "file types" we have are actually combinations of types and
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2
are separate "file types", even though they both come from Network
Monitor.

Rename various functions, #defines, and variables appropriately....

c2a54d11 05/19/2013 11:12 AM Chris Maynard

Trivial change so all longnames are aligned.

svn path=/trunk/; revision=49417

bd4cffae 02/19/2013 08:19 PM Gerald Combs

When any of our executables start on Windows create or open a "Wireshark
is running" mutex. Have the NSIS installer check for this mutex and ask
the user to close Wireshark if it's found. While not perfect this makes
the WinSparkle update process much less annoying....

78631020 10/16/2012 05:50 PM Jakub Zawadzki

Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.

svn path=/trunk/; revision=45601

3551a86c 09/19/2012 09:29 PM Jeff Morriss

We always HAVE_CONFIG_H so don't bother checking whether we have it or not.

svn path=/trunk/; revision=45015

bf81b42e 06/28/2012 06:56 PM Jakub Zawadzki

Update Free Software Foundation address.

(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536

bf95c7b5 08/09/2011 05:02 PM Jeff Morriss

Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :

getopt() can/should normally be found in unistd.h, so:

- When testing for getopt(), define that we HAVE_GETOPT instead of
HAVE_GETOPT_H (to avoid confusion).
- Don't attempt to include getopt.h: not all OS's have it (for example,...

8443bbbf 06/28/2011 05:00 AM Stig Bjørlykke

Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.

This fixes bug 5715.

svn path=/trunk/; revision=37812

30c6c1fb 06/23/2011 09:51 AM Stig Bjørlykke

Use ws_open/ws_read to avoid prohibited APIs.
Close file handle after usage.

svn path=/trunk/; revision=37769

a24687ce 05/23/2011 08:07 PM Gerald Combs

Move the Windows argument list conversion code to a common routine.

svn path=/trunk/; revision=37372

3bc1fc38 01/06/2011 06:28 PM Gerald Combs

On Windows, convert all of our command-line arguments from UTF-16 to
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.

svn path=/trunk/; revision=35411

47e2d758 05/28/2010 04:19 PM Jeff Morriss

Move some code (including the optional objects) into libwsutil

svn path=/trunk/; revision=33012

066dd47c 01/06/2010 12:18 PM Gerald Combs

Use /dev/urandom (which is non-blocking) instead of /dev/random (which
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....

98024a00 10/06/2009 12:01 PM Stig Bjørlykke

Invert check for getopt: NEED_GETOPT_H -> HAVE_GETOPT_H
Rename getopt.[ch] -> wsgetopt.[ch] to avoid name collision.

svn path=/trunk/; revision=30370

82b05744 05/17/2009 05:41 PM Gerald Combs

From Márton Németh via bug 2137:

Currently the randpkt random packet generator does not have support to
generate WTAP_ENCAP_USB and WTAP_ENCAP_USB_LINUX type packets.

svn path=/trunk/; revision=28388

9b3a726b 11/17/2008 04:46 PM Gerald Combs

Make "-h" a valid flag.

svn path=/trunk/; revision=26799

64612f34 10/31/2008 04:11 PM Guy Harris

On non-Windows systems, try /dev/random and, if it exists, use it,
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.

svn path=/trunk/; revision=26661

841e3a0a 10/31/2008 01:43 PM Stig Bjørlykke

Fixed some "ignoring return value" warnings.
This is the last commit to make it compile clean on Ubuntu 8.10.

svn path=/trunk/; revision=26654

a491fec1 05/25/2007 07:40 PM Gerald Combs

From Mike Harvey: Support for WiMAX and the WiMAX M2M encapsulation protocol.

Add support for WiMAX and M2M to various makefiles and installer files. Add
basic support for M2M to randpkt.

svn path=/trunk/; revision=21945

1c57b51e 04/26/2006 01:31 PM Gilbert Ramirez

Check for NULL return value from wtap_dump_open().
Fixes coverity bug 159.

svn path=/trunk/; revision=18005

84cf7ce7 09/14/2005 05:57 PM Ulf Lamping

added compression support for capture file output. The Save/As dialog now 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, ...)....

72e862b1 08/24/2005 07:53 PM Guy Harris

The time stamp in a Wiretap packet header is now a wtap_nstime, not a
"struct timeval".

svn path=/trunk/; revision=15522

db5add1c 07/26/2005 12:54 PM Gerald Combs

From Brice Augustin: Use the correct packet length in randpkt.

Build randpkt.exe by default under Windows.

svn path=/trunk/; revision=15092

30a85578 07/23/2005 07:41 AM Jörg Mayer

More 'char*' -> 'const char*' changes to fix warnings.

svn path=/trunk/; revision=15015

573c77f5 03/26/2005 11:43 PM Gerald Combs

Add SCTP and MEGACO types, so that we can add SCTP to the "random" test.

svn path=/trunk/; revision=13931

73163bf8 03/17/2005 11:06 AM Gerald Combs

Insert "%s" at various points in an attempt to trigger format string bugs.

svn path=/trunk/; revision=13792

eadb365e 03/16/2005 11:44 AM Gerald Combs

For UDP output, set the length to 65535 instead of 0.

svn path=/trunk/; revision=13768

8a8b8834 07/17/2004 08:24 PM Guy Harris

Set the svn:eol-style property on all text files to "native", so that
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...

75456a5b 02/23/2004 09:37 AM Jörg Mayer

Remove a comma at end of enum

svn path=/trunk/; revision=10198

b823ff30 11/17/2002 04:47 PM Gerald Combs

Clean up the TDS dissector a bit. Change a lot of signed ints to
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...

e0cf1323 10/16/2002 10:45 AM Gerald Combs

Add support for building randpkt under Windows.

svn path=/trunk/; revision=6433

9afeafe8 10/14/2002 10:29 PM Gerald Combs

Fix signed/unsigned type mismatches, as pointed out by Silvio.

Add BGP output to randpkt.

svn path=/trunk/; revision=6420

7c4176d8 08/28/2002 05:04 PM Jörg Mayer

Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117

0d33d728 05/18/2002 10:58 AM Gerald Combs

Add initial support for GIOP.

svn path=/trunk/; revision=5501

309e8624 02/23/2002 08:26 PM Guy Harris

From Peter Valchev: fix editcap to assign the result of "getopt()" to an
"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...

558d5700 02/14/2002 12:45 PM Gilbert Ramirez

Add ncp2222 as a type of packet than randpkt can produce.
If type passed in with -t option is unknown, die instead of using
Ethernet as a default.

svn path=/trunk/; revision=4737

f14a6b8b 11/13/2001 06:55 PM Gilbert Ramirez

Hopefully the last time I have to change my e-mail address.

svn path=/trunk/; revision=4199

9c1502e3 03/31/2001 05:13 AM Guy Harris

BACNET support, from Hartmut Mueller.

svn path=/trunk/; revision=3214

c312f69a 09/21/2000 12:41 AM Gilbert Ramirez

Make sure to pass the sent/received direction from pppdump.c in
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...

1d97f133 06/11/2000 11:54 AM Gerald Combs

Add syslog support to randpkt.

Fix problems revealed by randpkt, add OS-specific info.

svn path=/trunk/; revision=2056

d7e6e0e3 05/19/2000 07:07 PM Gilbert Ramirez

Add wtap-int.h. Move definitions relevant to the internal workins of wiretap
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....

c43db40d 05/18/2000 10:42 PM Gilbert Ramirez

Use new-style wtap_dump().

svn path=/trunk/; revision=1978

db5f4239 10/07/1999 03:55 AM Guy Harris

Add NBNS support.

svn path=/trunk/; revision=780

48161094 10/06/1999 04:29 PM Gilbert Ramirez

Added ICMP and DNS to randpkt.

svn path=/trunk/; revision=777

ff20b92b 09/17/1999 12:38 AM Gilbert Ramirez

Fixed randpkt so it isn't linked to X11 libs. Removed randpkt from default
target list, so a 'make randpkt' is required if you want to build it.

svn path=/trunk/; revision=684

7a37324e 09/10/1999 11:38 AM Gilbert Ramirez

Added ip, tcp, and udp to randpkt.

svn path=/trunk/; revision=650

c2bf152b 09/10/1999 01:15 AM Gilbert Ramirez

Added random packet generator.

svn path=/trunk/; revision=645