Syntax
int vm_soc_getsockopt(
    int sock, 
    unsigned int option, 
    void* val, 
    unsigned int val_size
);
ContentsIndex
PreviousUpNext
vm_soc_getsockopt
Example | See Also
Syntax
int vm_soc_getsockopt(
    int sock, 
    unsigned int option, 
    void* val, 
    unsigned int val_size
);
Description

Gets the socket options.

Parameters
Parameters 
Description 
int sock 
[IN] Socket descriptor. 
unsigned int option 
[IN] Specifies the option type, as defined in VM_SOC_OPTION
void* val 
[OUT] The buffer to contain the option value upon the return of this function. 
unsigned int val_size 
[IN|OUT] The size of the buffer, and the actual size of the option value upon the return of this function. 
Return Values
Return Values 
Description 
VM_SOC_SUCCESS 
Success.
 
VM_SOC_INVALID_SOCKET 
Invalid socket descriptor.
 
VM_SOC_INVAL 
Invalid value, specified in how.
 
VM_SOC_ERROR 
Unspecified error. 
See Also
Example

 

VM_SOC_TCP_DELAYED_ACK: 

val contains kal_bool to hold the option behavior. 

If you don't set this option, the default value you get is KAL_TRUE. 

If you to get this option, you can do: 

 

kal_bool val;
getsockopt(sock,  SOC_TCP_DELAYED_ACK, &val, sizeof(kal_bool))

 

 

VM_SOC_TCP_SACK: 

val contains kal_bool to hold the option behavior. 

If you don't set this option, the default value you get is KAL_TRUE. 

If you to get this option, you can do: 

 

kal_bool val;
getsockopt(sock,  SOC_TCP_SACK, &val, sizeof(kal_bool))

 

 

VM_SOC_TCP_TIME_STAMP: 

val contains kal_bool to hold the option behavior. 

If you don't set this option, the default value you get is KAL_TRUE. 

If you to get this option, you can do: 

kal_bool val;
getsockopt(sock,  SOC_TCP_TIME_STAMP, &val, sizeof(kal_bool))
File

vmsock.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.