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

Hmm, I notice only now that I had not seen your full message (silly from me).

I do not have root access. I might be able to ask someone having root access to run the command. But please supply the exact full command, that person (a supplier of my client) would most probably do it as a favor to me, but I am not going to ask several times.

Again, if I can help you further, please ask.

  • Comment on Re: Need SYS_sendmsg and SYS_recvmsg values from an AIX box

Replies are listed 'Best First'.
Re^2: Need SYS_sendmsg and SYS_recvmsg values from an AIX box
by marioroy (Prior) on Aug 19, 2015 at 22:02 UTC

    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);
      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