Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: in_sock.h

TCP/IP constants

Support

Supported from 5.0


Protocol identifiers

Description

This section lists constants that identify TCP/IP protocols. They are defined in in_sock.h.


KAfInet

const TUint KAfInet

Description

Identifies the TCP/IP protocol family


KProtocolInetIcmp

const TUint KProtocolInetIcmp

Description

Identifies the ICMP protocol


KProtocolInetTcp

const TUint KProtocolInetTcp

Description

Identifies the TCP protocol


KProtocolInetUdp

const TUint KProtocolInetUdp

Description

Identifies the UDP protocol


KProtocolInetIp

const TUint KProtocolInetIp

Description

Identifies the IP protocol

[Top]


GetOpt and SetOpt values

Description

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:

See also:


UDP and TCP options

Description

This section describes the options that can be used both with TCP and UDP sockets.

DNS cache options

Description

These values concern DNS cache options. Set anOptionLevel to KSolInetDnsCtrl. They are defined in in_sock.h.

KSoDnsCacheEnable


const TUint KSoDnsCacheEnable

Description

Enable DNS cache flag.

Default is enabled.

TInt

0. Disable 1. Enable

KSoDnsCacheFlush


const TUint KSoDnsCacheFlush

Description

Flush DNS cache

SetOpt() only.

Not required

IP options

Description

These values concern IP options. Set anOptionLevel toKSolInetIp. They are defined in in_sock.h.

KSoIpTOS


const TUint KSoIpTOS

Description

Type of Service field of outgoing datagrams.

The default value is 0.

TInt

0-63

KSoIpTTL


const TUint KSoIpTTL

Description

Time to Live field of outgoing datagrams.

The default value is 255.

TInt

1-255

KSoNoInterfaceError


const TUint KSoNoInterfaceError

Description

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

Description

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

Description

Retrieve last error information.

GetOpt() only.

TPckgBuf< TSoInetLastErr >

Network interface driver options

Description

These values concern network interface driver options. SetanOptionLevel to KSOLInterface. They are defined in in_iface.h.

KSoIfInfo


const TUint KSoIfInfo

Description

The current network interface driver operation parameters are written to the passed TSoIfInfo structure.

TPckgBuf< TSoIfInfo >

KSoIfHardwareAddr


const TUint KSoIfHardwareAddr

Description

For future use.

KSoIfConfig


const TUint KSoIfConfig

Description

The current network interface driver configuration options are written to the passed TSoInetIfConfig structure.

TPckgBuf< TSoInetIfConfig >

KSoIfCompareAddr


const TUint KSoIfCompareAddr

Description

Compares the passed address with the current local address, and returnsKErrBadName if not equal.

TPckgBuf< TInetAddr >

Network interface options

Description

These values concern network interface options. SetanOptionLevel to KSolInetIfCtrl. They are defined in in_sock.h.

KSoInetEnumInterfaces


const TUint KSoInetEnumInterfaces

Description

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

Description

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

Description

Return details of the next interface in an enumeration started by setting the option KSoInetEnumInterfaces.

GetOpt() only.

TPckgBuf< TSoInetInterfaceInfo >

Network interface start-up and shutdown

Description

These constants concern network interface start-up and shutdown. SetanOptionLevel to KNifOptLevel. They are defined in nifman.h.

KNifOptStartInterface


const TUint KNifOptStartInterface

Description

Start the named network interface.

SetOpt() only.

TPtrC

KNifOptStopInterface


const TUint KNifOptStopInterface

Description

Stop the named network interface.

SetOpt() only.

TPtrC

KNifOptInterfaceProgress


const TUint KNifOptInterfaceProgress

Description

Returns interface progress information.

GetOpt() only.

TNifProgressBuf

Routing options

Description

These values concern IP routing options. SetanOptionLeveltoKSolInetRtCtrl. They are defined in in_sock.h.

The following options can only be usedRSocket::SetOpt().

KSoInetEnumRoutes


const TUint KSoInetEnumRoutes

Description

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

Description

Adds the specified route to the routing table.

TPckgBuf< TSoInetRouteInfo >

KSoInetDeleteRoute


const TUint KSoInetDeleteRoute

Description

Deletes the specified route from the routing table.

TPckgBuf< TSoInetRouteInfo >

KSoInetChangeRoute


const TUint KSoInetChangeRoute

Description

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

Description

Find a cached route to a specified destination.

The caller should pass a packaged TSoInetCachedRouteInfowith its iDstAddr member set to the required address.

TPckgBuf< TSoInetCachedRouteInfo >

KSoInetNextRoute


const TUint KSoInetNextRoute

Description

Return the next route in an enumeration started by setting the optionKSoInetEnumRoutes.

TPckgBuf< TSoInetRouteInfo >


UDP only options

Description

This section describes the options that can only be used with UDP sockets.

UDP general options

Description

Set anOptionLevel to KSolInetUdp. It is defined in in_sock.h.

KSoUdpReceiveICMPError


const TUint KSoUdpReceiveICMPError

Description

Inform client of error if ICMP error packets received.

Default is enabled.

TInt

0. Disable 1. Enable

IP datagram options

Description

These values concern IP datagram options. SetanOptionLeveltoKSolInetIp. They are defined in in_sock.h.

KSoIpOptions


const TUint KSoIpOptions

Description

Data to place in IP Options field of sent datagrams.

TBuf8< TInt >

The maximum length is 40 bytes.

KSoRawMode


const TUint KSoRawMode

Description

Include IP header in data returned to client.

Default is disabled.

TInt

0. Disable 1. Enable

KSoHeaderIncluded


const TUint KSoHeaderIncluded

Description

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

[Top]


TCP only options

Description

This section describes the options that can only be used with TCP sockets. Set anOptionLevel to KSolInetTcp. They are defined in in_sock.h.

[Top]


TCP only options

Description

This section describes the options that can only be used with TCP sockets. Set anOptionLevel to KSolInetTcp. They are defined in in_sock.h.


Gettable and settable options

KSoTcpAsync2MslWait


const TUint KSoTcpAsync2MslWait

Description

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

Description

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

Description

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

Description

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

Description

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

Description

Receive out-of-band data in the normal data stream.

Default is disabled.

TInt

0. Disable 1. Enable

KSoTcpRecvWinSize


const TUint KSoTcpRecvWinSize

Description

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

Description

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


GetOpt only options

Description

The following options can only be used withRSocket::GetOpt(), notRSocket::SetOpt().

KSoTcpListening


const TUint KSoTcpListening

Description

The socket has been set to listen (throughRSocket::Listen()).

TInt

0. Not listening 1. Listening

KSoTcpNumSockets


const TUint KSoTcpNumSockets

Description

The number of current TCP sockets.

TInt

KSoTcpPeekUrgentData


const TUint KSoTcpPeekUrgentData

Description

Peeks for urgent data. The behaviour is the same asKSoTcpReadUrgentData, but the urgent data is not removed.

TInt

KSoTcpRcvAtMark


const TUint KSoTcpRcvAtMark

Description

True if the data stream has been read up to the point where urgent data is available, otherwise false.

TInt

KSoTcpReadBytesPending


const TUint KSoTcpReadBytesPending

Description

The number of bytes currently available for reading (the same value as is obtained using KSOReadBytesPending).

TInt

KSoTcpReadUrgentData


const TUint KSoTcpSendBytesPending

Description

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

Description

The number of bytes currently queued for sending.

TInt