Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
in_sock.h File Reference
#include <es_sock.h>
#include <in_sock_internal.h>

Go to the source code of this file.

Classes

struct  SInetAddr
 IPv4 socket address. More...
 
class  TIp6Addr
 The 128 bits of IPv6 or IPv4 address stored in network byte order. More...
 
struct  SInet6Addr
 IPv4 and IPv6 socket address. More...
 
class  TInetAddr
 This class specialises the generic socket server address class TSockAddr for the TCP/IP protocol family. More...
 
class  TSoInetInterfaceInfo
 Used when listing interfaces with socket option. More...
 
class  TSoInet6InterfaceInfo
 Extension for TSoInetInterfaceInfo. More...
 
class  TSoInetIfQuery
 Interface query. More...
 
class  TLinkAddr
 
class  TSoInetRouteInfo
 Route information structure. More...
 
class  TSoInetCachedRouteInfo
 Access to route cache TPckgBuf<TSoInetCachedRouteInfo>, set iDstAddr for required address With a level of KSolInetRtCtrl. More...
 
class  TSoInetLastErr
 Error information for TCP/IP protocols. More...
 
class  TIp6Mreq
 TIp6Mreq. More...
 

Variables

TCP/IP Protocol and address family

The TCP/IP stack supports two different address formats in the TInetAddr: KAfInet for plain IPv4 addresses (for backward compatibility), and KAfInet6 for both IPv6 and IPv4 addresses.

Only the KAfInet is used as a protocol family constant for the TCP/IP protocol family, when sockets are opened (RSocket::Open() and RHostResolver::Open() ).

KAfInet6 is only address family, and can only appear as a family constant in TSockAddr class.

Since
7.0
const TUint KAfInet = 0x0800
 Identifies the TCP/IP protocol family and v4 address family.
 
const TUint KAfInet6 = 0x0806
 Identifies the TCP/IP v6 address family.
 
IP protocol IDs
const TUint KProtocolInetIcmp = 1
 Identifies the ICMP protocol.
 
const TUint KProtocolInetTcp = 6
 Identifies the TCP protocol.
 
const TUint KProtocolInetUdp = 17
 Identifies the UDP protocol.
 
const TUint KProtocolInet6Ipip = 41
 IPv6 inside IP (v4 or v6).
 
const TUint KProtocolInet6Icmp = 58
 Identifies the ICMPv6 protocol.
 
Internal Protocol IDs

Internal protocol id's do not appear in real packets.

An internal id only identifies a protocol instance.

const TUint KProtocolInetIp = 0x100
 Identifies the IP (v4) protocol module.
 
const TUint KProtocolInet6Ip = 0xF00
 Identifies the IP (v6) protocol module.
 
const TUint KProtocolUnknown = 0xdead
 Unknown Protocol ID.
 
Socket option/ioctl levels
const TUint KSolInetIcmp = 0x101
 ICMP socket option level (no options).
 
const TUint KSolInetTcp = 0x106
 TCP socket options level.
 
const TUint KSolInetUdp = 0x111
 UDP socket options level.
 
const TUint KSolInetIp = 0x100
 IP socket options level.
 
const TUint KSolInetIfCtrl = 0x201
 Interface control socket options level.
 
const TUint KSolInetRtCtrl = 0x202
 Route control socket options level.
 
const TUint KSolInetDnsCtrl = 0x204
 DNS control socket options level.
 
const TUint KSolInetIfQuery = 0x206
 Interface query socket options level.
 
const TInt KInetAddrMaxBits = 32
 Maximum IPv4 address length (bits).
 
const TInt KInet6AddrMaxBits = 128
 Maximum IPv6 address length (bits).
 
Port constants
const TUint KInetPortAny = 0x0000
 Any port flag (0).
 
const TUint KInetPortNone = 0x0000
 No port flag (0).
 
const TUint KInetMinAutoPort = 32768
 Minimum value of an automatically allocated port.
 
const TUint KInetMaxAutoPort = 60999
 Maximum value of an automatically allocated port.
 
IPv6 address constants..
Since
7.0
const TInt KIp6AddrScopeNodeLocal = 0x01
 Node-local scope level (RFC-2373 2.7).
 
const TInt KIp6AddrScopeLinkLocal = 0x02
 Link-local scope level (RFC-2373 2.7).
 
const TInt KIp6AddrScopeSiteLocal = 0x05
 Site-local scope level (RFC-2373 2.7).
 
const TInt KIp6AddrScopeOrganization = 0x08
 Organisation-local scope level (RFC-2373 2.7).
 
const TInt KIp6AddrScopeGlobal = 0x0E
 Global scope level (RFC-2373 2.7).
 
const TInt KIp6AddrScopeNetwork = 0x10
 Network scope level (non-standard value, used internally)
 
const TIp6Addr KInet6AddrNone = {{{0}}}
 No address (all 0s).
 
const TIp6Addr KInet6AddrLoop = {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}}
 Loopback address (::1).
 
const TIp6Addr KInet6AddrLinkLocal = {{{0xfe, 0x80, }}}
 Link-local address (prefix fe80::).
 
Send/Recv flags (datagram sockets only)
const TUint KIpDontFragment = 0x010000
 Don't fragment the packet.
 
const TUint KIpHeaderIncluded = 0x020000
 Packet includes IP or IPv6 header.
 
const TUint KIpDontRoute = 0x040000
 Don't route the packet.
 
TCP socket options

Level: KSolInetTcp

const TUint KIoctlTcpNotifyDataSent = 0x300
 Complete the ioctl request when the data has been sent.
 
const TUint KSoTcpSendWinSize = 0x301
 The maximum number of bytes that can be queued for sending.
 
const TUint KSoTcpRecvWinSize = 0x302
 The maximum number of bytes that can be buffered for receiving.
 
const TUint KSoTcpMaxSegSize = 0x303
 The maximum TCP segment size (bytes).
 
