CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
unpack template for AIX utmp struct

 



bujecas
New User

Sep 7, 2006, 2:57 PM

Post #1 of 1 (1346 views)
unpack template for AIX utmp struct Can't Post

Hello,
I'm trying to figure out the unpack template for the AIX utmp struct.

This is the C struct:

code:
struct utmp
{
char ut_user[256] ; /* User login name */
char ut_id[14] ; /* /etc/inittab id */
char ut_line[64] ; /* device name (console, lnxx) */
pid_t ut_pid ; /* process id */
short ut_type ; /* type of entry */
#if !defined(__64BIT__) && !defined(__ia64)
int __time_t_space; /* for 32vs64-bit time_t PPC */
#endif
time_t ut_time ; /* time entry was made */
#if !defined(__64BIT__) && defined(__ia64)
int __time_t_space; /* for 32vs64-bit time_t IA64 */
#endif
struct exit_status
{
short e_termination ; /* Process termination status */
short e_exit ; /* Process exit status */
}
ut_exit ; /* The exit status of a process
* marked as DEAD_PROCESS.
*/
char ut_host[256] ; /* host name */
int __dbl_word_pad; /* for double word alignment */
int __reservedA[2];
int __reservedV[6];
} ;



I've tried this templates:
A256 A14 A64 l s x2 l l s2 A256 l l2 l6
A256 A14 A64 l s x2 l l s2 A256 l x8 x24
A256 A14 A64 l s x2 l s2 A256 l l2 l6
A256 A14 A64 l s x2 l s2 A256 l x8 x24

All of them gives the error: "x outside of string"

I think that the "#if defines" confuses a little.

Any help?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives