Exemple #1
0
static int
dissect_PNMRP_LinkDown(tvbuff_t *tvb, int offset, 
	packet_info *pinfo, proto_tree *tree, proto_item *item)
{
    guint16 port_role;
    guint16 interval;
    guint16 blocked;


    /* MRP_PortRole */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_port_role, &port_role);

    /* MRP_Interval */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_interval, &interval);

    /* MRP_Blocked */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_blocked, &blocked);

    /* Padding */
    offset = dissect_pn_align4(tvb, offset, pinfo, tree);

    col_append_str(pinfo->cinfo, COL_INFO, "LinkDown");

    proto_item_append_text(item, "LinkDown");

    return offset;
}
Exemple #2
0
static int
dissect_PNMRP_Option(tvbuff_t *tvb, int offset, 
	packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 length)
{
    guint32 oui;


    /* OUI (organizational unique id) */
    offset = dissect_pn_oid(tvb, offset, pinfo,tree, hf_pn_mrp_oui, &oui);
    length -= 3;
	
    switch (oui)
	{
	case OUI_SIEMENS:
        proto_item_append_text(item, "Option(SIEMENS)");
        /* Padding */
        if (offset % 4) {
            length -= 4 - (offset % 4);
            offset = dissect_pn_align4(tvb, offset, pinfo, tree);
        }
        if(length != 0) {
            offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, length);
        }
        col_append_str(pinfo->cinfo, COL_INFO, "Option(Siemens)");
		break;
	default:
        proto_item_append_text(item, "Option(Unknown-OUI)");
        offset = dissect_pn_undecoded(tvb, offset, pinfo, tree, length);

        col_append_str(pinfo->cinfo, COL_INFO, "Option");
    }

    offset += length;

    /* Padding */
    offset = dissect_pn_align4(tvb, offset, pinfo, tree);

    return offset;
}
Exemple #3
0
static int
dissect_PNMRRT_Test(tvbuff_t *tvb, int offset,
        packet_info *pinfo, proto_tree *tree, proto_item *item, guint8 length _U_)
{
    guint8 mac[6];


    /* MRRT_SA */
    offset = dissect_pn_mac(tvb, offset, pinfo, tree, hf_pn_mrrt_sa, mac);

    /* Padding */
    offset = dissect_pn_align4(tvb, offset, pinfo, tree);

    col_append_str(pinfo->cinfo, COL_INFO, "Test");

    proto_item_append_text(item, "Test");

    return offset;
}
Exemple #4
0
static int
dissect_PNMRP_Test(tvbuff_t *tvb, int offset, 
	packet_info *pinfo, proto_tree *tree, proto_item *item)
{
    guint16 prio;
    guint8 mac[6];
    guint16 port_role;
    guint16 ring_state;
    guint16 transition;
    guint16 time_stamp;


    /* MRP_Prio */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_prio, &prio);

    /* MRP_SA */
    offset = dissect_pn_mac(tvb, offset, pinfo, tree, hf_pn_mrp_sa, mac);

    /* MRP_PortRole */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_port_role, &port_role);

    /* MRP_RingState */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_ring_state, &ring_state);

    /* MRP_Transition */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_transition, &transition);

    /* MRP_TimeStamp */
    offset = dissect_pn_uint16(tvb, offset, pinfo, tree, hf_pn_mrp_time_stamp, &time_stamp);

    /* Padding */
    offset = dissect_pn_align4(tvb, offset, pinfo, tree);

    col_append_str(pinfo->cinfo, COL_INFO, "Test");

    proto_item_append_text(item, "Test");

    return offset;
}