const TUint KSoTcpNoDelay = 0x304
 Send data at once if there is an established connection, without waiting for the maximum segment size to be reached.
 
const TUint KSoTcpKeepAlive = 0x305
 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.
 
const TUint KSoTcpAsync2MslWait = 0x306
 If address reuse is allowed, and a connection already exists between the requested local and remote addresses, wait for the address to become available.
 
const TUint KSoTcpSendBytesPending = 0x307
 The number of bytes currently queued for sending.
 
const TUint KSoTcpReadBytesPending = 0x308
 The number of bytes currently available for reading (the same value as is obtained using KSOReadBytesPending).
 
const TUint KSoTcpListening = 0x309
 The socket has been set to listen (through RSocket::Listen()).
 
const TUint KSoTcpNumSockets = 0x310
 The number of current TCP sockets.
 
const TUint KSoTcpReadUrgentData = 0x311
 Read out-of-band urgent data.
 
const TUint KSoTcpPeekUrgentData = 0x312
 Peeks for urgent data.
 
const TUint KSoTcpRcvAtMark = 0x313
 True if the data stream has been read up to the point where urgent data is available, otherwise false.
 
const TUint KSoTcpNextSendUrgentData = 0x314
 The next send operation will mark the last byte sent as urgent data.
 
const TUint KSoTcpOobInline = 0x315
 Receive out-of-band data in the normal data stream.
 
const TUint KSOTcpDebugMode = 0x11110000
 Not supported.
 
IPv6 and IPv4 socket options

Level: KSolInetIp

const TUint KSoIpOptions = 0x401
 Data to place in IP Options field of sent datagrams.
 
const TUint KSoRawMode = 0x402
 Include IP header in data returned to client.
 
const TUint KSoHeaderIncluded = 0x403
 Assume that the IP header is included in all data written by the client.
 
const TUint KSoIpTOS = 0x404
 Type of Service field of outgoing datagrams.
 
const TUint KSoIpTTL = 0x405
 Time to Live field of outgoing datagrams.
 
const TUint KSoReuseAddr = 0x406
 Allow a socket to be bound to an local address that is already in use.
 
const TUint KSoNoInterfaceError = 0x407
 Do not set socket into error state if currently connected interface reports an error.
 
const TUint KSoUserSocket = 0x408
 Modify socket visibility.
 
const TUint KSoInterfaceIndex = 0x409
 Set or get interface index of the socket.
 
const TUint KSoKeepInterfaceUp = 0x40a
 Controls whether the interface flow counter is affected by this socket.
 
const TUint KSoNoSourceAddressSelect = 0x40b
 Enable use of 0 as a source address.
 
const TUint KSoInetLastError = 0x200
 Retrieve last error information.
 
const TUint KIoctlInetLastError = 0x200
 An Ioctl corresponding to the socket option KSoInetLastError.
 
const TUint KSoIp6UnicastHops = 0x465
 Hop limit for outgoing datagrams: same as KSoIpTTL.
 
const TUint KSoIp6MulticastIf = 0x46a
 Interface for outgoing multicast packets.
 
const TUint KSoIp6MulticastHops = 0x46b
 Hop limit for multicast packets.
 
const TUint KSoIp6MulticastLoop = 0x46c
 Enable/disable loopback of the multicast packets.
 
const TUint KSoIp6JoinGroup = 0x46d
 Join multicast group.
 
const TUint KSoIp6LeaveGroup = 0x46e
 Leave multicast group.
 
const TUint KSoIp6InterfaceUnicastHops = 0x46f
 Hop limit for outgoing datagrams: similar to KSoIp6UnicastHops except any socket option to override the current setting is ignored.
 
UDP options

Level: KSolInetUdp

const TUint KSoUdpReceiveICMPError = 0x500
 Inform client of error if ICMP error packets received.
 
const TUint KSoUdpAddressSet = 0x502
 Modifies address flag of UDP.
 
const TUint KSoUdpSynchronousSend = 0x560
 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.
 
TCP/IP specific Socket provider options

Level: #KSOLProvider

const TUint KSoFlowClosing = 0x600 | KSocketInternalOptionBit
 Internal flow option called when the flow is about to be closed.
 
Extended error codes
const TInt KErrNetUnreach = -190
 Network could not be reached.
 
const TInt KErrHostUnreach = -191
 Host could not be reached.
 
const TInt KErrNoProtocolOpt = -192
 Protocol could not be reached.
 
const TInt KErrUrgentData = -193
 Urgent data error.
 

IPv4 address constants and definitions

#define INET_ADDR(a, b, c, d)   (TUint32)((((TUint32)(a))<<24)|((b)<<16)|((c)<<8)|(d))
 Forms a 32-bit integer IPv4 address from the normal dotted-decimal representation.
 
enum  TInetAddrClass {
  EInetClassUnknown = 0 , EInetClassA , EInetClassB , EInetClassC ,
  EInetClassD , EInetClassE , EInetMulticast = EInetClassD , EInetExperimental = EInetClassE
}
 
const TUint32 KInetAddrAny = INET_ADDR(0,0,0,0)
 Any address flag (0.0.0.0).
 
const TUint32 KInetAddrNone = INET_ADDR(0,0,0,0)
 No address flag (0.0.0.0).
 
const TUint32 KInetAddrAll = INET_ADDR(255,255,255,255)
 All addresses mask (255.255.255.255).
 
const TUint32 KInetAddrBroadcast = INET_ADDR(255,255,255,255)
 Broadcast address (255.255.255.255).
 
const TUint32 KInetAddrLoop = INET_ADDR(127,0,0,1)
 Loopback address (127.0.0.1).
 
const TUint32 KInetAddrGroupUnspec = INET_ADDR(224,0,0,0)
 Group address range start.
 
const TUint32 KInetAddrGroupAllHosts = INET_ADDR(224,0,0,1)
 All hosts address (224.0.0.1).
 
