]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
9 years agoFix print-icmp.c warning 469/head
Gisle Vanem [Fri, 10 Jul 2015 10:51:56 +0000 (12:51 +0200)] 
Fix print-icmp.c warning

Fix compilation warning:
```
print-icmp.c(559): warning C4456: declaration of 'vec' hides previous local declaration
print-icmp.c(344): note: see declaration of 'vec'
```

9 years agointerface.h,netdissect.h: Cleaning unused items
Francois-Xavier Le Bail [Fri, 3 Jul 2015 09:57:31 +0000 (11:57 +0200)] 
interface.h,netdissect.h: Cleaning unused items

9 years agoBGP: Replace printf by ND_PRINT
Francois-Xavier Le Bail [Thu, 2 Jul 2015 17:44:19 +0000 (19:44 +0200)] 
BGP: Replace printf by ND_PRINT

9 years agoFix display of timestamps with -ttt and -ttttt options
Francois-Xavier Le Bail [Thu, 2 Jul 2015 17:14:49 +0000 (19:14 +0200)] 
Fix display of timestamps with -ttt and -ttttt options

- Fix display of some nanoseconds timestamps
For example, bad print 00:-16:-2.000851566 is now 00:00:00.037851566

- Fix display of timestamp of a packet when it is lower than previous one
For example, bad print 00:00:-1.000999790 is now -00:00:00.000000210

9 years agoBGP: add decoding of ADD-PATH capability
Denis Ovsienko [Mon, 29 Jun 2015 15:06:31 +0000 (16:06 +0100)] 
BGP: add decoding of ADD-PATH capability

This implements the capability part of draft-ietf-idr-add-paths-10 and
seems to work for a packet capture I am looking into. The problem with
the "extended NLRI encodings" defined in the same document is that they
are going to use a different structure for the two previously assigned
path attributes, which makes decoding of an UPDATE difficult without
having both relevant OPENs from the same session.

9 years agorefine tok2str() buffer use
Denis Ovsienko [Mon, 29 Jun 2015 14:53:06 +0000 (15:53 +0100)] 
refine tok2str() buffer use

Switch RRCP and BGP functions from tok2strbuf() to tok2str() to avoid
unnecessary local buffer management. The latter function does it in a
way to allow up to 4 calls to itself from printf(). After that
tok2strbuf() remains used by tok2str() only and can be refined later.

Remove a duplicate macro and place the remaining definition into the
right file.

9 years agostruct netdissect_options: Remove unused members 'ndo_infodelay' and 'ndo_info'
Francois-Xavier Le Bail [Sun, 21 Jun 2015 07:32:05 +0000 (09:32 +0200)] 
struct netdissect_options: Remove unused members 'ndo_infodelay' and 'ndo_info'

Remark: ^T is a tcpdump function, not a packet-dissection mechanism.

9 years agostruct netdissect_options: Remove unused member 'ndo_aflag'
Francois-Xavier Le Bail [Sat, 20 Jun 2015 11:30:29 +0000 (13:30 +0200)] 
struct netdissect_options: Remove unused member 'ndo_aflag'

Moreover:
Remove redundant empty line.

9 years agoFix display of nanoseconds timestamps with -tt option (GH issue 466)
Francois-Xavier Le Bail [Fri, 19 Jun 2015 08:35:18 +0000 (10:35 +0200)] 
Fix display of nanoseconds timestamps with -tt option (GH issue 466)

Add 'ts_unix_format' function.

9 years agoFix a non-reentrant code in a function
Francois-Xavier Le Bail [Fri, 19 Jun 2015 07:28:47 +0000 (09:28 +0200)] 
Fix a non-reentrant code in a function

Delete the 'static char buf' array in ts_format().
buf is now a parameter of ts_format().
Moreover:
Decrease a too long string.
Fix a space in a comment.

9 years agoMap *ONLY* ASCII letters; don't map anything with the 8th bit set.
Guy Harris [Fri, 12 Jun 2015 00:28:39 +0000 (17:28 -0700)] 
Map *ONLY* ASCII letters; don't map anything with the 8th bit set.

9 years agoDo case-insensitive comparisons assuming ASCII strings.
Guy Harris [Thu, 11 Jun 2015 22:47:44 +0000 (15:47 -0700)] 
Do case-insensitive comparisons assuming ASCII strings.

