Commit Graph

34 Commits

Author SHA1 Message Date
Dirk Römmen a1a2b53663 BACnet: BACnet revision 22 secure connect datalink implementation.
- Implements the BACnet /SC datalink using encrypted TLS communication
over TCP/IP and the websocket protocol.
- Updated list of vendor ID's
- Added new BACnet services Who-Am-I / You-Are
- Some corrections for revision 22.
- Fixed bug issue #17142
2021-05-19 13:21:48 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Jonathan Fleming 98e74957b0 Added multiple new field dissectors for the BACnet-APDU protocol.
Replaced global vars with fPresentValue and wrapper functions.
Split bacapp.present_value dissector based on datatype for filtering.
Replaced char array buffers with wmem api calls.
Rebased commit onto latest master branch.
Removed date and time present_value field dissectors.

dissectors added:
	bacapp.object_name
	bacapp.to_state
	bacapp.from_state
	bacapp.notify_type
	bacapp.error_code
	bacapp.error_class
	bacapp.event_type

present_value dissectors added:
	bacapp.present_value.null
	bacapp.present_value.boolean
	bacapp.present_value.uint
	bacapp.present_value.int
	bacapp.present_value.real
	bacapp.present_value.octet_string
	bacapp.present_value.char_string
	bacapp.present_value.bit_string
	bacapp.present_value.enum_index

Change-Id: I3ba9327ee22787da59190204e808f8c10dc8fabd
Reviewed-on: https://code.wireshark.org/review/30847
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-14 04:59:20 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Dirk Römmen 6aa3502306 Enhanced BACnet dissectors supporting BACnet revision 19.
Bug: 12448
Bug: 12453
Bug: 12457
Change-Id: Ia8ed69ae1014f01ae246b31f6bb5aaedfc4656d2
Reviewed-on: https://code.wireshark.org/review/25010
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-28 11:31:48 +00:00
Alexis La Goutte 296591399f 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 <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Alexis La Goutte b9a0eaedae Fix indent (Tab => 4 Spaces) Remove whitespace And Modelines info
svn path=/trunk/; revision=47800
2013-02-21 15:32:29 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss a148a936b1 From Felix Kraemer: fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5694 :
This patch adds the capability to create BACnet statistics trees. 
Find the respective menu items under 'Statistics->BACnet'.
Packets can be sorted by different criteria:
- Src/Dst IP adresses
- Instance ID
- Object Type
- Service

From me:
- Don't use C++/C99-style comments.
- Name variables for tick_stat_node() don't need to be static.
- Change updateBacnetInfoValue() to require 'data' to be ep_ allocated.  Change
  the couple of calls that did not send in ep_ allocated data to do so.
- Change one or two functions to be static.
- Do not use (memory-unsafe) g_sprintf().
- Use ep_strconcat() instead of leaking memory with g_strconcat().
- Put back one if(tree) that doesn't appear to do any harm.
- Remove variable declarations and #includes from the header file.

svn path=/trunk/; revision=36468
2011-04-05 02:18:28 +00:00
Jaap Keuter eeb2d89d92 From Herbert Lischka:
- packet-bacapp.h eliminated and included in packet-bacapp.c
- dissection of recipient-list and client-cov-increment added

svn path=/trunk/; revision=30955
2009-11-13 20:24:36 +00:00
Stig Bjørlykke 308f743247 Add the missing changes from r30869.
svn path=/trunk/; revision=30871
2009-11-08 22:04:46 +00:00
Gerald Combs 809fb769b4 Add some length checks. Fixes a few recent fuzz bugs.
svn path=/trunk/; revision=29384
2009-08-11 20:58:36 +00:00
Anders Broman 1e7878b53d From Steve Karg:
BACnet Action property not decoded correctly.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3766

svn path=/trunk/; revision=29173
2009-07-23 05:38:34 +00:00
Stig Bjørlykke 7e99557d05 Another try to fix the compiler warnings on win64.
svn path=/trunk/; revision=29161
2009-07-21 22:23:34 +00:00
Guy Harris a864f7d89a GLib documentation says the 3rd and 5th arguments to g_iconv are "gsize
*"s.

svn path=/trunk/; revision=29157
2009-07-21 08:53:39 +00:00
Anders Broman f610ec3c46 size_t -> int to make the Win64 build bot happy.
svn path=/trunk/; revision=29156
2009-07-21 08:35:24 +00:00
Anders Broman 3e1365cc15 From Herbert Lischka:
Added some new features to BACnet dissection:
- ListOfObjectPropertyReferences in scheduler
- RestartReason
- Properties for loop-object
- LogDeviceObjectProperty in trend-log object
- log-buffer entries in trend-log object

- reassemby of fragmented messages
- fallback changed if iconv-library is not here

Me: Moved includes from .h to .c as thats how we normaly do it.

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

svn path=/trunk/; revision=29151
2009-07-21 06:20:47 +00:00
Jeff Morriss 485110f241 We require GLIB-2 now so there's no need to attempt to use regular iconv: use
the GLIB version instead.

Reindent some (does someone have their tabstops set to 4?).

Create and use some #defines instead of hard-coded values. For example,
replace 0x00 with ANSI_X34 in both the value_string and the case statement.
(This file could use a lot more of such changes.)

packet-bacapp.c appears to compile cleanly now so move it to
CLEAN_DISSECTOR_SOURCE.

svn path=/trunk/; revision=25758
2008-07-17 13:53:26 +00:00
Jaap Keuter e2ee2bcab6 From Steve Karg:
Here is a modified patch that fixes the BACnet Schedule object Weekly_Schedule
decoding when an array index is used.  It also fixes the Priority_Array property 
when an array index is used.

