Location:
in_sock.h
const TInt KInetAddrShiftA;
Number of bits to right-shift a Class A address to obtain the network number.
const TInt KInetAddrShiftB;
Number of bits to right-shift a Class B address to obtain the network number.
const TInt KInetAddrShiftC;
Number of bits to right-shift a Class C address to obtain the network number.
const TUint KSoInetIfQueryByDstAddr;
Get information for the interface specified by the destination address (iDstAddr) field of the passed packaged TSoInetIfQuery
.
This allows the caller to find out what interface would be used (without invoking a dial-up process) for the specified destination. A path for this destination is open, if GetOpt() returns KErrNone, iSrcAddr is not KAFUnspec, and iIsUp == 1.
const TUint KSoInetIfQueryBySrcAddr;
Get information for the interface specified by the source address (iSrcAddr) field of the passed packaged TSoInetIfQuery
.
If there are multiple interfaces with the same source address, then the first matching interface is returned.
Note: The information return phase will overwrite the iSrcAddr based on whatever happens to be in iDstAddr. It is not necessary to initialize iDstAddr, if application is not interested in resulting iSrcAddr.
const TUint KSoInetIfQueryByIndex;
Get information for the interface specified by the Interface Index (iIndex) field of the passed packaged TSoInetIfQuery
.
const TUint KSoInetIfQueryByName;
Get information for the interface specified by the Interface Name (iName) field of the passed packaged TSoInetIfQuery
.
const TInt KSoInetEnumInterfaces;
Begin enumeration of network interfaces.
This option should be set before enumerating interfaces with KSoInetNextInterface
.
This option is for use with RSocket::SetOpt()
only.
const TInt KSoInetNextInterface;
Return details of the next interface in an enumeration started by setting the option KSoInetEnumInterfaces
.
This option is for use with RSocket::GetOpt()
only.
Option data type is TSoInetInterfaceInfo
.
Note: If the interface has multiple addresses, then each address is returned as a separate instance of TSoInetInterfaceInfo
(only address information is different each time).
Note: If the interface has no addresses, then one entry with unspecified address is returned.
const TInt KSoInetConfigInterface;
Configures the interface.
This option is for use with RSocket::SetOpt()
only.
Option data type is TSoInet6InterfaceInfo
.
The interface is specified by setting the TSoInetInterfaceInfo::iName
,
const TUint KSoInetDeleteInterface;
Deletes the interface.
This option is for use with RSocket::SetOpt()
only.
Option data type is TSoInet6InterfaceInfo
.
The interface is specified by setting the TSoInetInterfaceInfo::iName
,
const TUint KSoInetChangeInterface;
Configure the interface details, if it exists.
Option data type is TSoInet6InterfaceInfo
.
The interface is specified by setting the TSoInetInterfaceInfo::iName
,
Note: Unlike KSoInetConfigInterface, never creates a new interface entry, if one does not already exist. KSoInetConfigInterface never fails with interface not found, as it always finds or creates one.
const TUint KSoInetResetInterface;
Resets interface to initial state.
Delete all configuration (routes and addresses) from the interface. Any sockets (flows) currently using this interface, are
set to holding state (KSoNoInterfaceError
is not required).
The interface reconfigures, if the NIF driver calls CProtocolBase::StartSending(), or if KSoInetStartInterface
socket option is used.
Option data type is TSoInet6InterfaceInfo
.
The interface is specified by setting the TSoInetInterfaceInfo::iName
, No other fields are used.
const TUint KSoInetStartInterface;
Restart interface, auto-reconfigure.
Option data type is TSoInet6InterfaceInfo
.
The interface is specified by setting the TSoInetInterfaceInfo::iName
, No other fields are used. The selected interface is autoconfigured using the information supplied by the attached network
driver.
Should normally only be called after KSoInetResetInterface
.
const TInt KSoInetEnumRoutes;
Begin enumeration of routes.
This option can only be used with RSocket::SetOpt()
.
This option should be set before enumerating routes with KSoInetNextRoute
.
const TInt KSoInetNextRoute;
Return the next route in an enumeration started by setting the option KSoInetEnumRoutes
.
Option data type is TSoInetRouteInfo
.
This option can only be used with RSocket::GetOpt()
.
const TInt KSoInetAddRoute;
Adds the specified route to the routing table.
Option data type is TSoInetRouteInfo
. The interface is defined by the TSoInetRouteInfo::iIfAddr
and must exist.
This option can only be used with RSocket::SetOpt()
.
const TInt KSoInetDeleteRoute;
Deletes the specified route from the routing table.
The route is identified by destination, netmask and gateway, These must exactly match the old route to be deleted.
Option data type is TSoInetRouteInfo
. The interface is defined by the TSoInetRouteInfo::iIfAddr
and must exist.
This option can only be used with RSocket::SetOpt()
.
const TInt KSoInetChangeRoute;
Modifies the specified route in the routing table.
The destination, netmask and gateway settings must be the same in the new route as in the old.
Option data type is TSoInetRouteInfo
. The interface is defined by the TSoInetRouteInfo::iIfAddr
and must exist.
This option can only be used with RSocket::SetOpt()
.
const TUint KAfInet;
Identifies the TCP/IP protocol family and v4 address family.
const TInt KIp6AddrScopeNetwork;
Network scope level (non-standard value, used internally)
const TUint KIpDontFragment;
Don't fragment the packet.
If the packet would require fragmentation due to a small maximum transmission unit size (MTU), the packet is dropped and an ICMP error message is generated: for ICMPv4 type=3 and code=4 (#KInet4ICMP_Unreachable); and for ICMPv6 type=2 and code=0 (#KInet6ICMP_PacketTooBig).
Application must enable KSoInetLastError
to detect this situation.
const TUint KIpHeaderIncluded;
Packet includes IP or IPv6 header.
When reading, the returned buffer starts with the received IP header, which can be either IPv6 (TInet6HeaderIP4) or IPv4 (TInet6HeaderIP).
When writing buffers, the buffer must start with the IP header and it must be complete. The stack does not provide any defaults.
const TUint KIpDontRoute;
Don't route the packet.
Not supported in Symbian 7.0 and 7.0s.
const TUint KIoctlTcpNotifyDataSent;
Complete the ioctl request when the data has been sent.
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, then KErrLocked is returned.
Option data type is TInt.
The default value is 8192.
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, then KErrLocked is returned.
Option data type is TInt.
The default value is 8192.
const TUint KSoTcpMaxSegSize;
The maximum TCP segment size (bytes).
If this option is set when the connection state is not closed, then KErrLocked is returned.
Option data type is TInt.
The default value is 1460.
const TUint KSoTcpNoDelay;
Send data at once if there is an established connection, without waiting for the maximum segment size to be reached.
The default is disabled.
Option data type is TInt.
Values are: 0 = Disable, 1 = Enable.
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.
The default is disabled.
Option data type is TInt.
Values are: 0 = Disable, 1 = Enable.
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.
The default is disabled.
Option data type is TInt.
Values are: 0 = Disable, 1 = Enable.
const TUint KSoTcpSendBytesPending;
The number of bytes currently queued for sending.
Option data type is TInt.
This option can only be used with RSocket::GetOpt()
, not RSocket::SetOpt()
.
const TUint KSoTcpReadBytesPending;
The number of bytes currently available for reading (the same value as is obtained using KSOReadBytesPending).
Option data type is TInt.
This option can only be used with RSocket::GetOpt()
, not RSocket::SetOpt()
.
const TUint KSoTcpListening;
The socket has been set to listen (through RSocket::Listen()
).
Option data type is TInt.
Values are: 0. Not listening, 1. Listening
This option can only be used with RSocket::GetOpt()
, not RSocket::SetOpt()
.
const TUint KSoTcpNumSockets;
The number of current TCP sockets.
Option data type is TInt.
This option can only be used with RSocket::GetOpt()
, not RSocket::SetOpt()
.
const TUint KSoTcpReadUrgentData;
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.
Option data type is TInt.
This option can only be used with RSocket::GetOpt()
, not RSocket::SetOpt()
.
const TUint KSoTcpPeekUrgentData;
Peeks for urgent data. The behaviour is the same as KSoTcpReadUrgentData, but the urgent data is not removed.
Option data type is TInt.
This option can only be used with RSocket::GetOpt()
, not RSocket::SetOpt()
.
const TUint KSoTcpRcvAtMark;
True if the data stream has been read up to the point where urgent data is available, otherwise false.
Option data type is TInt.
This option can only be used with RSocket::GetOpt()
, not RSocket::SetOpt()
.
const TUint KSoTcpNextSendUrgentData;
The next send operation will mark the last byte sent as urgent data.
The default is disabled.
Option data type is TInt.
Values are: 0 = Disable, 1 = Enable.
const TUint KSoTcpOobInline;
Receive out-of-band data in the normal data stream.
The default is disabled.
Option data type is TInt.
Values are: 0 = Disable, 1 = Enable.
const TUint KSoIpOptions;
Data to place in IP Options field of sent datagrams.
Not supported.
const TUint KSoRawMode;
Include IP header in data returned to client.
IPv4 packets are returned as is with all headers in network byte order (until v7.0, this returned IPv4 headers in host order). See TInet6HeaderIP4 and TInet6HeaderIP for the header layout.
The default is disabled.
Option data type is TInt. Values are: 0 = Disable, 1 = Enable.
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.
Option data type is TInt. Values are: 0. Disable; 1. Enable
The default is disabled.
const TUint KSoIpTOS;
Type of Service field of outgoing datagrams.
For IPv6, there is no Type of Service field, so this option sets the Traffic Class.
Option data type is TInt. Values are 0-255. Because Explicit Congestion Notification [RFC3168] uses bits 6 & 7 in the IP field, modifying the two least significant bits is not allowed with TCP. SetOpt processing silently ignores any modifications on these bits when using TCP socket.
The default value is 0.
const TUint KSoIpTTL;
Time
to Live field of outgoing datagrams.
This is same as KSoIp6UnicastHops
.
Option data type is TInt. Values are [-1,,255]. The -1 resets to the configured default value.
There are separate configured default values for the link local and other destinations. Both defaults can be configured by
the TCPIP.INI parameters maxttl
and linklocalttl
, The compiled defaults are #KTcpipIni_Maxttl and #KTcpipIni_LinkLocalttl.
Note: For the TTL of multicast destinations,
const TUint KSoReuseAddr;
Allow a socket to be bound to an local address that is already in use.
Option data type is TInt. Values are: 0 = Disable, 1 = Enable.
The default is disabled.
const TUint KSoNoInterfaceError;
Do not set socket into error state if currently connected interface reports an error.
For example, this could be enabled for a unconnected datagram socket. Unconnected datagram sockets are connected to the interface of the last sent packet. If multiple interfaces are present, erroring the socket might not be the desired action if just one interface gives an error.
Another use case would be a connected socket (TCP), which does not get error even if interface goes down, and comes up with the same source address after a while.
Option data type is TInt. Values are: 0 = Disable, 1 = Enable.
The default can be changed by the TCPIP.INI parameter noiferror
, and the compiled default is #KTcpipIni_Noiferror..
const TUint KSoUserSocket;
Modify socket visibility.
Background internet services that have sockets open count as active user and prevents the TCPIP from shutting down. By this socket option, such a process can make selected sockets to be excluded from the count.
Option data type is TInt. By setting the value to 0, the socket is not counted as active user. The value 1 makes it visible again.
The option has no effect if the visibility state already matches the parameter.
By default, all sockets are initially visible.
Note: This option should only be used by background daemons which are started by the TCPIP stack.
const TUint KSoInterfaceIndex;
Set or get interface index of the socket.
Gets the current interface index of the socket. Returns the value used in the last set.
If interface index has not been set by this option, then value is determined as follows:
the interface index of the interface which got the last packet from this socket.
zero, if no packets have been sent or interface cannot be determined.
Option data type is TUint32.
const TUint KSoKeepInterfaceUp;
Controls whether the interface flow counter is affected by this socket.
This counter is used in determining when the interface can be brought down.
Option data type is TInt. Values are: 0=Don't count, 1= count flow against interface flow count.
The default can be changed by the TCPIP.INI parameter keepinterfaceup
, and the compiled default is #KTcpipIni_KeepInterfaceUp.
const TUint KSoNoSourceAddressSelect;
Enable use of 0 as a source address.
When socket is bound to unspecified address (0), the stack will automaticly select the source address for the outgoing packets. When this option is set after bind , the stack will not select a new address.
const TUint KSoInetLastError;
Retrieve last error information.
This option is for use with GetOpt() only.
Option data type is TSoInetLastErr
.
const TUint KIoctlInetLastError;
An Ioctl corresponding to the socket option KSoInetLastError.
const TUint KSoIp6UnicastHops;
Hop limit for outgoing datagrams: same as KSoIpTTL
.
Option data type is TInt. Values are [-1,,255]. The -1 resets to the configured default value.
Note: KSoIp6UnicastHops can be used to detect dual IPv4/IPv6 stack from from the old TCPIP only-IPv4 stack. This option is only implemented in the dual stack.
const TUint KSoIp6MulticastHops;
Hop limit for multicast packets.
Option data type is TInt. Values are [-1..255]. The -1 resets to the configured default value.
The default is 1.
const TUint KSoIp6MulticastLoop;
Enable/disable loopback of the multicast packets.
When enabled, multicast packets sent to this socket are internally looped back (in addition to sending them onto the interface). Another or same application listening the group and port, receives copies of the transmitted packets.
When disabled, an application on this host listening the same group and port, does not receive multicast packets originating from this socket (unless the interface or link echoes them back to the TCP/IP stack).
Option data type is TInt. Values are 1=enable; 0=disable. The default is 1.
const TUint KSoUdpReceiveICMPError;
Inform client of error if ICMP error packets received.
The default is disabled.
Option data type is TInt. Values are: 0 = Disable, 1 = Enable.
const TUint KSoUdpAddressSet;
Modifies address flag of UDP. Flag is used to control whether the socket is bound to IP address or not. Binding to specific address and then clearing this flag makes possible to receive packets sent to broadcast address but still to have a specific bound address for outgoing packets.
const TUint KSoUdpSynchronousSend;
Setting this option causes the UDP send operation to block when dynamic interface setup is in progress, or when local flow control within the stack would otherwise cause the packet to be dropped.
const TUint KSoFlowClosing;
Internal flow option called when the flow is about to be closed.
This option is only for the outbound flow hooks, which are attached to the TCIP/IP stack. The stack generates a call, just before the flow context associated with service access point (SAP) provider is about to be closed. If a hook has stored some socket specific state information into the flow context, then this option event may be of some use to it.
const TInt KInet6AddrMaxBits;
Maximum IPv6 address length (bits).