Do the case-insensitive comparisons in a locale-independent fashion that
only maps ASCII letters, in the standard English-language fashion; that
way, we don't get bitten by, for example, Turkish having separate "i
with dot" and "i without dot" letters, with lower-case "i with dot" being
mapped to upper-case "I with dot" rather than being mapped to "I".

9 years agoGet rid of macros already defined in netdissect.h
Francois-Xavier Le Bail [Wed, 10 Jun 2015 19:37:24 +0000 (21:37 +0200)] 
Get rid of macros already defined in netdissect.h

9 years agoMove more prototypes in netdissect.h
Francois-Xavier Le Bail [Wed, 10 Jun 2015 19:12:38 +0000 (21:12 +0200)] 
Move more prototypes in netdissect.h

9 years agoMove some prototypes in netdissect.h
Francois-Xavier Le Bail [Wed, 10 Jun 2015 18:39:54 +0000 (20:39 +0200)] 
Move some prototypes in netdissect.h

9 years agoGet rid of macros already defined in netdissect.h
Francois-Xavier Le Bail [Wed, 10 Jun 2015 17:09:49 +0000 (19:09 +0200)] 
Get rid of macros already defined in netdissect.h

9 years agoChecksum stuff must go in netdissect.h (remainder)
Francois-Xavier Le Bail [Wed, 10 Jun 2015 14:17:27 +0000 (16:17 +0200)] 
Checksum stuff must go in netdissect.h (remainder)

9 years agoChecksum stuff must go in netdissect.h
Francois-Xavier Le Bail [Wed, 10 Jun 2015 13:47:54 +0000 (15:47 +0200)] 
Checksum stuff must go in netdissect.h

9 years agoDelete trailing spaces/tabs
Francois-Xavier Le Bail [Thu, 4 Jun 2015 13:23:21 +0000 (15:23 +0200)] 
Delete trailing spaces/tabs

9 years agoFix a Coverity warning
Francois-Xavier Le Bail [Sun, 24 May 2015 07:52:07 +0000 (09:52 +0200)] 
Fix a Coverity warning

Test already done by 'ND_TCHECK2(tptr[3], length - 3);'

9 years agoCoverity: build script: Update the download URL of 7.6 release
Francois-Xavier Le Bail [Sun, 24 May 2015 06:47:22 +0000 (08:47 +0200)] 
Coverity: build script: Update the download URL of 7.6 release

9 years agoBGP: Add support for the AIGP attribute (RFC7311)
Francois-Xavier Le Bail [Fri, 22 May 2015 10:41:40 +0000 (12:41 +0200)] 
BGP: Add support for the AIGP attribute (RFC7311)

Based on a patch from Hannes Gredler

9 years agoMerge pull request #455 from brooksdavis/gndo-cleanup
Guy Harris [Wed, 20 May 2015 23:56:06 +0000 (16:56 -0700)] 
Merge pull request #455 from brooksdavis/gndo-cleanup

Remove global netdissect_object and remove non-dissection related fields

9 years agoMerge pull request #457 from brooksdavis/no-sandbox-message
Guy Harris [Wed, 20 May 2015 23:54:58 +0000 (16:54 -0700)] 
Merge pull request #457 from brooksdavis/no-sandbox-message

Remove "capability mode sandbox enabled" message.

9 years agoMerge branch 'master' of github.com:the-tcpdump-group/tcpdump
Hannes Gredler [Wed, 20 May 2015 17:30:11 +0000 (19:30 +0200)] 
Merge branch 'master' of github.com:the-tcpdump-group/tcpdump

9 years agoadd testcases for IS-IS POI (rfc6232)
Hannes Gredler [Wed, 20 May 2015 17:29:29 +0000 (19:29 +0200)] 
add testcases for IS-IS POI (rfc6232)

9 years agoUpdate test output for the previous change
Francois-Xavier Le Bail [Tue, 19 May 2015 18:25:16 +0000 (20:25 +0200)] 
Update test output for the previous change

9 years agoadd support for IS-IS Purge Originator Identifier as per RFC6232.
Hannes Gredler [Tue, 19 May 2015 13:49:40 +0000 (15:49 +0200)] 
add support for IS-IS Purge Originator Identifier as per RFC6232.

9 years agoDon't assume you have <net/if_pflog.h> if you have <net/pfvar.h>.
Guy Harris [Sun, 17 May 2015 17:47:30 +0000 (10:47 -0700)] 
Don't assume you have <net/if_pflog.h> if you have <net/pfvar.h>.

