~ubuntu-branches/ubuntu/gutsy/wireshark/gutsy-security

« back to all changes in this revision

Viewing changes to plugins/profinet/packet-pn-ptcp.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2007-04-01 08:58:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070401085840-or3qhrpv8alt1bwg
Tags: 0.99.5-1
* New upstream release.
* debian/patches/09_idl2wrs.dpatch: updated to patch idl2wrs.sh.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Routines for PN-PTCP (PROFINET Precision Time Clock Protocol) 
3
3
 * packet dissection.
4
4
 *
5
 
 * $Id: packet-pn-ptcp.c 18607 2006-06-29 08:16:57Z ulfl $
 
5
 * $Id: packet-pn-ptcp.c 20078 2006-12-09 09:28:29Z ulfl $
6
6
 *
7
7
 * Wireshark - Network traffic analyzer
8
8
 * By Gerald Combs <gerald@wireshark.org>
467
467
 
468
468
static int
469
469
dissect_PNPTCP_Option_PROFINET(tvbuff_t *tvb, int offset, 
470
 
        packet_info *pinfo, proto_tree *tree, proto_item *item _U_, guint16 length)
 
470
        packet_info *pinfo, proto_tree *tree, proto_item *item, guint16 length)
471
471
{
472
 
        guint8 subType;
473
 
    guint8 padding8;
 
472
    guint8 subType;
 
473
    guint16 padding16;
474
474
    e_uuid_t uuid;
475
475
    proto_item *unknown_item;
476
476
 
482
482
 
483
483
    switch(subType) {
484
484
    case 1: /* RTData */
485
 
        /* Padding8 */
486
 
        offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_ptcp_padding8, &padding8);
 
485
        /* Padding16 */
 
486
        offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_ptcp_padding16, &padding16);
487
487
 
488
488
        /* IRDataUUID */
489
489
        offset = dissect_pn_uuid(tvb, offset, pinfo, tree, hf_pn_ptcp_irdata_uuid, &uuid);
 
490
        proto_item_append_text(item, ": IRDataUUID=%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
 
491
                                      uuid.Data1, uuid.Data2, uuid.Data3,
 
492
                                      uuid.Data4[0], uuid.Data4[1],
 
493
                                      uuid.Data4[2], uuid.Data4[3],
 
494
                                      uuid.Data4[4], uuid.Data4[5],
 
495
                                      uuid.Data4[6], uuid.Data4[7]);
 
496
 
490
497
        break;
491
498
    default:
492
499
        unknown_item = proto_tree_add_string_format(tree, hf_pn_ptcp_data, tvb, offset, length, "data",