nettl: user IDs are 32-bit in HP-UX.

Also note that the record header might have additional stuff at the end,
although not all record headers do (the header length will indicate
what's there).

Change-Id: I5a9ff1f9cd592448bcc45d18808f4b651cdb2f0d
Reviewed-on: https://code.wireshark.org/review/37921
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
This commit is contained in:
Guy Harris 2020-07-21 14:29:31 -07:00
parent 3a38fc9d11
commit 8cf626bf16
3 changed files with 6 additions and 5 deletions

View File

@ -296,7 +296,7 @@ proto_register_nettl(void)
"HP-UX Process/thread id", HFILL}},
{ &hf_nettl_uid,
{ "User ID (uid)", "nettl.uid", FT_UINT16, BASE_DEC, NULL, 0x0,
{ "User ID (uid)", "nettl.uid", FT_UINT32, BASE_DEC, NULL, 0x0,
"HP-UX User ID", HFILL}}
};

View File

@ -61,8 +61,9 @@ struct nettlrec_hdr {
guint32 sec;
guint32 usec;
guint32 pid;
guint8 xxc[10];
guint16 uid;
guint8 xxc[8];
guint32 uid;
/* Other stuff might be here, but isn't always here */
};
/*
@ -554,7 +555,7 @@ nettl_read_rec(wtap *wth, FILE_T fh, wtap_rec *rec, Buffer *buf,
pseudo_header->nettl.devid = pntoh32(&rec_hdr.devid);
pseudo_header->nettl.kind = pntoh32(&rec_hdr.kind);
pseudo_header->nettl.pid = pntoh32(&rec_hdr.pid);
pseudo_header->nettl.uid = pntoh16(&rec_hdr.uid);
pseudo_header->nettl.uid = pntoh32(&rec_hdr.uid);
if (rec->rec_header.packet_header.caplen > WTAP_MAX_PACKET_SIZE_STANDARD) {
/*

View File

@ -941,7 +941,7 @@ struct nettl_phdr {
guint32 devid;
guint32 kind;
gint32 pid;
guint16 uid;
guint32 uid;
};
/* Packet "pseudo-header" for MTP2 files. */