Debian/kFreeBSD ships <net/pfvar.h> but not <net/if_pflog.h>.

10 years agoSFLOW: Fix bounds checking
Francois-Xavier Le Bail [Thu, 7 May 2015 15:54:32 +0000 (17:54 +0200)] 
SFLOW: Fix bounds checking

10 years agoRemove "capability mode sandbox enabled" message. 457/head
Brooks Davis [Tue, 5 May 2015 17:50:52 +0000 (17:50 +0000)] 
Remove "capability mode sandbox enabled" message.

We have removed all instances of these messages in FreeBSD as they serve
little purpose and break some comsumers.

10 years agoRPL: Fix 'Consistency Check' control code
Francois-Xavier Le Bail [Mon, 4 May 2015 23:12:00 +0000 (01:12 +0200)] 
RPL: Fix 'Consistency Check' control code

10 years agoRPL: Fix suboption print
Francois-Xavier Le Bail [Mon, 4 May 2015 21:05:23 +0000 (23:05 +0200)] 
RPL: Fix suboption print

10 years agoOLSR: Fix indent and comments
Francois-Xavier Le Bail [Mon, 4 May 2015 13:25:54 +0000 (15:25 +0200)] 
OLSR: Fix indent and comments

Avoid too long lines.
Not all C compilers accept C++/C99 comments by default.

10 years agoolsr: add a test to cover a HNA sgw case
Ferry Huberts [Fri, 24 Apr 2015 17:03:48 +0000 (19:03 +0200)] 
olsr: add a test to cover a HNA sgw case

Signed-off-by: Ferry Huberts <[email protected]>
10 years agoolsr: fix printing of smart-gateway HNAs in IPv4
Ferry Huberts [Fri, 24 Apr 2015 12:43:58 +0000 (14:43 +0200)] 
olsr: fix printing of smart-gateway HNAs in IPv4

Signed-off-by: Ferry Huberts <[email protected]>
10 years agoolsr: fix 'Advertised networks' count
Ferry Huberts [Fri, 24 Apr 2015 12:43:14 +0000 (14:43 +0200)] 
olsr: fix 'Advertised networks' count

Signed-off-by: Ferry Huberts <[email protected]>
10 years agoSource and destination addresses were backwards.
Guy Harris [Sun, 3 May 2015 00:19:33 +0000 (17:19 -0700)] 
Source and destination addresses were backwards.

10 years agoRemove extraneous white space in the GRE SRE list output.
Guy Harris [Sat, 2 May 2015 22:56:29 +0000 (15:56 -0700)] 
Remove extraneous white space in the GRE SRE list output.

10 years agoDon't do IPv6 stuff if INET6 isn't defined.
Guy Harris [Sat, 2 May 2015 20:07:05 +0000 (13:07 -0700)] 
Don't do IPv6 stuff if INET6 isn't defined.

10 years agoFix checksumming of PIMv2 Register messages.
Guy Harris [Sat, 2 May 2015 17:15:42 +0000 (10:15 -0700)] 
Fix checksumming of PIMv2 Register messages.

The checksum only covers the header, not the encapsulated packet, so
only checksum that.  However, if that checksum fails, try checksumming
the entire packet, as, according to RFC 4601, packets with the entire
packet checksummed should also be accepted, for interoperability.

10 years agoFix one more de-constifying cast.
Guy Harris [Tue, 28 Apr 2015 17:55:24 +0000 (10:55 -0700)] 
Fix one more de-constifying cast.

10 years agoFix printouts for unrecognized packet types.
Guy Harris [Tue, 28 Apr 2015 17:50:50 +0000 (10:50 -0700)] 
Fix printouts for unrecognized packet types.

For unrecognized LLC packets, don't print the raw packet if we've been
told to suppress that.

For unrecognized Ethertype packets, print the Ethertype if we haven't
already done so.

10 years agoMEDSA: Address a Coverity warning
Francois-Xavier Le Bail [Tue, 28 Apr 2015 12:33:33 +0000 (14:33 +0200)] 
MEDSA: Address a Coverity warning

10 years agonetdissect.h: Add a comment on IS_NOT_NEGATIVE macro
Francois-Xavier Le Bail [Tue, 28 Apr 2015 04:17:16 +0000 (06:17 +0200)] 
netdissect.h: Add a comment on IS_NOT_NEGATIVE macro

10 years agonetdissect.h: Update ND_TTEST2 to fix issue 443
Francois-Xavier Le Bail [Mon, 27 Apr 2015 16:20:59 +0000 (18:20 +0200)] 
netdissect.h: Update ND_TTEST2 to fix issue 443

Add IS_NOT_NEGATIVE macro.
Avoid these warnings:
- comparison of unsigned expression >= 0 is always true [-Wtype-limits],
- comparison is always true due to limited range of data type [-Wtype-limits].

10 years agoClean up To DS and From DS checks.
Guy Harris [Mon, 27 Apr 2015 07:02:31 +0000 (00:02 -0700)] 
Clean up To DS and From DS checks.

Rewrite get_data_src_dst_mac() to test To DS and From DS only once; that
also more clearly means that there's no way to escape from that function
without setting both pointers, so the compiler doesn't think there's a
way to do so.

10 years agoCompile with -Wcast-qual.
Guy Harris [Mon, 27 Apr 2015 01:50:49 +0000 (18:50 -0700)] 
Compile with -Wcast-qual.

That let me find what might have been the bulk of the 579(!) instances
of "Deconst" reported in

    http://www.cl.cam.ac.uk/~dc552/papers/asplos15-memory-safe-c.pdf

and, hopefully, will prevent more from creeping in.

There are some remaining ones - and they represent attempts to overwrite
the packet bytes handed to tcpdump by libpcap, which could well *fail*
with, for example, memory-mapped capture mechanisms!

10 years agoDon't cast away warnings for ether_ntohost().
Guy Harris [Mon, 27 Apr 2015 01:42:23 +0000 (18:42 -0700)] 
Don't cast away warnings for ether_ntohost().

We have a choice between "your OS's header files suck" warnings on HP-UX
and -Wcast-qual warnings on all platforms.  I vote for the former, as
the latter let us find cases where we're casting constness away, and we
really don't want to cast constness away if we can possibly avoid it.

10 years agoFix misedit.
Guy Harris [Mon, 27 Apr 2015 01:37:43 +0000 (18:37 -0700)] 
Fix misedit.

10 years agoMake sure print.h shows up in the release tarball.
Guy Harris [Mon, 27 Apr 2015 01:04:26 +0000 (18:04 -0700)] 
Make sure print.h shows up in the release tarball.

10 years agoFix a bunch of de-constifications.
Guy Harris [Mon, 27 Apr 2015 00:24:42 +0000 (17:24 -0700)] 
Fix a bunch of de-constifications.

10 years agoAdd a comment asking what the heck is going on here.
Guy Harris [Mon, 27 Apr 2015 00:17:20 +0000 (17:17 -0700)] 
Add a comment asking what the heck is going on here.

It's fetching a checksum field directly, rather than with
EXTRACT_16BITS().

10 years agoAllocate the netdissect_object on the stack. 455/head
Brooks Davis [Fri, 24 Apr 2015 18:19:03 +0000 (18:19 +0000)] 
Allocate the netdissect_object on the stack.

10 years agoRename gndo to ndo now that it isn't global.
Brooks Davis [Fri, 24 Apr 2015 16:02:48 +0000 (16:02 +0000)] 
Rename gndo to ndo now that it isn't global.

Allocate ndo on the heap.

10 years agoPass an ndo to the print API rather than using gndo.
Brooks Davis [Fri, 24 Apr 2015 15:22:05 +0000 (15:22 +0000)] 
Pass an ndo to the print API rather than using gndo.

Since gndo is only referenced in main() move it there.

10 years agoFix heuristic not to be byte-order-dependent.
Guy Harris [Mon, 27 Apr 2015 00:09:16 +0000 (17:09 -0700)] 
Fix heuristic not to be byte-order-dependent.

I'm *guessing* that the item being fetched is big-endian; the "vt"
protocol might be old enough that they developed it on (non-Sun386i) Sun
workstations, assuming they didn't just say "this is an Internet
protocol, hence fields are big-endian").

That also prevents problems on platforms that don't support unaligned
accesses.

10 years agoRemove non-dissection related flags from struct netdissect_options.
Brooks Davis [Fri, 24 Apr 2015 00:27:45 +0000 (00:27 +0000)] 
Remove non-dissection related flags from struct netdissect_options.

