42.2 Winsock Values

This section lists the NetWare specific Winsock 2 flag extension values that are defined in novsock2.h that affect the way in which completion routines are called only when using overlapped I/O.

42.2.1 IOCTL Flags

The dwIoControlCode parameter in the WSAIoctl function and the cmd parameter in the ioctlsocket function (see Windows* Sockets 2 Application Programming Interface) can have the following values:

0x1ADD0002

SIO_RAWCALLBACKS: If set to 1, Winsock 2 will not schedule any additional NetWare processes for your application. Instead, your overlapped completion routines will be called using the current NetWare process.

0x1ADD0004

SIO_WORKTODOCALLBACKS: If set to 1, Winsock 2 will schedule a work to do server process.

42.2.2 WSASocket Flags

The dwFlags parameter in the WSASocket function (see Windows* Sockets 2 Application Programming Interface) can have the following values:

0x40000000

SKTS_RAWCALLBACKS: If set to 1, Winsock 2 will not schedule any additional NetWare processes for your application. Instead, your overlapped completion routines will be called using the current NetWare process.

0x20000000

SKTS_WORKTODOCALLBACKS: If set to 1, Winsock 2 will schedule a work to do server process.

42.2.3 SSL/TLS Values

This documentation lists the values to use with SSL/TLS (see Section 38.6, Secure Sockets Layer (SSL) and Transport Layer Security (TLS) for a description).

Controls

All SSL/TLS controls call WSAIoctl, with the following dwIoControlCode values:

The “T” value is as follows

  #define _SO_TLS ((2L<<27)|<0x73L<<16))
  

The code values are as follows:

  0x01   _SO_TLS_FLAGS
  0x02   _SO_TLS_CIPHERS
  0x04   _SO_TLS_SERVER
  0x40   _SO_TLS_CERT
  

The loctl commands are as follows:

Constant

IOCTL Constant

Where Used

  SO_TLS_GET_FLAGS
  
  (IOC_IN|_SO_TLS|_SO_TLS_FLAGS)
  

See Get and Set Flags.

  SO_TLS_SET_FLAGS
  
  (IOC_OUT|_SO_TLS|_SO_TLS_FLAGS)
  

See Get and Set Flags.

  SO_TLS_GET_CIPHERS
  
  (IOC_IN|_SO_TLS|_SO_TLS_CIPHERS)
  

See tlscipheropts.

  SO_TLS_GET_CLIENT
  
  (IOC_IN|_SO_TLS|_SO_TLS_CLIENT)
  

See tlsclientopts.

  SO_TLS_SET_CLIENT
  
  (IOC_OUT|_SO_TLS|_SO_TLS_CLIENT)
  

See tlsclientopts.

  SO_TLS_GET_SERVER
  
  (IOC_IN|_SO_TLS|_SO_TLS_SERVER)
  

See tlsserveropts.

  SO_TLS_SET_SERVER
  
  (IOC_OUT|_SO_TLS|_SO_TLS_SERVER)
  

See tlsserveropts.

  SO_TLS_GET_CERT
  
  (IOC_IN|_SO_TLS|_SO_TLS_CERT)
  

See tlscert.

Get and Set Flags

WSAIoctl is used to get and set the flags associated with the socket. The lpvInBuffer parameter points to a WORD, with the following flags:

Value

Flag

Description

0x0001

SO_TLS_ENABLE

Enables TLS security on the socket (if it is not already enabled). If the socket already has TLS security enabled, this flag is ignored. If this flag is set after a connection has already been established, the TLS handshake protocol is performed before the next byte of data is transferred. If the TLS handshake protocol fails, TLS security is disabled.

0x0002

SO_TLS_SERVER

Indicates that the socket is to be configured for server operation. Also, that the server is authenticated through the certificate verify message exchange described in 7.4.8 of RFC 2246.

If TLS security is already enabled on a socket, this flag has not been set, and the listen function is called using the socket, the socket is configured for server operation and this flag is set.

If TLS security is already enabled on a socket and if the connect or WSAConnect functions are called using the socket, the socket is configured for client operation.

0x0004

SO_TLS_AUTH_CLIENT

Indicates the authentication of the client certificate for the server. This flag is valid only if SO_TLS_SERVER is also supplied.

0x0040

SO_TLS_BLIND_ACCEPT

Requires TLS to accept peer certificates arriving on this socket, even though TLS might not be configured to use or might not possess the trusted root that is needed to verify the certificate chain presented by the peer.

0x0080

SO_TLS_INTERACTIVE_ACCEPT

Is not currently used.