The
sock_do_teststor() call is used to check for calls that attempt to
access storage outside the caller address space.
#include <manifest.h>
#include <socket.h>
void sock_do_teststor(int onoff)
- Parameter
- Description
- onoff
- A parameter that can be set to 0 or nonzero
If onoff is not 0
for either inbound or outbound sockets, both the address of the message
buffer and the message buffer itself are checked for addressability
at every socket call. The error condition, EFAULT, is set if there
is an addressing problem. If onoff is set
to 0, address checking is not done by the socket library program.
If an error occurs when onoff is 0, normal
runtime error handling reports the exception condition.
The
default for
onoff is 0. Addresses are not
checked for addressability for parameters of C socket calls. While
you are testing your program, you might find it useful to set
onoff to a nonzero value.
Notes: - You can include the statement SOCKNOTESTSTOR in data set TCPIP.DATA,
as an alternative to calling sock_do_teststor() with onoff equal
to 0.
- You can include the statement SOCKTESTSTOR in the data set TCPIP.DATA
which is in the client’s catalog when the socket program is started,
as an alternative to calling sock_do_teststor() with onoff not
equal to 0.