
bujecas
New User
Sep 7, 2006, 2:57 PM
Post #1 of 1
(2132 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?
|