const TUint32 KInetAddrLinkLocalNet = INET_ADDR(169,254,0,0)
 Link-local net number.
 
const TUint32 KInetAddrLinkLocalNetMask = INET_ADDR(255,255,0,0)
 Link-local net mask.
 
const TUint32 KInetAddrMaskAll = INET_ADDR(0,0,0,0)
 All addresses mask (0.0.0.0).
 
const TUint32 KInetAddrMaskHost = INET_ADDR(255,255,255,255)
 All bits mask (255.255.255.255).
 
const TUint32 KInetAddrNetMaskA = INET_ADDR(255,0,0,0)
 Class A net mask (255.0.0.0).
 
const TUint32 KInetAddrHostMaskA = ~KInetAddrNetMaskA
 Class A host mask (0.255.255.255).
 
const TInt KInetAddrShiftA = 24
 Number of bits to right-shift a Class A address to obtain the network number.
 
const TUint32 KInetAddrNetMaskB = INET_ADDR(255,255,0,0)
 Class B net mask (255.255.0.0).
 
const TUint32 KInetAddrHostMaskB = ~KInetAddrNetMaskB
 Class B host mask (0.0.255.255).
 
const TInt KInetAddrShiftB = 16
 Number of bits to right-shift a Class B address to obtain the network number.
 
const TUint32 KInetAddrNetMaskC = INET_ADDR(255,255,255,0)
 Class C net mask (255.255.255.0).
 
const TUint32 KInetAddrHostMaskC = ~KInetAddrNetMaskC
 Class C host mask (0.0.0.255).
 
const TInt KInetAddrShiftC = 8
 Number of bits to right-shift a Class C address to obtain the network number.
 
const TUint32 KInetAddrIdMaskA = 0x80000000
 
const TUint32 KInetAddrIdValA = 0x00000000
 
const TUint32 KInetAddrIdMaskB = 0xc0000000
 
const TUint32 KInetAddrIdValB = 0x80000000
 
const TUint32 KInetAddrIdMaskC = 0xe0000000
 
const TUint32 KInetAddrIdValC = 0xc0000000
 
const TUint32 KInetAddrIdMaskD = 0xf0000000
 
const TUint32 KInetAddrIdValD = 0xe0000000
 
const TUint32 KInetAddrIdMaskE = 0xf8000000
 
const TUint32 KInetAddrIdValE = 0xf0000000
 

Interface control socket options

Level: KSolInetIfCtrl

Enumerating & Configuring Interfaces using TSoInetInterfaceInfo and TSoInet6InterfaceInfo.

enum  TIfStatus { EIfPending , EIfUp , EIfBusy , EIfDown }
 Describes the state of an interface. More...
 
const TInt KSoInetEnumInterfaces = 0x211
 Begin enumeration of network interfaces.
 
const TInt KSoInetNextInterface = 0x212
 Return details of the next interface in an enumeration started by setting the option KSoInetEnumInterfaces.
 
const TInt KSoInetConfigInterface = 0x213
 Configures the interface.
 
const TUint KSoInetDeleteInterface = 0x214
 Deletes the interface.
 
const TUint KSoInetChangeInterface = 0x215
 Configure the interface details, if it exists.
 
const TUint KSoInetResetInterface = 0x216
 Resets interface to initial state.
 
const TUint KSoInetStartInterface = 0x217
 Restart interface, auto-reconfigure.
 
const TUint KSoInetCreateIPv4LLOnInterface = 0x226
 Trigger link local creation.
 

Route control socket options

Level: KSolInetRtCtrl

Enumerating & Configuring Routes using TSoInetRouteInfo.

enum  TRouteState {
  ERtNone , ERtPending , ERtBusy , ERtReady ,
  ERtDown
}
 Identifies the state of a route held in an entry in the IP routing table. More...
 
enum  TRouteType { ERtNormal , ERtUser , ERtIcmpAdd , ERtIcmpDel }
 Identifies the type of creator of an entry in the IP routing table. More...
 
const TInt KSoInetEnumRoutes = 0x221
 Begin enumeration of routes.
 
const TInt KSoInetNextRoute = 0x222
 Return the next route in an enumeration started by setting the option KSoInetEnumRoutes.
 
const TInt KSoInetAddRoute = 0x223
 Adds the specified route to the routing table.
 
const TInt KSoInetDeleteRoute = 0x224
 Deletes the specified route from the routing table.
 
const TInt KSoInetChangeRoute = 0x225
 Modifies the specified route in the routing table.
 
const TInt KSoInetCachedRouteByDest = 0x225
 No longer supported.
 

DNS definitions

enum  TNameRecordFlags {
  EDnsAlias =0x00000001 , EDnsAuthoritive =0x00000002 , EDnsHostsFile =0x00000004 , EDnsServer =0x00000008 ,
  EDnsHostName =0x00000010 , EDnsCache =0x00000020 , EDnsNoRoute =0x00000040
}
 Flags returned from DNS records. More...
 
const TUint KSoDnsCacheEnable = 0x600
 No longer supported.
 
const TUint KSoDnsCacheFlush = 0x601
 No longer supported.
 

Interface query socket options

Level: KSolInetIfQuery

Querying information about interfaces using TSoInetIfQuery.

Since
7.0 (some additions in 7.0s)
typedef TUint32 TInetScopeIds[16]
 Scope Id vector (member of TSoInetIfQuery).
 
const TUint KSoInetIfQueryByDstAddr = 0x1
 Get information for the interface specified by the destination address (iDstAddr) field of the passed packaged TSoInetIfQuery.
 
const TUint KSoInetIfQueryBySrcAddr = 0x2
 Get information for the interface specified by the source address (iSrcAddr) field of the passed packaged TSoInetIfQuery.
 
const TUint KSoInetIfQueryByIndex = 0x3
 Get information for the interface specified by the Interface Index (iIndex) field of the passed packaged TSoInetIfQuery.
 
