Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

VMS setsockopt permission failure

 
SOLVED
Go to solution
alphacat
Occasional Advisor

VMS setsockopt permission failure

Hi everyone,

 When porting Linux networking code to OpenVMS 7.3-1, TCPIP 5.3-18 on XP1000,

the setsockopt function fails to set the size of send or receive buffer (unlike  Linux):

     . . . . .

     sock = socket(AF_INET,SOCK_STREAM,0);

     . . . . .

     rbuf = 61440;       /* just an example; this is the default */

     retval = setsockopt(sock,SOL_SOCKET,SO_RCVBUF,&rbuf,sizeof(rbuf));

     . . . . .

producing the message "permission denied". The other socket options are set successfully.

I wonder what permissions are necessary and why have I no full control on the socket I just created?

No information found in the Internet about privileges, protection codes, system parameters

concerning sockets in OpenVMS.

Thanks

 

2 REPLIES 2
Jeremy Begg
Trusted Contributor
Solution

Re: VMS setsockopt permission failure

Have you looked at the VMS documentation?

 

http://h71000.www7.hp.com/doc/82final/6529/6529pro_028.html#op_setsock_tab

 

To set SO_RCVBUF you must have SYSPRV, BYPASS or OPER privilege.

I image this would be because each socket buffer consumes system dynamic memory, but I could be mistaken.

 

Regards,

Jeremy Begg

alphacat
Occasional Advisor

Re: VMS setsockopt permission failure

Thank you for your attention to my question and the reference to the HP document.

 

I read a number of DEC/CPQ/HP OpenVMS documents related to TCP/sockets visible in the Internet, the reply "permission denied" was mentioned many times but without any comments which permissions were lacking. It happened that I did not meet the proper document. I have a set of VMS documentation on CDs but I am not sure in which document the required information could be located.

 

This is a pity. By no means the target program should be run at elevated privileges, nor should it be installed as known image. I see the only way to increase the buffer size in TCPIP globally using TCPIP>sysconfig but this may lead to undesirable side effects with the other network applications.

 

Thank you once again