10 years agoFetch a 32-bit big-endian quantity with EXTRACT_32BITS().
Guy Harris [Mon, 27 Apr 2015 00:03:32 +0000 (17:03 -0700)] 
Fetch a 32-bit big-endian quantity with EXTRACT_32BITS().

*Don't* fetch it with a pointer cast and dereference!  That will fail on
little-endian machines and may fail on machines that don't handle
unaligned references.

10 years agoPrint the formatted IP address, not the raw binary address, as a string.
Guy Harris [Sun, 26 Apr 2015 22:34:13 +0000 (15:34 -0700)] 
Print the formatted IP address, not the raw binary address, as a string.

10 years agoMEDSA: fix indent
Francois-Xavier Le Bail [Sat, 25 Apr 2015 20:30:31 +0000 (22:30 +0200)] 
MEDSA: fix indent

10 years agoAdd support for the Marvell Extended Distributed Switch Architecture header
Andrew Lunn [Sun, 19 Apr 2015 20:35:00 +0000 (15:35 -0500)] 
Add support for the Marvell Extended Distributed Switch Architecture header

This header can be used with Marvell switches to direct packets in/out
of a specific port in a tree of interconnected switches. The header
uses its own Ethertype of 0xdada.

By default, only brief output is printed, showing the switch device,
port, and vlan the packet is to/from. However if -e is given, to print
the link-level header, all fields are printed.

10 years agoMerge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
Michael Richardson [Wed, 22 Apr 2015 20:17:35 +0000 (16:17 -0400)] 
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump

10 years agoUse unsigned values in tok2str and bittok2str routines.
Guy Harris [Sun, 19 Apr 2015 02:56:49 +0000 (19:56 -0700)] 
Use unsigned values in tok2str and bittok2str routines.

This prevents the compiler issue mentioned in GitHub issue #451, and
also cleans up some other signed vs. unsigned stuff.

While we're at it, clean up bittok2str_internal() (just pass it the
separator string, not a Boolean value that's tested to choose the
separator string), and print unknown arguments to the bittok2str
routines in hex, not decimal.

10 years agoFix comment.
Guy Harris [Sat, 18 Apr 2015 23:22:23 +0000 (16:22 -0700)] 
Fix comment.

10 years agoFix -e output for FDDI, Token Ring, and IP-over-Fibre Channel.
Guy Harris [Sat, 18 Apr 2015 19:54:57 +0000 (12:54 -0700)] 
Fix -e output for FDDI, Token Ring, and IP-over-Fibre Channel.

Print them the same way other headers are printed ("src > dst, length l").

For FDDI, always print the frame control field symbolically

For Token Ring, print the AC and FC fields unless the -q flag was given,
just as we do for the FC field for FDDI.

10 years agoPrint src > dst, not dst > src.
Guy Harris [Sat, 18 Apr 2015 19:43:30 +0000 (12:43 -0700)] 
Print src > dst, not dst > src.

The addresses were printed in the wrong order.

10 years agoSkip the LLC header after printing information for it.
Guy Harris [Sat, 18 Apr 2015 17:51:17 +0000 (10:51 -0700)] 
Skip the LLC header after printing information for it.

No effect on behavior, but looks a bit nicer.

10 years agoWith -e, print the LLC header before the SNAP header; without it, cut the SNAP header.
Guy Harris [Sat, 18 Apr 2015 07:08:52 +0000 (00:08 -0700)] 
With -e, print the LLC header before the SNAP header; without it, cut the SNAP header.

With -e, write out everything; without -e, just write the SNAP header
and, if the OUI is 000000, don't report it, and report the PID as an
ethertype.

10 years agoSkip the LLC and SNAP headers with -x.
Guy Harris [Sat, 18 Apr 2015 06:42:22 +0000 (23:42 -0700)] 
Skip the LLC and SNAP headers with -x.

Have llc_print() return the length of the LLC header, plus the length of
the SNAP header, if available - or, if it couldn't dissect the payload,
return the *negative* of that sum.  Use that return value in link-layer
printers.

10 years agoFix the printing of RFC 948-style IP packets.
Guy Harris [Sat, 18 Apr 2015 02:47:29 +0000 (19:47 -0700)] 
Fix the printing of RFC 948-style IP packets.

They have a 3-octet LLC UI frame followed *immediately* by an IP packet;
the payload is 3 bytes, not 4 bytes, past the LLC header.