const TUint KSoInetIfQueryByName = 0x4
 Get information for the interface specified by the Interface Name (iName) field of the passed packaged TSoInetIfQuery.
 

Detailed Description

API status
Published to all clients. Released API.

Definition in file in_sock.h.

Macro Definition Documentation

◆ INET_ADDR

#define INET_ADDR (   a,
  b,
  c,
  d 
)    (TUint32)((((TUint32)(a))<<24)|((b)<<16)|((c)<<8)|(d))

Forms a 32-bit integer IPv4 address from the normal dotted-decimal representation.

The four arguments are the four parts of the IPv4 address.

Example:

TInetAddr addr;
const TUint32 KInetAddr = INET_ADDR(194, 129, 2, 54);
addr.SetAddress(KInetAddr);
This class specialises the generic socket server address class TSockAddr for the TCP/IP protocol fami...
Definition in_sock.h:447
IMPORT_C void SetAddress(TUint32 aAddr)
Sets the IPv4 address value.
#define INET_ADDR(a, b, c, d)
Forms a 32-bit integer IPv4 address from the normal dotted-decimal representation.
Definition in_sock.h:208

Definition at line 208 of file in_sock.h.

Typedef Documentation

◆ TInetScopeIds

typedef TUint32 TInetScopeIds[16]

Scope Id vector (member of TSoInetIfQuery).

Since
7.0s

Definition at line 1116 of file in_sock.h.

Enumeration Type Documentation

◆ TIfStatus

enum TIfStatus

Describes the state of an interface.

It is used as a data member of TSoInetInterfaceInfo.

Note
This enumeration is supported only because of backward compatibility. The real interface state uses the system error codes directly. The interface is either up (KErrNone) or down because of some error condition (state is one of the system wide error codes indicating the reason for the down state).
API status
Published to all clients. Released API.
Enumerator
EIfPending 

The interface has been initiated, but is not yet available.

EIfUp 

The interface is up and available.

EIfBusy 

The interface is up, but flowed off.

EIfDown 

The interface is down.

Definition at line 812 of file in_sock.h.

◆ TInetAddrClass

API status
Published to all clients. Released API.
Enumerator
EInetClassUnknown 
EInetClassA 
EInetClassB 
EInetClassC 
EInetClassD 
EInetClassE 
EInetMulticast 
EInetExperimental 

Definition at line 275 of file in_sock.h.

◆ TNameRecordFlags

Flags returned from DNS records.

Provides flag bitmasks that are used to describe properties of results of DNS queries via RHostResolver.

API status
Published to all clients. Released API.
Enumerator
EDnsAlias 

Name is an Alias.

EDnsAuthoritive 

Answer is authoritive.

EDnsHostsFile 

Answer is from hosts file.

EDnsServer 

Answer is from a DNS server.

EDnsHostName 

Answer is host name for this host.

EDnsCache 

Answer is from the resolver cache.

EDnsNoRoute 

Answer does not have a route set.

Definition at line 1511 of file in_sock.h.

◆ TRouteState

Identifies the state of a route held in an entry in the IP routing table.

It is used as a data member of TSoInetRouteInfo.

Note
This enumeration is present only because of backward compatibility. Only two values are used.
Since
7.0 (in this form)
API status
Published to all clients. Released API.
Enumerator
ERtNone 

Unused.

ERtPending 

Route is neighbour cache entry, ARP or Neighbor discovery is in progress.

ERtBusy 

Unused.

ERtReady 

The interface for the route is up and ready.

ERtDown 

Unused.

Definition at line 1351 of file in_sock.h.

◆ TRouteType

enum TRouteType

Identifies the type of creator of an entry in the IP routing table.

It is used as a data member of TSoInetRouteInfo.

Note
This enumeration is present only because of backward compatibility. Only two values are used.
Since
7.0 (in this form)
API status
Published to all clients. Released API.
Enumerator
ERtNormal 

Normal route entry.

ERtUser 

Unused.

ERtIcmpAdd 

Route is ARP or neighbor cache entry.

ERtIcmpDel 

Unused.

Definition at line 1381 of file in_sock.h.

Variable Documentation

◆ KAfInet

const TUint KAfInet = 0x0800

Identifies the TCP/IP protocol family and v4 address family.

See also
TInetAddr

Definition at line 59 of file in_sock.h.

◆ KAfInet6

const TUint KAfInet6 = 0x0806

Identifies the TCP/IP v6 address family.

See also
TInetAddr
Since
7.0

Definition at line 65 of file in_sock.h.

◆ KErrHostUnreach

const TInt KErrHostUnreach = -191

Host could not be reached.

Definition at line 2152 of file in_sock.h.

◆ KErrNetUnreach

const TInt KErrNetUnreach = -190

Network could not be reached.

Definition at line 2150 of file in_sock.h.

◆ KErrNoProtocolOpt

const TInt KErrNoProtocolOpt = -192

Protocol could not be reached.

Definition at line 2154 of file in_sock.h.

◆ KErrUrgentData

const TInt KErrUrgentData = -193

Urgent data error.

Definition at line 2156 of file in_sock.h.

◆ KInet6AddrLinkLocal

const TIp6Addr KInet6AddrLinkLocal = {{{0xfe, 0x80, }}}

Link-local address (prefix fe80::).

Definition at line 392 of file in_sock.h.

◆ KInet6AddrLoop

const TIp6Addr KInet6AddrLoop = {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}}

Loopback address (::1).

Definition at line 390 of file in_sock.h.

◆ KInet6AddrMaxBits

const TInt KInet6AddrMaxBits = 128

Maximum IPv6 address length (bits).

Definition at line 179 of file in_sock.h.

◆ KInet6AddrNone

const TIp6Addr KInet6AddrNone = {{{0}}}

No address (all 0s).

Definition at line 388 of file in_sock.h.

◆ KInetAddrAll

const TUint32 KInetAddrAll = INET_ADDR(255,255,255,255)

All addresses mask (255.255.255.255).

Definition at line 215 of file in_sock.h.

