NAME

IPC::SysV::MsgDS - Class to hold message queue data structures

SYNOPSIS

require IPC::SysV::MsgDS;

use IPC::SysV qw(IPC_STAT);
msgctl($qid,IPC_STAT,$msqid_ds);

$msqid_ds_obj = IPC::SysV::MsgDS->new($msqid_ds);
$msqid_ds_obj->qnum();
$msqid_ds_obj->set_uid_gid_mode_qbytes($uid, $gid, $mode, $qbytes);
msgctl($qid,IPC_SET,$msqid_ds_obj->repack());
$msqid_ds_obj->perm_uid();
$msqid_ds_obj->perm_gid();
$msqid_ds_obj->perm_cuid();
$msqid_ds_obj->perm_cgid();
$msqid_ds_obj->perm_mode();
$msqid_ds_obj->qnum();
$msqid_ds_obj->qbytes();
$msqid_ds_obj->lspid();
$msqid_ds_obj->lrpid();
$msqid_ds_obj->stime();
$msqid_ds_obj->rtime();
$msqid_ds_obj->ctime();
$msqid_ds_obj->mode();

DESCRIPTION

This package provides a nice interface to a message queue id data structure (MSQID_DS).

Given a string holding a MSQID_DS structure ($msqid_ds, for example as obtained with 'msgctl($qid,IPC_STAT,$msqid_ds)') you can get the object with

IPC::SysV::MsgDS->new($msqid_ds);

This object holds the individual parts of the data structure, and has the following access methods to access the items returned by IPC::SysV::msg_unpack_msqid_ds().

$msqid_ds_obj->perm_uid()
$msqid_ds_obj->perm_gid()
$msqid_ds_obj->perm_cuid()
$msqid_ds_obj->perm_cgid()
$msqid_ds_obj->perm_mode()
$msqid_ds_obj->qnum() 	
$msqid_ds_obj->qbytes() 	
$msqid_ds_obj->lspid() 	
$msqid_ds_obj->lrpid() 	
$msqid_ds_obj->stime() 	
$msqid_ds_obj->rtime() 	
$msqid_ds_obj->ctime()

In addition, one other access method, 'mode', accesses the perm_mode in a string readable format ('RW-RW-RW-').

$msqid_ds_obj->mode()

One updating method is available, 'set_uid_gid_mode_qbytes' which takes four arguments, the UID, GID, MODE, and QBYTES, to update the parts perm_uid, perm_gid, perm_mode and qbytes respectively. Any of these can be undef, in which case the corresponding value is not altered. The perm_mode argument can be numeric or in 'RW-RW-RW-' format.

$msqid_ds_obj->set_uid_gid_mode_qbytes(UID,GID,MODE,QBYTES)

Finally, you can retrieve the packed object for the current state of the object with the repack method,

$msqid_ds_obj->repack()

This is useful to reset values.

Jack Shirazi

This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Version 1.0

Base version.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 119:

Unknown directive: =AUTHOR

Around line 126:

Unknown directive: =MODIFICATION

Around line 128:

'=item' outside of any '=over'

=over without closing =back