Пример #1
0
int
dissect_ndr_uuid_t (tvbuff_t *tvb, gint offset, packet_info *pinfo,
                    proto_tree *tree, guint8 *drep,
                    int hfindex, e_uuid_t *pdata)
{
    dcerpc_info *di;

    di=pinfo->private_data;
    if(di->conformant_run){
      /* just a run to handle conformant arrays, no scalars to dissect */
      return offset;
    }

    /* uuid's are aligned to 4 bytes, due to initial uint32 in struct */
    if (offset % 4) {
        offset += 4 - (offset % 4);
    }
    return dissect_dcerpc_uuid_t (tvb, offset, pinfo,
                                  tree, drep, hfindex, pdata);
}
Пример #2
0
int
dissect_ndr_uuid_t(tvbuff_t *tvb, gint offset, packet_info *pinfo,
                   proto_tree *tree, dcerpc_info *di, guint8 *drep,
                   int hfindex, e_guid_t *pdata)
{
    /* Some callers expect us to initialize pdata, even in error conditions, so
     * do it right away in case we forget later */
    if (pdata)
        memset(pdata, 0, sizeof(*pdata));

    if (di->conformant_run) {
        /* just a run to handle conformant arrays, no scalars to dissect */
        return offset;
    }

    /* uuid's are aligned to 4 bytes, due to initial uint32 in struct */
    if (!di->no_align && (offset % 4)) {
        offset += 4 - (offset % 4);
    }
    return dissect_dcerpc_uuid_t(tvb, offset, pinfo,
                                 tree, drep, hfindex, pdata);
}