◆ KInetAddrAny

const TUint32 KInetAddrAny = INET_ADDR(0,0,0,0)

Any address flag (0.0.0.0).

Definition at line 211 of file in_sock.h.

◆ KInetAddrBroadcast

const TUint32 KInetAddrBroadcast = INET_ADDR(255,255,255,255)

Broadcast address (255.255.255.255).

Definition at line 217 of file in_sock.h.

◆ KInetAddrGroupAllHosts

const TUint32 KInetAddrGroupAllHosts = INET_ADDR(224,0,0,1)

All hosts address (224.0.0.1).

Definition at line 224 of file in_sock.h.

◆ KInetAddrGroupUnspec

const TUint32 KInetAddrGroupUnspec = INET_ADDR(224,0,0,0)

Group address range start.

Definition at line 222 of file in_sock.h.

◆ KInetAddrHostMaskA

const TUint32 KInetAddrHostMaskA = ~KInetAddrNetMaskA

Class A host mask (0.255.255.255).

Definition at line 238 of file in_sock.h.

◆ KInetAddrHostMaskB

const TUint32 KInetAddrHostMaskB = ~KInetAddrNetMaskB

Class B host mask (0.0.255.255).

Definition at line 244 of file in_sock.h.

◆ KInetAddrHostMaskC

const TUint32 KInetAddrHostMaskC = ~KInetAddrNetMaskC

Class C host mask (0.0.0.255).

Definition at line 250 of file in_sock.h.

◆ KInetAddrIdMaskA

const TUint32 KInetAddrIdMaskA = 0x80000000

Definition at line 255 of file in_sock.h.

◆ KInetAddrIdMaskB

const TUint32 KInetAddrIdMaskB = 0xc0000000

Definition at line 259 of file in_sock.h.

◆ KInetAddrIdMaskC

const TUint32 KInetAddrIdMaskC = 0xe0000000

Definition at line 263 of file in_sock.h.

◆ KInetAddrIdMaskD

const TUint32 KInetAddrIdMaskD = 0xf0000000

Definition at line 267 of file in_sock.h.

◆ KInetAddrIdMaskE

const TUint32 KInetAddrIdMaskE = 0xf8000000

Definition at line 271 of file in_sock.h.

◆ KInetAddrIdValA

const TUint32 KInetAddrIdValA = 0x00000000

Definition at line 257 of file in_sock.h.

◆ KInetAddrIdValB

const TUint32 KInetAddrIdValB = 0x80000000

Definition at line 261 of file in_sock.h.

◆ KInetAddrIdValC

const TUint32 KInetAddrIdValC = 0xc0000000

Definition at line 265 of file in_sock.h.

◆ KInetAddrIdValD

const TUint32 KInetAddrIdValD = 0xe0000000

Definition at line 269 of file in_sock.h.

◆ KInetAddrIdValE

const TUint32 KInetAddrIdValE = 0xf0000000

Definition at line 273 of file in_sock.h.

◆ KInetAddrLinkLocalNet

const TUint32 KInetAddrLinkLocalNet = INET_ADDR(169,254,0,0)

Link-local net number.

Since
7.0s

Definition at line 226 of file in_sock.h.

◆ KInetAddrLinkLocalNetMask

const TUint32 KInetAddrLinkLocalNetMask = INET_ADDR(255,255,0,0)

Link-local net mask.

Since
7.0s

Definition at line 228 of file in_sock.h.

◆ KInetAddrLoop

const TUint32 KInetAddrLoop = INET_ADDR(127,0,0,1)

Loopback address (127.0.0.1).

Definition at line 219 of file in_sock.h.

◆ KInetAddrMaskAll

const TUint32 KInetAddrMaskAll = INET_ADDR(0,0,0,0)

All addresses mask (0.0.0.0).

Definition at line 231 of file in_sock.h.

◆ KInetAddrMaskHost

const TUint32 KInetAddrMaskHost = INET_ADDR(255,255,255,255)

All bits mask (255.255.255.255).

Definition at line 233 of file in_sock.h.

◆ KInetAddrMaxBits

const TInt KInetAddrMaxBits = 32

Maximum IPv4 address length (bits).

Definition at line 177 of file in_sock.h.

◆ KInetAddrNetMaskA

const TUint32 KInetAddrNetMaskA = INET_ADDR(255,0,0,0)

Class A net mask (255.0.0.0).

Definition at line 236 of file in_sock.h.

◆ KInetAddrNetMaskB

const TUint32 KInetAddrNetMaskB = INET_ADDR(255,255,0,0)

Class B net mask (255.255.0.0).

Definition at line 242 of file in_sock.h.

◆ KInetAddrNetMaskC

const TUint32 KInetAddrNetMaskC = INET_ADDR(255,255,255,0)

Class C net mask (255.255.255.0).

Definition at line 248 of file in_sock.h.

◆ KInetAddrNone

const TUint32 KInetAddrNone = INET_ADDR(0,0,0,0)

No address flag (0.0.0.0).

Definition at line 213 of file in_sock.h.

◆ KInetAddrShiftA

const TInt KInetAddrShiftA = 24

Number of bits to right-shift a Class A address to obtain the network number.

Definition at line 240 of file in_sock.h.

◆ KInetAddrShiftB

const TInt KInetAddrShiftB = 16

Number of bits to right-shift a Class B address to obtain the network number.

Definition at line 246 of file in_sock.h.

◆ KInetAddrShiftC

const TInt KInetAddrShiftC = 8

Number of bits to right-shift a Class C address to obtain the network number.

Definition at line 252 of file in_sock.h.

◆ KInetMaxAutoPort

const TUint KInetMaxAutoPort = 60999

Maximum value of an automatically allocated port.

Definition at line 190 of file in_sock.h.

◆ KInetMinAutoPort

const TUint KInetMinAutoPort = 32768

Minimum value of an automatically allocated port.

Definition at line 188 of file in_sock.h.

