Mailing List Archive

Re: Patch for new dissector plugin for Ether-S-Bus telegrams modified (Jaap Keuter)
Hi,

thank you for your feedback. I finally managed to modify my code by
- using symbols instead of hardcoded command codes
- removing the debug code
- removing the last set in the patch
- adding the Makefile.common in the plugins dir

Could you please have a look at it and if it is ok, check it in?

Thanx,
chris



On Sun, 2006-06-04 at 12:00 -0500, ethereal-dev-request@ethereal.com
wrote:
> Send Ethereal-dev mailing list submissions to
> ethereal-dev@ethereal.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> or, via email, send a message with subject or body 'help' to
> ethereal-dev-request@ethereal.com
>
> You can reach the person managing the list at
> ethereal-dev-owner@ethereal.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Ethereal-dev digest..."
>
>
> Reply-To: Ethereal development <ethereal-dev@ethereal.com>
>
> Today's Topics:
>
> 1. Re: Patch for new dissector plugin for Ether-S-Bus telegrams
> (Jaap Keuter)
> 2. Re: ieee802.11 AID calculation patch (Joerg Mayer)
> 3. one more h245/per alignment issue (Cvetan Ivanov)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 4 Jun 2006 13:32:17 +0200 (CEST)
> From: Jaap Keuter <jaap.keuter@xs4all.nl>
> Subject: Re: [Ethereal-dev] Patch for new dissector plugin for
> Ether-S-Bus telegrams
> To: Ethereal development <ethereal-dev@ethereal.com>
> Message-ID: <20060604131759.K47378-100000@xs3.xs4all.nl>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> Hi,
>
> This looks pretty good, thanks.
>
> A few small remark though:
> 1. could you use meaningfull symbols in the code i.s.o. hardcoded values.
> I'm refering to code like this:
>
> + if (((request_val->cmd_code) == 0x00) ||
> + ((request_val->cmd_code) == 0x06) ||
> + ((request_val->cmd_code) == 0x07) ||
> + ((request_val->cmd_code) == 0x1E) ||
> + ((request_val->cmd_code) == 0x1F) ||
> + ((request_val->cmd_code) == 0xA1)){
>
> 2. Could you clean up the code a bit by removing the debug code from it
>
> 3. The last change in the set is superflous.
>
> Thanx,
> Jaap
>
>
>
> On Sat, 3 Jun 2006, Christian Durrer wrote:
>
> > Hi,
> >
> > I hope this is the right place to send a patch for a new dissector
> > plugin. The telegram it dissects are for the communication between PLCs
> > (Programmable logic controller) from the company Saia Burgess Controls
> > Ltd. (http://www.start-controls.com, http://www.saia-burgess.com or
> > http://www.sbc-support.ch). The protocol is named Ether-S-Bus (the PLCs
> > are called PCD2, PCD3, PCD4).
> > We developped this dissector for easyer debugging of networks containing
> > our contollers.
> >
> > The patch was created against Ethereal Version 1.1.0 (SVN Rev 18189). I
> > tested it with various capture files (which some of them also fuzzed).
> > The VariousSBus is one of them.
> >
> > I also would like to make you a big compliment! Ethereal is a great
> > tool!
> >
> > I'm available for any your questions
> >
> > With best regards
> >
> > Christian Durrer
> >

>
> End of Ethereal-dev Digest, Vol 38, Issue 7
> *******************************************
Re: Re: Patch for new dissector plugin for Ether-S-Bus telegrams modified (Jaap Keuter) [ In reply to ]
Hi,

Could you provide one or two sample capture files on the Wiki?
These can than be used to fuzztest the dissector.

Could you create a protocol page on the Wiki with some information on the
protocol?

Is the protocol always on port 5050? According to IANA this is used for
mmcc service.

Thanx,
Jaap

On Thu, 15 Jun 2006, Christian Durrer wrote:

> Hi,
>
> thank you for your feedback. I finally managed to modify my code by
> - using symbols instead of hardcoded command codes
> - removing the debug code
> - removing the last set in the patch
> - adding the Makefile.common in the plugins dir
>
> Could you please have a look at it and if it is ok, check it in?
>
> Thanx,
> chris
>
>
>
> On Sun, 2006-06-04 at 12:00 -0500, ethereal-dev-request@ethereal.com
> wrote:
> > Send Ethereal-dev mailing list submissions to
> > ethereal-dev@ethereal.com
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://www.ethereal.com/mailman/listinfo/ethereal-dev
> > or, via email, send a message with subject or body 'help' to
> > ethereal-dev-request@ethereal.com
> >
> > You can reach the person managing the list at
> > ethereal-dev-owner@ethereal.com
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Ethereal-dev digest..."
> >
> >
> > Reply-To: Ethereal development &lt;ethereal-dev@ethereal.com&gt;
> >
> > Today's Topics:
> >
> > 1. Re: Patch for new dissector plugin for Ether-S-Bus telegrams
> > (Jaap Keuter)
> > 2. Re: ieee802.11 AID calculation patch (Joerg Mayer)
> > 3. one more h245/per alignment issue (Cvetan Ivanov)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Sun, 4 Jun 2006 13:32:17 +0200 (CEST)
> > From: Jaap Keuter <jaap.keuter@xs4all.nl>
> > Subject: Re: [Ethereal-dev] Patch for new dissector plugin for
> > Ether-S-Bus telegrams
> > To: Ethereal development <ethereal-dev@ethereal.com>
> > Message-ID: <20060604131759.K47378-100000@xs3.xs4all.nl>
> > Content-Type: TEXT/PLAIN; charset=US-ASCII
> >
> > Hi,
> >
> > This looks pretty good, thanks.
> >
> > A few small remark though:
> > 1. could you use meaningfull symbols in the code i.s.o. hardcoded values.
> > I'm refering to code like this:
> >
> > + if (((request_val->cmd_code) == 0x00) ||
> > + ((request_val->cmd_code) == 0x06) ||
> > + ((request_val->cmd_code) == 0x07) ||
> > + ((request_val->cmd_code) == 0x1E) ||
> > + ((request_val->cmd_code) == 0x1F) ||
> > + ((request_val->cmd_code) == 0xA1)){
> >
> > 2. Could you clean up the code a bit by removing the debug code from it
> >
> > 3. The last change in the set is superflous.
> >
> > Thanx,
> > Jaap
> >
> >
> >
> > On Sat, 3 Jun 2006, Christian Durrer wrote:
> >
> > > Hi,
> > >
> > > I hope this is the right place to send a patch for a new dissector
> > > plugin. The telegram it dissects are for the communication between PLCs
> > > (Programmable logic controller) from the company Saia Burgess Controls
> > > Ltd. (http://www.start-controls.com, http://www.saia-burgess.com or
> > > http://www.sbc-support.ch). The protocol is named Ether-S-Bus (the PLCs
> > > are called PCD2, PCD3, PCD4).
> > > We developped this dissector for easyer debugging of networks containing
> > > our contollers.
> > >
> > > The patch was created against Ethereal Version 1.1.0 (SVN Rev 18189). I
> > > tested it with various capture files (which some of them also fuzzed).
> > > The VariousSBus is one of them.
> > >
> > > I also would like to make you a big compliment! Ethereal is a great
> > > tool!
> > >
> > > I'm available for any your questions
> > >
> > > With best regards
> > >
> > > Christian Durrer
> > >
>
> >
> > End of Ethereal-dev Digest, Vol 38, Issue 7
> > *******************************************
>

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@ethereal.com
http://www.ethereal.com/mailman/listinfo/ethereal-dev
Re: Patch for new dissector plugin for Ether-S-Bus telegrams modified (Jaap Keuter) [ In reply to ]
Hi,

I've uploaded a sample capture and created a protocol page on the Wiki
(and modified the FieldbusProtocolFamily page a bit):
http://wiki.ethereal.com/EtherSBus
http://wiki.ethereal.com/SampleCaptures?action=AttachFile&do=get&target=sbus.pcap
http://wiki.ethereal.com/FieldbusProtocolFamily

Regarding the UDP port 5050: Yes, Ether-S-Bus always uses UDP port 5050.
This is hardcoded in the firmware of the PLCs. I also know that the port
5050 is used for the mmcc service and already asked our development and
product manager about this fact (but I asked after the protocol already
had been introduced so no modification was made at this point to avoid
any incompatibilities).
According to our product manager this port has been free at the time
this port was fixed for Ether-S-Bus or at least there was no risk for
any conflict seen from the technical point...

Regards

chris


On Mon, 2006-06-19 at 12:00 -0500, ethereal-dev-request@ethereal.com
wrote:

> Message: 1
> Date: Sun, 18 Jun 2006 19:30:57 +0200 (CEST)
> From: Jaap Keuter <jaap.keuter@xs4all.nl>
> Subject: Re: [Ethereal-dev] Re: Patch for new dissector plugin for
> Ether-S-Bus telegrams modified (Jaap Keuter)
> To: Ethereal development <ethereal-dev@ethereal.com>
> Message-ID: <20060618192830.Y73562-100000@xs3.xs4all.nl>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> Hi,
>
> Could you provide one or two sample capture files on the Wiki?
> These can than be used to fuzztest the dissector.
>
> Could you create a protocol page on the Wiki with some information on the
> protocol?
>
> Is the protocol always on port 5050? According to IANA this is used for
> mmcc service.
>
> Thanx,
> Jaap
>
> On Thu, 15 Jun 2006, Christian Durrer wrote:
>
> > Hi,
> >
> > thank you for your feedback. I finally managed to modify my code by
> > - using symbols instead of hardcoded command codes
> > - removing the debug code
> > - removing the last set in the patch
> > - adding the Makefile.common in the plugins dir
> >
> > Could you please have a look at it and if it is ok, check it in?
> >
> > Thanx,
> > chris
> >
> >
> >
> > On Sun, 2006-06-04 at 12:00 -0500, ethereal-dev-request@ethereal.com
> > wrote:
> > > Send Ethereal-dev mailing list submissions to
> > > ethereal-dev@ethereal.com
> > >
> > > To subscribe or unsubscribe via the World Wide Web, visit
> > > http://www.ethereal.com/mailman/listinfo/ethereal-dev
> > > or, via email, send a message with subject or body 'help' to
> > > ethereal-dev-request@ethereal.com
> > >
> > > You can reach the person managing the list at
> > > ethereal-dev-owner@ethereal.com
> > >


_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@ethereal.com
http://www.ethereal.com/mailman/listinfo/ethereal-dev
Re: Re: Patch for new dissector plugin for Ether-S-Bus telegrams modified (Jaap Keuter) [ In reply to ]
On Tue, 20 Jun 2006, Christian Durrer wrote:

> Hi,
>
> I've uploaded a sample capture and created a protocol page on the Wiki
> (and modified the FieldbusProtocolFamily page a bit):
> http://wiki.ethereal.com/EtherSBus
> http://wiki.ethereal.com/SampleCaptures?action=AttachFile&do=get&target=sbus.pcap
> http://wiki.ethereal.com/FieldbusProtocolFamily

Very good. I've downloaded the capture file and fuzztested it against the
my plugin. Over 5000 runs without a problem. :)

Guy Harris and I have ported the Wiki pages to Wireshark. As you may well
know the core developers have moved to Wireshark, the continuation of
Ethereal(tm) development. That is we're I intent to add the dissector.

I've done some major cleanup of the code after all, to improve
readability. Removed some left over debug code, replaced some more
literals by their respective symbols, but most importantly changed the
strings of if statements into switches.

I'll try to get the code committed tomorrow, since it's past midnight
here and there is bound to be an error when I start now. :)