svn path=/trunk/; revision=24653
2008-03-16 08:44:42 +00:00
Guy Harris f4aacac2d8 Get rid of non-ASCII characters.
svn path=/trunk/; revision=24169
2008-01-23 19:47:40 +00:00
Jaap Keuter b002a79472 From Steve Karg:
Attached is a patch that fixes bug 1670 and related issues.
For the BACnet GetEventInformation-ACK request dissector:
1. Corrected BitString decoding for acknowledgedTransitions and eventEnable.
2. Corrected the ability to decode more than one event.
3. Grouped each item of the sequence using subtrees.  Added more informative
text to Priority and Timestamp.
4. Corrected eventState to use BACnetEventState enumeration instead of
BACnetEventStateFilter.

svn path=/trunk/; revision=22262
2007-07-06 22:36:58 +00:00
Anders Broman 8774e7e28e From David Richards:
numerous changes, most notably:

1) BACnetStatusFlags is bit string, not enum, in NotificationParameters
2) Fixes many places where enclosing context tags were not handled properly.
3) Simplify tag decoding logic.  Change to explicit decoding in many 
instances rather
    than read tags in a loop and do a switch based on tag number.  Looping
    ignores out-of-order and other types of tagging errors.

svn path=/trunk/; revision=19410
2006-10-03 18:11:55 +00:00
Gerald Combs c52c646842 Apply The Written Word's patch from bug 333, which changes HAVE_ICONV_H
to HAVE_ICONV.

svn path=/trunk/; revision=18758
2006-07-18 15:54:03 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Guy Harris cfe070105f Fix typo.
svn path=/trunk/; revision=17670
2006-03-19 20:19:40 +00:00
Jörg Mayer 368f7d87c7 Steve Karg:
I fixed fBACnetPropertyValue in the BACnet packet-bacapp.c dissector
where an optional decoding for Priority wasn't being optional.  A valid
packet with a confirmedEventNotification that did not have the optional
priority made this bug evident by indicating Malformed Packet.

Me:
Fixed some signedness warnings, #if 0'ed out unused functions.

svn path=/trunk/; revision=16957
2006-01-05 18:53:22 +00:00
Anders Broman 4a5c674c04 From Dave Richards
1) Fixes context-tagged BACnet errors.
2) Fixes indeterminate tag data.  If the tag length/value/type variable 
was 6 or 7 you could not tell whether it was an open/close tag or had 
length 6/7.
3) Don't make assumptions about property types for proprietary BACnet 
object types.



svn path=/trunk/; revision=16104
2005-10-04 05:15:23 +00:00
Anders Broman e6856b69f3 From David Richards:
here are the highlights of what's fixed:

1) Decoding of vendor-defined types
2) Decoding of some event notification parameters (not all)
3) Decoding of ABSTRACT-SYNTAX&Type
4) Decoding of BACnetTimeStamp
5) Some problems with context-tagged values (like booleans)
6) Continuation segments - don't try to decode them since you can't 
start mid-PDU
7) Removed some excessive levels of subtrees

svn path=/trunk/; revision=15226
2005-08-05 19:37:57 +00:00
Jörg Mayer 4f693dfae2 Some warning fixes for "no previous declaration"
Remove svn:executable
Add svn:eol-style native
Add svn:keywords Id


svn path=/trunk/; revision=15179
2005-08-02 05:39:45 +00:00
Jörg Mayer 34493e8f9e char -> const char warning fixes
svn path=/trunk/; revision=15126
2005-07-28 07:53:38 +00:00
Anders Broman 33aa290b25 From Steve Karg:
* added additional value string enumerations from BACnet-2004
* removed vendor specific value string enumerations
* corrected some value strings enumerations that were incorrect
* refactored some common strings as strings + format
* refactored some value strings to use a reserved range and a 
proprietary range by using val_to_split_str function which now correctly 
shows the split range when a value is not matched.
* corrected some spelling errors
* converted some item text values to dissector registration
* added protocol tree for the BACnet tag headers
* added value strings tree display for some bit string BACnet properties
* added value strings tree display for some enumerated BACnet properties
* changed the conversion of signed, unsigned, and enumerated BACnet 
values to use ntohx functions.
* added proper handling for large values of signed, unsigned, and 
enumerated BACnet values.
* refactored BACnet Null and Boolean Tag tree
* refactored BACnet Real and Double Tag tree
* changed comments into functions for special tags
* changed some white space to match existing file style
* refactored tvb_reported_length to tvb_length_remaining to simplify
* corrected octet-string tree when length is zero
* refactored octet-string tree to use tvb_bytes_to_str
* corrected application tagged productions that were context tagged
* corrected context tagged productions that were application tagged
* corrected offset for BACnet character strings
* refactored some identical service request tree handling
* changed confirmed APDU to highlight the correct portion of the APDU
* changed some dissector registration values to display as decimal
* changed cast in call to iconv() to fix compiler warning
* corrected bit-wise AND in AtomicFile tree handling

packet-bvlc.c
* added error text in tree when encoded length doesn't match actual length

svn path=/trunk/; revision=14417
2005-05-23 05:52:28 +00:00
Guy Harris 25443a7a87 Change data types to match those of "iconv()", at least on OS X.
svn path=/trunk/; revision=14314
2005-05-05 11:03:46 +00:00
Ronnie Sahlberg 0f66df8509 BACAPP updates
svn path=/trunk/; revision=14188
2005-04-26 08:03:22 +00:00