◆ KInetPortAny

const TUint KInetPortAny = 0x0000

Any port flag (0).

Definition at line 184 of file in_sock.h.

◆ KInetPortNone

const TUint KInetPortNone = 0x0000

No port flag (0).

Definition at line 186 of file in_sock.h.

◆ KIoctlInetLastError

const TUint KIoctlInetLastError = 0x200

An Ioctl corresponding to the socket option KSoInetLastError.

Definition at line 1931 of file in_sock.h.

◆ KIoctlTcpNotifyDataSent

const TUint KIoctlTcpNotifyDataSent = 0x300

Complete the ioctl request when the data has been sent.

Definition at line 1563 of file in_sock.h.

◆ KIp6AddrScopeGlobal

const TInt KIp6AddrScopeGlobal = 0x0E

Global scope level (RFC-2373 2.7).

Definition at line 383 of file in_sock.h.

◆ KIp6AddrScopeLinkLocal

const TInt KIp6AddrScopeLinkLocal = 0x02

Link-local scope level (RFC-2373 2.7).

Definition at line 377 of file in_sock.h.

◆ KIp6AddrScopeNetwork

const TInt KIp6AddrScopeNetwork = 0x10

Network scope level (non-standard value, used internally)

Definition at line 385 of file in_sock.h.

◆ KIp6AddrScopeNodeLocal

const TInt KIp6AddrScopeNodeLocal = 0x01

Node-local scope level (RFC-2373 2.7).

Definition at line 375 of file in_sock.h.

◆ KIp6AddrScopeOrganization

const TInt KIp6AddrScopeOrganization = 0x08

Organisation-local scope level (RFC-2373 2.7).

Definition at line 381 of file in_sock.h.

◆ KIp6AddrScopeSiteLocal

const TInt KIp6AddrScopeSiteLocal = 0x05

Site-local scope level (RFC-2373 2.7).

Definition at line 379 of file in_sock.h.

◆ KIpDontFragment

const TUint KIpDontFragment = 0x010000

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.

Definition at line 623 of file in_sock.h.

◆ KIpDontRoute

const TUint KIpDontRoute = 0x040000

Don't route the packet.

Not supported in Symbian 7.0 and 7.0s.

Definition at line 643 of file in_sock.h.

◆ KIpHeaderIncluded

const TUint KIpHeaderIncluded = 0x020000

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.

See also
KSoRawMode, KSoHeaderIncluded

Definition at line 637 of file in_sock.h.

◆ KProtocolInet6Icmp

const TUint KProtocolInet6Icmp = 58

Identifies the ICMPv6 protocol.

Since
7.0 RSocket::Open()
API status
Required capability: NetworkServices Required for opening 'icmp6' sockets.

Definition at line 114 of file in_sock.h.

◆ KProtocolInet6Ip

const TUint KProtocolInet6Ip = 0xF00

Identifies the IP (v6) protocol module.

Since
7.0 RSocket::Open()
API status
Required capability: NetworkControl Required for opening 'ip6' sockets.

Definition at line 143 of file in_sock.h.

◆ KProtocolInet6Ipip

const TUint KProtocolInet6Ipip = 41

IPv6 inside IP (v4 or v6).

Since
7.0

Definition at line 104 of file in_sock.h.

◆ KProtocolInetIcmp

const TUint KProtocolInetIcmp = 1

Identifies the ICMP protocol.

RSocket::Open()

API status
Required capability: NetworkServices Required for opening 'icmp' sockets.

Definition at line 81 of file in_sock.h.

◆ KProtocolInetIp

const TUint KProtocolInetIp = 0x100

Identifies the IP (v4) protocol module.

RSocket::Open()

API status
Required capability: NetworkControl Required for opening 'ip' sockets.

Definition at line 132 of file in_sock.h.

◆ KProtocolInetTcp

const TUint KProtocolInetTcp = 6

Identifies the TCP protocol.

RSocket::Open()

API status
Required capability: NetworkServices Required for opening 'tcp' sockets.

Definition at line 91 of file in_sock.h.

◆ KProtocolInetUdp

const TUint KProtocolInetUdp = 17

Identifies the UDP protocol.

RSocket::Open()

API status
Required capability: NetworkServices Required for opening 'udp' sockets.

Definition at line 101 of file in_sock.h.

◆ KProtocolUnknown

const TUint KProtocolUnknown = 0xdead

Unknown Protocol ID.

Deprecated:
(never use in anything that binds to IP)

Definition at line 146 of file in_sock.h.

◆ KSoDnsCacheEnable

const TUint KSoDnsCacheEnable = 0x600

No longer supported.

Since
7.0
API status
Removed API.

Definition at line 1535 of file in_sock.h.

◆ KSoDnsCacheFlush

const TUint KSoDnsCacheFlush = 0x601

No longer supported.

Since
7.0
API status
Removed API.

Definition at line 1542 of file in_sock.h.

◆ KSoFlowClosing

const TUint KSoFlowClosing = 0x600 | KSocketInternalOptionBit

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.

Since
7.0

Definition at line 2144 of file in_sock.h.

◆ KSoHeaderIncluded

const TUint KSoHeaderIncluded = 0x403

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.

See also
KSoRawMode, KIpHeaderIncluded

Definition at line 1786 of file in_sock.h.

◆ KSoInetAddRoute

const TInt KSoInetAddRoute = 0x223

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().

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying routes is allowed for authorized apps only.

Definition at line 1299 of file in_sock.h.

◆ KSoInetCachedRouteByDest

const TInt KSoInetCachedRouteByDest = 0x225

No longer supported.

Removed API..

Since
7.0

Definition at line 1492 of file in_sock.h.

◆ KSoInetChangeInterface

const TUint KSoInetChangeInterface = 0x215

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.
Since
7.0

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying interfaces is allowed for authorized apps only.

Definition at line 732 of file in_sock.h.

◆ KSoInetChangeRoute