10 years agoGet rid of unused variables.
Guy Harris [Sat, 18 Apr 2015 02:14:47 +0000 (19:14 -0700)] 
Get rid of unused variables.

10 years agoUpdate test output for the previous change.
Guy Harris [Sat, 18 Apr 2015 02:01:14 +0000 (19:01 -0700)] 
Update test output for the previous change.

10 years agoClean up printing of LLC packets.
Guy Harris [Sat, 18 Apr 2015 01:38:46 +0000 (18:38 -0700)] 
Clean up printing of LLC packets.

Don't print LLC header information for SNAP packets; if we have a SNAP
header, just call snap_print() and return its return value, regardless
of whether it's 1 or 0, don't fall into the code to print raw LLC header
information - and don't print it with -e, either.

If llc_print() returns 0, just call the default packet printer, don't
print the MAC-layer header or the extracted ethertype - llc_print() will
print the source and destination MAC addresses and whatever type
information is in the LLC or SNAP headers.

If we don't know the DSAP/LSAP, and it's an information frame (numbered
or not) and not an XID frame, return 0, so that we give a hex dump of
the raw payload.

In addition, print the length when printing SNAP header information with
-e.

10 years agoExtract addresses for management frames in a separate routine.
Guy Harris [Fri, 17 Apr 2015 20:49:12 +0000 (13:49 -0700)] 
Extract addresses for management frames in a separate routine.

10 years agoCheck the Protected bit for management frames, too.
Guy Harris [Fri, 17 Apr 2015 20:22:16 +0000 (13:22 -0700)] 
Check the Protected bit for management frames, too.

Management frames can have the Protected bit set; if so, just use
wep_print() on the body.

10 years agoUpdate test output to reflect previous change.
Guy Harris [Fri, 17 Apr 2015 20:14:22 +0000 (13:14 -0700)] 
Update test output to reflect previous change.

10 years agoDon't announce protected data frames if -e isn't set.
Guy Harris [Fri, 17 Apr 2015 19:36:41 +0000 (12:36 -0700)] 
Don't announce protected data frames if -e isn't set.

wep_print()s output should indicate that the frame is protected; no need
to stick "Protected" into the output.

10 years agoThe FC flag is now "protected", not "WEP".
Guy Harris [Thu, 16 Apr 2015 03:11:41 +0000 (20:11 -0700)] 
The FC flag is now "protected", not "WEP".

It's also used for WPA/WPA2, so it's a generic "protected by encryption"
flag.  Update the name of the macro that checks it, and report it as
"Protected" rather than "WEP Encrypted".

10 years agoReflect the results of recent changes.
Guy Harris [Thu, 16 Apr 2015 03:07:52 +0000 (20:07 -0700)] 
Reflect the results of recent changes.

We don't print anything from the MAC header without -e, even with -v -
except for the Protected flag, which we print regardless of -e or -v.

10 years agoHandle the link-layer header more like other 802.x dissectors.
Guy Harris [Thu, 16 Apr 2015 02:44:34 +0000 (19:44 -0700)] 
Handle the link-layer header more like other 802.x dissectors.

Have ieee_802_11_hdr_print() unconditionally print the MAC header, call
it before any payload dissection if -e is specified, call it if
llc_print() fails and -e *isn't* specified, and print "WEP Encrypted"
for protected management and control frames if -e isn't specified.

Pull the extraction of source and destination addresses out of
ieee_802_11_hdr_print(), and do it only for data frames, as it's not
needed for management or control frames.

10 years agoGet rid of unused variable.
Guy Harris [Thu, 16 Apr 2015 01:16:38 +0000 (18:16 -0700)] 
Get rid of unused variable.

10 years agoOnly print unknown frame type or subtype messages once.
Guy Harris [Thu, 16 Apr 2015 01:13:53 +0000 (18:13 -0700)] 
Only print unknown frame type or subtype messages once.

Check whether extract_header_length() returns 0; if it does, that means
that  we don't have a known frame type or control frame subtype, so just
stop dissecting - extract_header_length() has already printed an
indication of the unknown frame type.

Remove other "unknown frame type" and "unknown control frame subtype"
printouts.

10 years agoMerge pull request #452 from brooksdavis/backend-separation
Michael Richardson [Wed, 15 Apr 2015 21:17:03 +0000 (17:17 -0400)] 
Merge pull request #452 from brooksdavis/backend-separation