> Regarding the UDP port 5050: Yes, Ether-S-Bus always uses UDP port 5050.
> This is hardcoded in the firmware of the PLCs. I also know that the port
> 5050 is used for the mmcc service and already asked our development and
> product manager about this fact (but I asked after the protocol already
> had been introduced so no modification was made at this point to avoid
> any incompatibilities).
> According to our product manager this port has been free at the time
> this port was fixed for Ether-S-Bus or at least there was no risk for
> any conflict seen from the technical point...

I get the picture, too bad it's IANA that assigns port numbers to
applications. Now we end up with various kinds of services running on the
same port. In this case a clash is unlikely, but still goes against the
concept of finding a service at a certain port. Makes life simpler for
sniffers too. :/

Thanx,
Jaap

>
> On Mon, 2006-06-19 at 12:00 -0500, ethereal-dev-request@ethereal.com
> wrote:
>
> > Message: 1
> > Date: Sun, 18 Jun 2006 19:30:57 +0200 (CEST)
> > From: Jaap Keuter <jaap.keuter@xs4all.nl>
> > Subject: Re: [Ethereal-dev] Re: Patch for new dissector plugin for
> > Ether-S-Bus telegrams modified (Jaap Keuter)
> > To: Ethereal development <ethereal-dev@ethereal.com>
> > Message-ID: <20060618192830.Y73562-100000@xs3.xs4all.nl>
> > Content-Type: TEXT/PLAIN; charset=US-ASCII
> >
> > Hi,
> >
> > Could you provide one or two sample capture files on the Wiki?
> > These can than be used to fuzztest the dissector.
> >
> > Could you create a protocol page on the Wiki with some information on the
> > protocol?
> >
> > Is the protocol always on port 5050? According to IANA this is used for
> > mmcc service.
> >
> > Thanx,
> > Jaap
> >
> > On Thu, 15 Jun 2006, Christian Durrer wrote:
> >
> > > Hi,
> > >
> > > thank you for your feedback. I finally managed to modify my code by
> > > - using symbols instead of hardcoded command codes
> > > - removing the debug code
> > > - removing the last set in the patch
> > > - adding the Makefile.common in the plugins dir
> > >
> > > Could you please have a look at it and if it is ok, check it in?
> > >
> > > Thanx,
> > > chris
> > >
> > >
> > >
> > > On Sun, 2006-06-04 at 12:00 -0500, ethereal-dev-request@ethereal.com
> > > wrote:
> > > > Send Ethereal-dev mailing list submissions to
> > > > ethereal-dev@ethereal.com
> > > >
> > > > To subscribe or unsubscribe via the World Wide Web, visit
> > > > http://www.ethereal.com/mailman/listinfo/ethereal-dev
> > > > or, via email, send a message with subject or body 'help' to
> > > > ethereal-dev-request@ethereal.com
> > > >
> > > > You can reach the person managing the list at
> > > > ethereal-dev-owner@ethereal.com
> > > >
>
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@ethereal.com
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@ethereal.com
http://www.ethereal.com/mailman/listinfo/ethereal-dev
Re: Re: Patch for new dissector plugin for Ether-S-Bus telegrams modified (Jaap Keuter) [ In reply to ]
On Jun 15, 2006, at 11:24 AM, Christian Durrer wrote:

> Could you please have a look at it and if it is ok, check it in?

One warning from GCC:

packet-sbus.c:634: warning: 'sbus_web_seq' is used uninitialized in
this function

The section of code uses sbus_web_seq, but it's never been set.
Where is the sequence number in a response?
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@ethereal.com
http://www.ethereal.com/mailman/listinfo/ethereal-dev
Re: Re: Patch for new dissector plugin for Ether-S-Bus telegrams modified (Jaap Keuter) [ In reply to ]
Hi,

Fixed in Wireshark SVN.

Thanx,
Jaap

On Thu, 22 Jun 2006, Guy Harris wrote:

>
> On Jun 15, 2006, at 11:24 AM, Christian Durrer wrote:
>
> > Could you please have a look at it and if it is ok, check it in?
>
> One warning from GCC:
>
> packet-sbus.c:634: warning: 'sbus_web_seq' is used uninitialized in
> this function
>
> The section of code uses sbus_web_seq, but it's never been set.
> Where is the sequence number in a response?

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@ethereal.com
http://www.ethereal.com/mailman/listinfo/ethereal-dev