const TInt KSoInetChangeRoute = 0x225

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().

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying routes is allowed for authorized apps only.

Definition at line 1333 of file in_sock.h.

◆ KSoInetConfigInterface

const TInt KSoInetConfigInterface = 0x213

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,

Since
7.0

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying interfaces is allowed for authorized apps only.

Definition at line 696 of file in_sock.h.

◆ KSoInetCreateIPv4LLOnInterface

const TUint KSoInetCreateIPv4LLOnInterface = 0x226

Trigger link local creation.

Option data type is TSoInet6InterfaceInfo.

The interface is specified by setting the TSoInetInterfaceInfo::iName and any state change required. Called by a configuration deamon to trigger IPv4 zeroconf and link local creation if no address server is found. Does nothing if EV4LLConfigDaemonControlled option is not specified for interface.

Since
9.2

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying interfaces is allowed for authorized apps only.

Definition at line 792 of file in_sock.h.

◆ KSoInetDeleteInterface

const TUint KSoInetDeleteInterface = 0x214

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,

Since
7.0

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying interfaces is allowed for authorized apps only.

Definition at line 712 of file in_sock.h.

◆ KSoInetDeleteRoute

const TInt KSoInetDeleteRoute = 0x224

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().

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying routes is allowed for authorized apps only.

Definition at line 1316 of file in_sock.h.

◆ KSoInetEnumInterfaces

const TInt KSoInetEnumInterfaces = 0x211

Begin enumeration of network interfaces.

This option should be set before enumerating interfaces with KSoInetNextInterface.

This option is for use with RSocket::SetOpt() only.

Definition at line 662 of file in_sock.h.

◆ KSoInetEnumRoutes

const TInt KSoInetEnumRoutes = 0x221

Begin enumeration of routes.

This option can only be used with RSocket::SetOpt().

This option should be set before enumerating routes with KSoInetNextRoute.

API status
Required capability: NetworkServices

Definition at line 1273 of file in_sock.h.

◆ KSoInetIfQueryByDstAddr

const TUint KSoInetIfQueryByDstAddr = 0x1

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.

Definition at line 1227 of file in_sock.h.

◆ KSoInetIfQueryByIndex

const TUint KSoInetIfQueryByIndex = 0x3

Get information for the interface specified by the Interface Index (iIndex) field of the passed packaged TSoInetIfQuery.

Definition at line 1245 of file in_sock.h.

◆ KSoInetIfQueryByName

const TUint KSoInetIfQueryByName = 0x4

Get information for the interface specified by the Interface Name (iName) field of the passed packaged TSoInetIfQuery.

Definition at line 1250 of file in_sock.h.

◆ KSoInetIfQueryBySrcAddr

const TUint KSoInetIfQueryBySrcAddr = 0x2

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.

Definition at line 1240 of file in_sock.h.

◆ KSoInetLastError

const TUint KSoInetLastError = 0x200

Retrieve last error information.

This option is for use with GetOpt() only.

Option data type is TSoInetLastErr.

Definition at line 1927 of file in_sock.h.

◆ KSoInetNextInterface

const TInt KSoInetNextInterface = 0x212

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).
If the interface has no addresses, then one entry with unspecified address is returned.

Definition at line 679 of file in_sock.h.

◆ KSoInetNextRoute

const TInt KSoInetNextRoute = 0x222

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().

API status
Required capability: NetworkServices

Definition at line 1285 of file in_sock.h.

◆ KSoInetResetInterface

const TUint KSoInetResetInterface = 0x216

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.

Since
7.0s

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying interfaces is allowed for authorized apps only.

Definition at line 755 of file in_sock.h.

◆ KSoInetStartInterface

const TUint KSoInetStartInterface = 0x217

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.

Since
7.0

RSocket::SetOpt()

API status
Required capability: NetworkControl Modifying interfaces is allowed for authorized apps only.

Definition at line 773 of file in_sock.h.

◆ KSoInterfaceIndex

const TUint KSoInterfaceIndex = 0x409

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.

Since
7.0s

Definition at line 1894 of file in_sock.h.

◆ KSoIp6InterfaceUnicastHops

const TUint KSoIp6InterfaceUnicastHops = 0x46f

Hop limit for outgoing datagrams: similar to KSoIp6UnicastHops except any socket option to override the current setting is ignored.

The value returned is either the value of the associated interface or the TCP/IP 6 stack default if no interface has been selected yet.

Option data type is TInt. Values are [0..255]. Value cannot be modified, only queried.

See also
KSoIp6UnicastHops for details.
Since
9.2

Definition at line 2008 of file in_sock.h.

◆ KSoIp6JoinGroup

const TUint KSoIp6JoinGroup = 0x46d

Join multicast group.

Option data type is TIp6Mreq.

Since
7.0

Definition at line 1987 of file in_sock.h.

◆ KSoIp6LeaveGroup

const TUint KSoIp6LeaveGroup = 0x46e

Leave multicast group.

Option data type is TIp6Mreq.

Since
7.0

Definition at line 1994 of file in_sock.h.

◆ KSoIp6MulticastHops

const TUint KSoIp6MulticastHops = 0x46b

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.

Since
7.0

Definition at line 1962 of file in_sock.h.

◆ KSoIp6MulticastIf

const TUint KSoIp6MulticastIf = 0x46a

Interface for outgoing multicast packets.

Unused.

Definition at line 1952 of file in_sock.h.

◆ KSoIp6MulticastLoop

const TUint KSoIp6MulticastLoop = 0x46c

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.

Since
7.0

Definition at line 1980 of file in_sock.h.

◆ KSoIp6UnicastHops

const TUint KSoIp6UnicastHops = 0x465

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.

See also
KSoIpTTL for details.
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.
Since
7.0

Definition at line 1946 of file in_sock.h.

◆ KSoIpOptions

const TUint KSoIpOptions = 0x401

Data to place in IP Options field of sent datagrams.

