Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Need SYS_sendmsg and SYS_recvmsg values from an AIX box

by marioroy (Prior)
on Aug 19, 2015 at 22:02 UTC ( [id://1139236]=note: print w/replies, xml ) Need Help??


in reply to Re: Need SYS_sendmsg and SYS_recvmsg values from an AIX box
in thread Need SYS_sendmsg and SYS_recvmsg values from an AIX box

Updated with output from a Linux VM.

Thank you Laurent_R. I just tried with the -d option and root access is not required. There is space followed by a dot after the -l (letter l as in larry).

mkdir /tmp/phfiles cd /usr/include h2ph -d /tmp/phfiles -r -l . cd /tmp/phfiles grep sendmsg */*.ph grep recvmsg */*.ph

Below, the grep output from a 64-bit Linux OS. Thus, the values are 46 and 47 for sendmsg and recvmsg respectively.

$ cd /tmp/phfiles $ grep sendmsg */*.ph asm-generic/unistd.ph:eval 'sub __NR_sendmsg () {211;}' unless defined +(&__NR_sendmsg); asm/unistd_64.ph: eval 'sub __NR_sendmsg () {46;}' unless defined(& +__NR_sendmsg); asm/unistd_x32.ph: eval 'sub __NR_sendmsg () {( &__X32_SYSCALL_BIT ++ 518);}' unless defined(&__NR_sendmsg); bits/syscall.ph: eval 'sub SYS_sendmsg () { &__NR_sendmsg;}' unless + defined(&SYS_sendmsg); bits/syscall.ph: eval 'sub SYS_sendmsg () { &__NR_sendmsg;}' unless + defined(&SYS_sendmsg); $ grep recvmsg */*.ph asm-generic/unistd.ph:eval 'sub __NR_recvmsg () {212;}' unless defined +(&__NR_recvmsg); asm/unistd_64.ph: eval 'sub __NR_recvmsg () {47;}' unless defined(& +__NR_recvmsg); asm/unistd_x32.ph: eval 'sub __NR_recvmsg () {( &__X32_SYSCALL_BIT ++ 519);}' unless defined(&__NR_recvmsg); bits/syscall.ph: eval 'sub SYS_recvmsg () { &__NR_recvmsg;}' unless + defined(&SYS_recvmsg); bits/syscall.ph: eval 'sub SYS_recvmsg () { &__NR_recvmsg;}' unless + defined(&SYS_recvmsg);

Replies are listed 'Best First'.
Re^3: Need SYS_sendmsg and SYS_recvmsg values from an AIX box
by Laurent_R (Canon) on Aug 20, 2015 at 08:54 UTC
    Hi Mario, this is the output of your first grep command: And the second one: I don't make sense on that, but I hope this helps you.

    Cheers,

    Laurent.

      This is great Laurent_R.

      sys/socket.ph: eval 'sub sendmsg () { &nsendmsg;}' unless + defined(&sendmsg); sys/socket.ph: eval 'sub recvmsg () { &nrecvmsg;}' unless + defined(&recvmsg);

      I was hoping that the glob wildcard */*.ph would pick up the relevant bits, but did not find the numeric values for nsendmsg and nrecvmsg. The following 3 liners pick up syscall.ph from /tmp/phfiles (hoping you still have this).

      require '/tmp/phfiles/sys/syscall.ph'; print "SYS_sendmsg: ", SYS_sendmsg(), "\n"; print "SYS_recvmsg: ", SYS_recvmsg(), "\n";

      I wished I had provided the 3 liners requiring sys/syscall.ph from /tmp/phfiles.

      Thank you, Mario

        Sorry Mario,

        it doesn't work:

        $perl -e 'require "/tmp/phfiles/sys/syscall.ph"; > print "SYS_sendmsg: ", SYS_sendmsg(), "\n"; > print "SYS_recvmsg: ", SYS_recvmsg(), "\n"; > ' Can't locate /tmp/phfiles/sys/syscall.ph in @INC (@INC contains: /opt/ +freeware/lib/perl5/5.10.1/ppc-aix-thread-multi /opt/freeware/lib/perl +5/5.10.1 /opt/freeware/lib/perl5/site_perl/5.10.1/ppc-aix-thread-mult +i /opt/freeware/lib/perl5/site_perl/5.10.1 .) at -e line 1. $ls /tmp/phfiles/sys/syscall.ph ls: cannot access /tmp/phfiles/sys/syscall.ph: A file or directory in +the path name does not exist.
        So, it cannot find syscall.ph, although the *.ph files are still there and the sys subdirectory exists and contains a lot of *.ph files, but not syscall.ph.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1139236]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-23 09:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found