Location:
in_sock.h
This section lists constants that identify TCP/IP protocols. They are defined in in_sock.h.
This section lists constants that be used to obtain information and set
options through RSocket::GetOpt()
and
RSocket::SetOpt()
. Unless otherwise noted, a constant can be used
in both functions.
Generic socket options can also be used. Note especially the meaning of the following generic options when applied to TCP/IP:
KSOReadBytesPending
: for TCP, the number of bytes
currently available for reading; for UDP, this is the number of queued
datagrams.
KSOUrgentDataOffset
: for TCP/IP only, the offset to
the next urgent data.
This section describes the options that can be used both with TCP and UDP sockets.
These values concern DNS cache options. Set
anOptionLevel
to KSolInetDnsCtrl
. They are defined in
in_sock.h.
KSoDnsCacheEnable
const TUint KSoDnsCacheEnable
Enable DNS cache flag.
Default is enabled.
TInt
0. Disable 1. Enable
KSoDnsCacheFlush
const TUint KSoDnsCacheFlush
Flush DNS cache
SetOpt()
only.
Not required
These values concern IP options. Set anOptionLevel
toKSolInetIp
. They are defined in in_sock.h.
KSoIpTOS
const TUint KSoIpTOS
Type of Service field of outgoing datagrams.
The default value is 0.
TInt
0-63
KSoIpTTL
const TUint KSoIpTTL
Time to Live field of outgoing datagrams.
The default value is 255.
TInt
1-255
KSoNoInterfaceError
const TUint KSoNoInterfaceError
Do not return an error if there are no available routes when a connect call is made.
Default is disabled.
TInt
0. Disable 1. Enable
KSoReuseAddr
const TUint KSoReuseAddr
Allow a socket to be bound to an local address that is already in use.
Default is disabled.
TInt
0. Disable 1. Enable
KSoInetLastError
const TUint KSoInetLastError
Retrieve last error information.
GetOpt()
only.
TPckgBuf< TSoInetLastErr >
These values concern network interface driver options.
SetanOptionLevel
to KSOLInterface
. They are defined
in in_iface.h.
KSoIfInfo
const TUint KSoIfInfo
The current network interface driver operation parameters are written to
the passed TSoIfInfo
structure.
TPckgBuf< TSoIfInfo >
KSoIfHardwareAddr
const TUint KSoIfHardwareAddr
For future use.
KSoIfConfig
const TUint KSoIfConfig
The current network interface driver configuration options are written to
the passed TSoInetIfConfig
structure.
TPckgBuf< TSoInetIfConfig >
KSoIfCompareAddr
const TUint KSoIfCompareAddr
Compares the passed address with the current local address, and
returnsKErrBadName
if not equal.
TPckgBuf< TInetAddr >
These values concern network interface options.
SetanOptionLevel
to KSolInetIfCtrl
. They are defined
in in_sock.h.
KSoInetEnumInterfaces
const TUint KSoInetEnumInterfaces
Begin enumeration of network interfaces. This option should be set before
enumerating interfaces by
callingGetOpt()
withanOptionName
set
toKSoInetNextInterface
.
SetOpt()
only.
Not required
KSoInetConfigInterface
const TUint KSoInetConfigInterface
Return details of the specified interface. The interface can be specified
by setting the iAddress
, iTag
, iName
,
oriHwAddr
of the passed TSoInetInterfaceInfo
. The
complete details are passed back in the same object.
GetOpt()
only.
TPckgBuf< TSoInetInterfaceInfo >
KSoInetNextInterface
const TUint KSoInetNextInterface
Return details of the next interface in an enumeration started by setting
the option KSoInetEnumInterfaces
.
GetOpt()
only.
TPckgBuf< TSoInetInterfaceInfo >
These constants concern network interface start-up and shutdown.
SetanOptionLevel
to KNifOptLevel
. They are defined in
nifman.h.
KNifOptStartInterface
const TUint KNifOptStartInterface
Start the named network interface.
SetOpt()
only.
TPtrC
KNifOptStopInterface
const TUint KNifOptStopInterface
Stop the named network interface.
SetOpt()
only.
TPtrC
KNifOptInterfaceProgress
const TUint KNifOptInterfaceProgress
Returns interface progress information.
GetOpt()
only.
TNifProgressBuf
These values concern IP routing options.
SetanOptionLevel
toKSolInetRtCtrl
. They are defined in
in_sock.h.
The following options can only be
usedRSocket::SetOpt()
.
KSoInetEnumRoutes
const TUint KSoInetEnumRoutes
Begin enumeration of routes. This option should be set before enumerating
routes by calling GetOpt()
with anOptionName
set
toKSoInetNextRoute
.
Not required
KSoInetAddRoute
const TUint KSoInetAddRoute
Adds the specified route to the routing table.
TPckgBuf< TSoInetRouteInfo >
KSoInetDeleteRoute
const TUint KSoInetDeleteRoute
Deletes the specified route from the routing table.
TPckgBuf< TSoInetRouteInfo >
KSoInetChangeRoute
const TUint KSoInetChangeRoute
Modifies the specified route in the routing table. The destination and netmask settings must be the same in the new route as in the old.
TPckgBuf< TSoInetRouteInfo >
KSoInetCachedRouteByDest
const TUint KSoInetCachedRouteByDest
Find a cached route to a specified destination.
The caller should pass a packaged TSoInetCachedRouteInfo
with
its iDstAddr
member set to the required address.
TPckgBuf< TSoInetCachedRouteInfo
>
KSoInetNextRoute
const TUint KSoInetNextRoute
Return the next route in an enumeration started by setting the
optionKSoInetEnumRoutes
.
TPckgBuf< TSoInetRouteInfo >
This section describes the options that can only be used with UDP sockets.
Set anOptionLevel
to KSolInetUdp
. It is defined
in in_sock.h.
KSoUdpReceiveICMPError
const TUint KSoUdpReceiveICMPError
Inform client of error if ICMP error packets received.
Default is enabled.
TInt
0. Disable 1. Enable
These values concern IP datagram options.
SetanOptionLevel
toKSolInetIp
. They are defined in in_sock.h.
KSoIpOptions
const TUint KSoIpOptions
Data to place in IP Options field of sent datagrams.
TBuf8< TInt >
The maximum length is 40 bytes.
KSoRawMode
const TUint KSoRawMode
Include IP header in data returned to client.
Default is disabled.
TInt
0. Disable 1. Enable
KSoHeaderIncluded
const TUint KSoHeaderIncluded
Assume that the IP header is included in all data written by the
client.KSoRawMode
must be set before this is allowed.
Default is disabled.
TInt
0. Disable 1. Enable
This section describes the options that can only be used with TCP
sockets. Set anOptionLevel
to KSolInetTcp
. They are
defined in in_sock.h.
This section describes the options that can only be used with TCP
sockets. Set anOptionLevel
to KSolInetTcp
. They are
defined in in_sock.h.
KSoTcpAsync2MslWait
const TUint KSoTcpAsync2MslWait
If address reuse is allowed, and a connection already exists between the requested local and remote addresses, wait for the address to become available.
Default is disabled.
TInt
0. Disable 1. Enable
KSoTcpKeepAlive
const TUint KSoTcpKeepAlive
On the time-out expiring without an acknowledgement being received, send a packet designed to force a response if the peer is up and reachable.
Default is disabled.
TInt
0. Disable 1. Enable
KSoTcpMaxSegSize
const TUint KSoTcpMaxSegSize
The maximum TCP segment size (bytes).
If this option is set when the connection state is not closed,
thenKErrLocked
is returned.
The default value is 1460.
TInt
KSoTcpNextSendUrgentData
const TUint KSoTcpNextSendUrgentData
The next send operation will mark the last byte sent as urgent data.
Default is disabled.
TInt
0. Disable 1. Enable
KSoTcpNoDelay
const TUint KSoTcpNoDelay
Send data at once if there is an established connection, without waiting for the maximum segment size to be reached.
Default is disabled.
TInt
0. Disable 1. Enable
KSoTcpOobInline
const TUint KSoTcpOobInline
Receive out-of-band data in the normal data stream.
Default is disabled.
TInt
0. Disable 1. Enable
KSoTcpRecvWinSize
const TUint KSoTcpRecvWinSize
The maximum number of bytes that can be buffered for receiving.
If this option is set when the connection state is not closed,
thenKErrLocked
is returned.
The default value is 8192.
TInt
KSoTcpSendWinSize
const TUint KSoTcpSendWinSize
The maximum number of bytes that can be queued for sending.
If this option is set when the connection state is not closed,
thenKErrLocked
is returned.
The default value is 8192.
TInt
The following options can only be used
withRSocket::GetOpt()
,
notRSocket::SetOpt()
.
KSoTcpListening
const TUint KSoTcpListening
The socket has been set to listen
(throughRSocket::Listen()
).
TInt
0. Not listening 1. Listening
KSoTcpNumSockets
const TUint KSoTcpNumSockets
The number of current TCP sockets.
TInt
KSoTcpPeekUrgentData
const TUint KSoTcpPeekUrgentData
Peeks for urgent data. The behaviour is the same
asKSoTcpReadUrgentData
, but the urgent data is not removed.
TInt
KSoTcpRcvAtMark
const TUint KSoTcpRcvAtMark
True if the data stream has been read up to the point where urgent data is available, otherwise false.
TInt
KSoTcpReadBytesPending
const TUint KSoTcpReadBytesPending
The number of bytes currently available for reading (the same value as is
obtained using KSOReadBytesPending
).
TInt
KSoTcpReadUrgentData
const TUint KSoTcpSendBytesPending
Read out-of-band urgent data.
KErrNotFound
is returned if there is no data waiting and no
urgent data pointer has been received.
KErrWouldBlock
is returned if and urgent is available but
data needs to be read from the current stream to match the urgent data
mark.
TInt
KSoTcpSendBytesPending
const TUint KSoTcpSendBytesPending
The number of bytes currently queued for sending.
TInt