OpenBSD CVS

CVS log for src/usr.sbin/tcpdump/print-vqp.c


[BACK] Up to [local] / src / usr.sbin / tcpdump

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 6 05:47:22 2018 UTC (5 years, 11 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, HEAD
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Rework UDP parsing, particularly around IP addresses.

This originally started as trying to put a consistent space between
the UDP header information and the payload parsing, but while doing
that I noticed inconsistent IPv4 vs IPv6 handling.

Apart from the default "srcip.srcport > dstip.dstpor" output, all
the other places that IP addresses were printed assumed IPv4. It
looks like it is possible that udp_print() can be called without
an IP header, which made these blind IPv4 prints turn into NULL
derefs.

This fixes the problem above by only having a single place that
prints the addresses out, and makes sure to get the difference
between IPv4, IPv6 and no IP correct.

This changes how the checksum is calculated. It incrementally builds
the UDP checksum by feeding the IPv4 and v6 addresses in separately,
then using common code for the rest of the pseudo header and actual
payload.

Lastly, this does make printing the space between the UDP header
and its payload consistent. The UDP code is now responsible for
adding a space after itself so the payload parsers don't have to.
They got it wrong in some cases anyway, so this should be a lot
more uniform.

help and ok sthen@

Revision 1.7 / (download) - annotate - [select for diffs], Thu Aug 24 05:11:43 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.6: +16 -10 lines
Diff to previous 1.6 (colored)

0x00000c05 type specifies an Ethernet frame.  Print the src MAC
with -v or the frame in hex with -vv.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 20 23:39:42 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.5: +6 -4 lines
Diff to previous 1.5 (colored)

replace magic numbers, no binary change; prompted by deraadt@

Revision 1.5 / (download) - annotate - [select for diffs], Tue Aug 15 17:32:16 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

need to print leading space now

Revision 1.4 / (download) - annotate - [select for diffs], Tue Aug 15 10:28:23 2006 UTC (17 years, 9 months ago) by stevesk
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

stupid error: increment not decrement here.

Revision 1.3 / (download) - annotate - [select for diffs], Wed May 24 16:29:31 2006 UTC (18 years ago) by stevesk
Branch: MAIN
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (colored)

add $OpenBSD$, prompted by steven@

Revision 1.2 / (download) - annotate - [select for diffs], Wed May 24 01:42:16 2006 UTC (18 years ago) by deraadt
Branch: MAIN
Changes since 1.1: +4 -2 lines
Diff to previous 1.1 (colored)

Please use portable C code

Revision 1.1 / (download) - annotate - [select for diffs], Tue May 23 14:20:19 2006 UTC (18 years ago) by stevesk
Branch: MAIN

add VLAN Query Protocol (VQP) dissector; ok canacar@ markus@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.