Backend separation

10 years agoUse the IEEE802_11_XXX_LEN #defines for the appropriate array lengths.
Guy Harris [Wed, 15 Apr 2015 19:55:56 +0000 (12:55 -0700)] 
Use the IEEE802_11_XXX_LEN #defines for the appropriate array lengths.

10 years agoGet the header length for control wrapper and block ACK frames.
Guy Harris [Wed, 15 Apr 2015 19:51:34 +0000 (12:51 -0700)] 
Get the header length for control wrapper and block ACK frames.

While we're at it, rename the "ctrl_XXX_t" structures to
"ctrl_XXX_hdr_t", and remove the FCS fields, as some control frames have
variable-length data in them and those structures only cover the
fixed-length portion of the frames.

10 years agoDisentangle packet dissection functionally in tcpdump from the internal 452/head
Brooks Davis [Wed, 15 Apr 2015 16:39:05 +0000 (16:39 +0000)] 
Disentangle packet dissection functionally in tcpdump from the internal
libnetdissect.  This greatly narrows the public interface and allows
libnetdissect to be more easily sandboxed.

10 years agoMove functions in util.c that are used in the dissectors into a
Brooks Davis [Wed, 15 Apr 2015 16:33:13 +0000 (16:33 +0000)] 
Move functions in util.c that are used in the dissectors into a
util-print.c.  The remaining functions are used only in the frontend.

10 years agoInclude the metadata *and* link-layer header in the header length.
Guy Harris [Tue, 14 Apr 2015 21:36:23 +0000 (14:36 -0700)] 
Include the metadata *and* link-layer header in the header length.

Also, don't use the length of the fixed-length portion of the PPI header
as the metadata length, use the *entire* length.

Otherwise, "-x" doesn't start printing at the link-layer payload.

10 years agoUpdate CHANGES.
Guy Harris [Tue, 14 Apr 2015 21:05:42 +0000 (14:05 -0700)] 
Update CHANGES.

10 years agoInclude the metadata *and* link-layer header in the header length.
Guy Harris [Tue, 14 Apr 2015 21:04:47 +0000 (14:04 -0700)] 
Include the metadata *and* link-layer header in the header length.

Otherwise, "-x" doesn't start printing at the link-layer payload.

10 years agoremove TODO
Denis Ovsienko [Tue, 14 Apr 2015 10:53:57 +0000 (11:53 +0100)] 
remove TODO

Most of the tasks in the file had been completed years ago.

10 years agomerge atmuni31.h into print-atm.c
Denis Ovsienko [Tue, 14 Apr 2015 10:35:43 +0000 (11:35 +0100)] 
merge atmuni31.h into print-atm.c

10 years agoNot all C compilers accept C++/C99 comments by default.
Guy Harris [Tue, 14 Apr 2015 01:32:17 +0000 (18:32 -0700)] 
Not all C compilers accept C++/C99 comments by default.

Use "#if 0" instead to comment out code.

10 years agoFix dates.
Guy Harris [Fri, 10 Apr 2015 08:20:10 +0000 (01:20 -0700)] 
Fix dates.

10 years agoAdd information for 4.7.4 release.
Guy Harris [Fri, 10 Apr 2015 08:16:13 +0000 (01:16 -0700)] 
Add information for 4.7.4 release.

10 years agoClean up CREDITS file.
Guy Harris [Fri, 10 Apr 2015 08:11:22 +0000 (01:11 -0700)] 
Clean up CREDITS file.

10 years agoMerge pull request #449 from Longinus00/tfo_rfc7413
Denis Ovsienko [Wed, 8 Apr 2015 20:27:49 +0000 (21:27 +0100)] 
Merge pull request #449 from Longinus00/tfo_rfc7413

10 years agoAdd support for TCP Fast Open official IANA option number 449/head
Daniel Lee [Wed, 8 Apr 2015 00:42:55 +0000 (17:42 -0700)] 
Add support for TCP Fast Open official IANA option number
https://tools.ietf.org/html/rfc7413

10 years agoWe're not copying the string to buf, so print the string, not buf.
Guy Harris [Wed, 8 Apr 2015 18:37:08 +0000 (11:37 -0700)] 
We're not copying the string to buf, so print the string, not buf.

Get rid of the now-unused buf array while we're at it.