+/*******************************************************************
+reads or writes SEC_DESC_BUF and SEC_DATA structures.
+********************************************************************/
+static void reg_io_hdrbuf_sec(uint32 ptr, uint32 *ptr3, BUFHDR *hdr_sec, SEC_DESC_BUF *data, prs_struct *ps, int depth)
+{
+ if (ptr != 0)
+ {
+ uint32 hdr_offset;
+ uint32 old_offset;
+ smb_io_hdrbuf_pre("hdr_sec", hdr_sec, ps, depth, &hdr_offset);
+ old_offset = ps->offset;
+ if (ptr3 != NULL)
+ {
+ prs_uint32("ptr3", ps, depth, ptr3);
+ }
+ if (ptr3 == NULL || *ptr3 != 0)
+ {
+ sec_io_desc_buf("data ", data , ps, depth);
+ }
+ smb_io_hdrbuf_post("hdr_sec", hdr_sec, ps, depth, hdr_offset,
+ data->max_len, data->len);
+ ps->offset = old_offset + data->len + sizeof(uint32) * ((ptr3 != NULL) ? 5 : 3);
+ prs_align(ps);
+ }
+}
+