Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
232 Posts
ACCEPTED ANSWER

Pinned topic perl unpack function template for Redhat Linux 8

‏2005-05-09T19:33:21Z |
Due to IBM's recent 2 Billion dollar investment in the open source market, I would hope an IBM developer would be able to give me a valid perl 'unpack()' function template ( like $template = "s i A12 A4 A32 A256 s s l i i A20"; ), based on the following definition:

struct exit_status {
short int e_termination; /* process termination status. */
short int e_exit; /* process exit status. */
};

struct utmp {
short ut_type; /* type of login */
pid_t ut_pid; /* pid of login process */
char ut_lineUT_LINESIZE; /* device name of tty − "/dev/" */
char ut_id[4]; /* init id or abbrev. ttyname */
char ut_userUT_NAMESIZE; /* user name */
char ut_hostUT_HOSTSIZE; /* hostname for remote login */
struct exit_status ut_exit; /* The exit status of a process
marked as DEAD_PROCESS. */
long ut_session; /* session ID, used for windowing*/
struct timeval ut_tv; /* time entry was made. */
int32_t ut_addr_v6[4]; /* IP address of remote host. */
char pad20; /* Reserved for future use. */
};