Not supported. Removed API.

Since
7.0

Definition at line 1757 of file in_sock.h.

◆ KSoIpTOS

const TUint KSoIpTOS = 0x404

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.

Definition at line 1799 of file in_sock.h.

◆ KSoIpTTL

const TUint KSoIpTTL = 0x405

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,
See also
KSoIp6MulticastHops.

Definition at line 1816 of file in_sock.h.

◆ KSoKeepInterfaceUp

const TUint KSoKeepInterfaceUp = 0x40a

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.

Since
7.0s

Definition at line 1909 of file in_sock.h.

◆ KSolInetDnsCtrl

const TUint KSolInetDnsCtrl = 0x204

DNS control socket options level.

Removed API.

Definition at line 165 of file in_sock.h.

◆ KSolInetIcmp

const TUint KSolInetIcmp = 0x101

ICMP socket option level (no options).

Definition at line 153 of file in_sock.h.

◆ KSolInetIfCtrl

const TUint KSolInetIfCtrl = 0x201

Interface control socket options level.

Definition at line 161 of file in_sock.h.

◆ KSolInetIfQuery

const TUint KSolInetIfQuery = 0x206

Interface query socket options level.

Since
7.0

Definition at line 167 of file in_sock.h.

◆ KSolInetIp

const TUint KSolInetIp = 0x100

IP socket options level.

Definition at line 159 of file in_sock.h.

◆ KSolInetRtCtrl

const TUint KSolInetRtCtrl = 0x202

Route control socket options level.


Definition at line 163 of file in_sock.h.

◆ KSolInetTcp

const TUint KSolInetTcp = 0x106

TCP socket options level.

Definition at line 155 of file in_sock.h.

◆ KSolInetUdp

const TUint KSolInetUdp = 0x111

UDP socket options level.

Definition at line 157 of file in_sock.h.

◆ KSoNoInterfaceError

const TUint KSoNoInterfaceError = 0x407

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..

Since
7.0

Definition at line 1851 of file in_sock.h.

◆ KSoNoSourceAddressSelect

const TUint KSoNoSourceAddressSelect = 0x40b

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.

Since
7.0s

Definition at line 1919 of file in_sock.h.

◆ KSoRawMode

const TUint KSoRawMode = 0x402

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.

See also
KSoHeaderIncluded, KIpHeaderIncluded

Definition at line 1772 of file in_sock.h.

◆ KSoReuseAddr

const TUint KSoReuseAddr = 0x406

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.

API status
Required capability: NetworkControl Required for 'udp' sockets.

Definition at line 1828 of file in_sock.h.

◆ KSoTcpAsync2MslWait

const TUint KSoTcpAsync2MslWait = 0x306

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.

API status
Removed API.

Definition at line 1634 of file in_sock.h.

◆ KSOTcpDebugMode

const TUint KSOTcpDebugMode = 0x11110000

Not supported.

Removed API.

Definition at line 1741 of file in_sock.h.

◆ KSoTcpKeepAlive

const TUint KSoTcpKeepAlive = 0x305

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.

Definition at line 1619 of file in_sock.h.

◆ KSoTcpListening

const TUint KSoTcpListening = 0x309

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().

Definition at line 1661 of file in_sock.h.

◆ KSoTcpMaxSegSize

const TUint KSoTcpMaxSegSize = 0x303

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.

Definition at line 1597 of file in_sock.h.

◆ KSoTcpNextSendUrgentData

const TUint KSoTcpNextSendUrgentData = 0x314

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.

Definition at line 1711 of file in_sock.h.

◆ KSoTcpNoDelay

const TUint KSoTcpNoDelay = 0x304

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.

Definition at line 1608 of file in_sock.h.

◆ KSoTcpNumSockets

const TUint KSoTcpNumSockets = 0x310

The number of current TCP sockets.

Option data type is TInt.

This option can only be used with RSocket::GetOpt(), not RSocket::SetOpt().

Definition at line 1669 of file in_sock.h.

◆ KSoTcpOobInline

const TUint KSoTcpOobInline = 0x315

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.

Definition at line 1721 of file in_sock.h.

◆ KSoTcpPeekUrgentData

const TUint KSoTcpPeekUrgentData = 0x312

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().

Definition at line 1692 of file in_sock.h.

◆ KSoTcpRcvAtMark

const TUint KSoTcpRcvAtMark = 0x313

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().

Definition at line 1701 of file in_sock.h.

◆ KSoTcpReadBytesPending

const TUint KSoTcpReadBytesPending = 0x308

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().

Definition at line 1651 of file in_sock.h.

◆ KSoTcpReadUrgentData

const TUint KSoTcpReadUrgentData = 0x311

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().

Definition at line 1683 of file in_sock.h.

◆ KSoTcpRecvWinSize

const TUint KSoTcpRecvWinSize = 0x302

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.

Definition at line 1586 of file in_sock.h.

◆ KSoTcpSendBytesPending

const TUint KSoTcpSendBytesPending = 0x307

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().

Definition at line 1642 of file in_sock.h.

◆ KSoTcpSendWinSize

const TUint KSoTcpSendWinSize = 0x301

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.

Definition at line 1575 of file in_sock.h.

◆ KSoUdpAddressSet

const TUint KSoUdpAddressSet = 0x502

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.

Definition at line 2116 of file in_sock.h.

◆ KSoUdpReceiveICMPError

const TUint KSoUdpReceiveICMPError = 0x500

Inform client of error if ICMP error packets received.

The default is disabled.

Option data type is TInt. Values are: 0 = Disable, 1 = Enable.

Definition at line 2108 of file in_sock.h.

◆ KSoUdpSynchronousSend

const TUint KSoUdpSynchronousSend = 0x560

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.

Since
7.0

Definition at line 2124 of file in_sock.h.

◆ KSoUserSocket

const TUint KSoUserSocket = 0x408

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.
Since
7.0

Definition at line 1873 of file in_sock.h.