Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
in_sock.h
Go to the documentation of this file.
1// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2// All rights reserved.
3// This component and the accompanying materials are made available
4// under the terms of "Eclipse Public License v1.0"
5// which accompanies this distribution, and is available
6// at the URL "http://www.eclipse.org/legal/epl-v10.html".
7//
8// Initial Contributors:
9// Nokia Corporation - initial contribution.
10//
11// Contributors:
12//
13// Description:
14// IPv6/IPv4 socket library public header
15//
16//
17
24#ifndef __IN_SOCK_H__
25#define __IN_SOCK_H__
26
27#ifndef __ES_SOCK_H__
28#include <es_sock.h>
29#endif
30
31#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
32#include <in_sock_internal.h>
33#endif
34
57const TUint KAfInet = 0x0800;
63const TUint KAfInet6 = 0x0806;
77const TUint KProtocolInetIcmp = 1;
78
85const TUint KProtocolInetTcp = 6;
86
93const TUint KProtocolInetUdp = 17;
94
96const TUint KProtocolInet6Ipip = 41;
97
104const TUint KProtocolInet6Icmp = 58;
106
120const TUint KProtocolInetIp = 0x100;
121
129const TUint KProtocolInet6Ip = 0xF00;
130
132const TUint KProtocolUnknown = 0xdead;
133
135
139const TUint KSolInetIcmp = 0x101;
141const TUint KSolInetTcp = 0x106;
143const TUint KSolInetUdp = 0x111;
145const TUint KSolInetIp = 0x100;
147const TUint KSolInetIfCtrl = 0x201;
149const TUint KSolInetRtCtrl = 0x202;
151const TUint KSolInetDnsCtrl = 0x204;
153const TUint KSolInetIfQuery = 0x206;
154#ifdef SYMBIAN_DNS_PUNYCODE
158const TUint KSolInetDns = 0x208;
159#endif //SYMBIAN_DNS_PUNYCODE
163const TInt KInetAddrMaxBits = 32;
165const TInt KInet6AddrMaxBits = 128;
166
170const TUint KInetPortAny = 0x0000;
172const TUint KInetPortNone = 0x0000;
174const TUint KInetMinAutoPort = 32768;
176const TUint KInetMaxAutoPort = 60999;
178
181
194#define INET_ADDR(a,b,c,d) (TUint32)((((TUint32)(a))<<24)|((b)<<16)|((c)<<8)|(d))
195
197const TUint32 KInetAddrAny = INET_ADDR(0,0,0,0);
199const TUint32 KInetAddrNone = INET_ADDR(0,0,0,0);
201const TUint32 KInetAddrAll = INET_ADDR(255,255,255,255);
203const TUint32 KInetAddrBroadcast = INET_ADDR(255,255,255,255);
205const TUint32 KInetAddrLoop = INET_ADDR(127,0,0,1);
206
208const TUint32 KInetAddrGroupUnspec = INET_ADDR(224,0,0,0);
210const TUint32 KInetAddrGroupAllHosts = INET_ADDR(224,0,0,1);
212const TUint32 KInetAddrLinkLocalNet = INET_ADDR(169,254,0,0);
214const TUint32 KInetAddrLinkLocalNetMask = INET_ADDR(255,255,0,0);
217const TUint32 KInetAddrMaskAll = INET_ADDR(0,0,0,0);
219const TUint32 KInetAddrMaskHost = INET_ADDR(255,255,255,255);
220
222const TUint32 KInetAddrNetMaskA = INET_ADDR(255,0,0,0);
224const TUint32 KInetAddrHostMaskA = ~KInetAddrNetMaskA;
226const TInt KInetAddrShiftA = 24;
228const TUint32 KInetAddrNetMaskB = INET_ADDR(255,255,0,0);
230const TUint32 KInetAddrHostMaskB = ~KInetAddrNetMaskB;
232const TInt KInetAddrShiftB = 16;
234const TUint32 KInetAddrNetMaskC = INET_ADDR(255,255,255,0);
236const TUint32 KInetAddrHostMaskC = ~KInetAddrNetMaskC;
238const TInt KInetAddrShiftC = 8;
239
241const TUint32 KInetAddrIdMaskA = 0x80000000;
243const TUint32 KInetAddrIdValA = 0x00000000;
245const TUint32 KInetAddrIdMaskB = 0xc0000000;
247const TUint32 KInetAddrIdValB = 0x80000000;
249const TUint32 KInetAddrIdMaskC = 0xe0000000;
251const TUint32 KInetAddrIdValC = 0xc0000000;
253const TUint32 KInetAddrIdMaskD = 0xf0000000;
255const TUint32 KInetAddrIdValD = 0xe0000000;
257const TUint32 KInetAddrIdMaskE = 0xf8000000;
259const TUint32 KInetAddrIdValE = 0xf0000000;
260
266 {
275 };
277
278struct SInetAddr
291 TUint32 iAddr;
292 };
293
295class TIp6Addr
305 {
306public:
307 IMPORT_C TBool IsUnicast() const;
308 IMPORT_C TBool IsMulticast() const;
309 IMPORT_C TBool IsLoopback() const;
310 IMPORT_C TBool IsUnspecified() const;
311 IMPORT_C TBool IsLinkLocal() const;
312 IMPORT_C TBool IsSiteLocal() const;
313 IMPORT_C TBool IsV4Compat() const;
314 IMPORT_C TBool IsV4Mapped() const;
315 IMPORT_C TBool IsEqual(const TIp6Addr &aAddr) const;
316 IMPORT_C TInt Match(const TIp6Addr &aAddr) const;
317 IMPORT_C TInt Scope() const;
318 union
319 {
320 TUint8 iAddr8[16];
321 TUint16 iAddr16[8];
322 TUint32 iAddr32[4];
323 } u;
324 };
325
326struct SInet6Addr
338 {
342 TUint32 iFlow;
344 TUint32 iScope;
345 };
353const TInt KIp6AddrScopeNodeLocal = 0x01;
355const TInt KIp6AddrScopeLinkLocal = 0x02;
357const TInt KIp6AddrScopeSiteLocal = 0x05;
359const TInt KIp6AddrScopeOrganization = 0x08;
361const TInt KIp6AddrScopeGlobal = 0x0E;
363const TInt KIp6AddrScopeNetwork = 0x10;
366const TIp6Addr KInet6AddrNone = {{{0}}};
368const TIp6Addr KInet6AddrLoop = {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}};
370const TIp6Addr KInet6AddrLinkLocal = {{{0xfe, 0x80, }}};
372
373class TInetAddr : public TSockAddr
423 {
424public:
425 IMPORT_C TInetAddr();
426 IMPORT_C TInetAddr(const TSockAddr& aAddr);
427 IMPORT_C TInetAddr(TUint aPort);
428 IMPORT_C TInetAddr(const TIp6Addr &aAddr, TUint aPort);
429 IMPORT_C TInetAddr(TUint32 aAddr, TUint aPort);
430 IMPORT_C void SetAddress(TUint32 aAddr);
431 IMPORT_C void SetAddress(const TIp6Addr &aAddr);
432 IMPORT_C void SetV4CompatAddress(TUint32 aAddr);
433 IMPORT_C void SetV4MappedAddress(TUint32 aAddr);
434 IMPORT_C void SetFlowLabel(TInt aLabel);
435 IMPORT_C TInt FlowLabel() const;
436 IMPORT_C const TIp6Addr &Ip6Address() const;
437 IMPORT_C void ConvertToV4Compat();
438 IMPORT_C void ConvertToV4Mapped();
439 IMPORT_C void ConvertToV4();
440 IMPORT_C TBool CmpAddr(const TInetAddr& aAddr) const;
441 IMPORT_C TBool Match(const TInetAddr& aHost) const;
442 IMPORT_C TBool Match(const TInetAddr& aNet, const TInetAddr& aMask) const;
443 IMPORT_C TBool Match(const TInetAddr& aNet, TInt aPrefixLen) const;
444 IMPORT_C void PrefixMask(TInt aPrefixLen);
445 IMPORT_C void Prefix(const TInetAddr& aAddr, TInt aPrefixLen);
446 IMPORT_C void Output(TDes &aBuf) const;
447 IMPORT_C TInt Input(const TDesC &aBuf);
448 inline static TInetAddr& Cast(const TSockAddr& aAddr);
449 inline static TInetAddr& Cast(const TSockAddr* aAddr);
451 IMPORT_C TBool IsUnicast() const;
452 IMPORT_C TBool IsMulticast() const;
453 IMPORT_C TBool IsLoopback() const;
454 IMPORT_C TBool IsUnspecified() const;
455 IMPORT_C TBool IsLinkLocal() const;
456 IMPORT_C TBool IsSiteLocal() const;
457 IMPORT_C TBool IsV4Compat() const;
458 IMPORT_C TBool IsV4Mapped() const;
460 IMPORT_C TUint32 Address() const;
461 IMPORT_C void NetMask(const TInetAddr& aAddr);
462 IMPORT_C void Net(const TInetAddr& aAddr);
463 IMPORT_C void NetBroadcast(const TInetAddr& aAddr);
464 IMPORT_C void SubNet(const TInetAddr& aAddr, const TInetAddr& aMask);
465 IMPORT_C void SubNetBroadcast(const TInetAddr& aAddr, const TInetAddr& aMask);
467 inline TBool IsClassA() const;
468 inline TBool IsClassB() const;
469 inline TBool IsClassC() const;
470 inline TBool IsBroadcast() const;
471 inline TBool IsWildAddr() const;
472 inline TBool IsWildPort() const;
473
474 IMPORT_C void SetScope(TUint32 aScope);
475 IMPORT_C TUint32 Scope() const;
477 IMPORT_C void Init(TUint aFamily);
478 IMPORT_C void OutputWithScope(TDes &aBuf) const;
479protected:
480 inline SInetAddr *Addr4Ptr() const;
481 inline SInet6Addr *AddrPtr() const;
482 inline static TInt AddrLen();
483private:
484 TInt Ipv4Input(const TDesC& aDes);
485 TInt Ipv6Input(const TDesC& aDes);
486 };
490 { return (SInet6Addr*)UserPtr(); }
491
492inline TInt TInetAddr::AddrLen()
494 { return sizeof(SInet6Addr); }
495
496inline TInetAddr& TInetAddr::Cast(const TSockAddr& aAddr)
505 { return *((TInetAddr*)&aAddr); }
506
507inline TInetAddr& TInetAddr::Cast(const TSockAddr* aAddr)
516 { return *((TInetAddr*)aAddr); }
517
518inline SInetAddr* TInetAddr::Addr4Ptr() const
520 { return (SInetAddr*)UserPtr(); }
521
522inline TBool TInetAddr::IsBroadcast() const
528 { return Address() == KInetAddrBroadcast; }
529
530inline TBool TInetAddr::IsWildPort() const
536 { return Port() == KInetPortNone; }
537
538inline TBool TInetAddr::IsWildAddr() const
546 { return IsUnspecified(); }
547
548inline TBool TInetAddr::IsClassA() const
558 {
559 return (Family() == KAfInet || IsV4Mapped() || IsV4Compat()) && (Address() & KInetAddrIdMaskA) == KInetAddrIdValA;
560 }
561
562inline TBool TInetAddr::IsClassB() const
573
574inline TBool TInetAddr::IsClassC() const
583 { return (Address() & KInetAddrIdMaskC) == KInetAddrIdValC; }
584
599const TUint KIpDontFragment = 0x010000;
613const TUint KIpHeaderIncluded = 0x020000;
619const TUint KIpDontRoute = 0x040000;
621
622
638const TInt KSoInetEnumInterfaces = 0x211;
655const TInt KSoInetNextInterface = 0x212;
656
670const TInt KSoInetConfigInterface = 0x213;
684const TUint KSoInetDeleteInterface = 0x214;
702const TUint KSoInetChangeInterface = 0x215;
723const TUint KSoInetResetInterface = 0x216;
739const TUint KSoInetStartInterface = 0x217;
740
756const TUint KSoInetCreateIPv4LLOnInterface = 0x226;
757
774enum TIfStatus
775 {
779 EIfUp,
781 EIfBusy,
783 EIfDown
784#ifdef SYMBIAN_TCPIPDHCP_UPDATE
785 ,
787 EIfNotConfigured
788#endif //SYMBIAN_TCPIPDHCP_UPDATE
789 };
790
803 {
804public:
806 TName iTag;
808 TName iName;
835 };
836
918 {
919public:
928 TUint iDelete:1;
938 TUint iAlias:1;
964 TUint iDoPrefix:1;
1001 TUint iDoId:1;
1017 TUint iDoState:1;
1038 TUint iDoAnycast:1;
1059 TUint iDoProxy:1;
1060 };
1062
1074typedef TUint32 TInetScopeIds[16];
1075
1076class TSoInetIfQuery
1113 {
1114public:
1151 TUint32 iIndex;
1159 TName iName;
1165 TUint iIsUp:1;
1173 };
1183const TUint KSoInetIfQueryByDstAddr = 0x1;
1196const TUint KSoInetIfQueryBySrcAddr = 0x2;
1201const TUint KSoInetIfQueryByIndex = 0x3;
1206const TUint KSoInetIfQueryByName = 0x4;
1207
1227const TInt KSoInetEnumRoutes = 0x221;
1237const TInt KSoInetNextRoute = 0x222;
1249const TInt KSoInetAddRoute = 0x223;
1264const TInt KSoInetDeleteRoute = 0x224;
1279const TInt KSoInetChangeRoute = 0x225;
1280
1295enum TRouteState
1296 {
1298 ERtNone,
1300 ERtPending,
1302 ERtBusy,
1304 ERtReady,
1306 ERtDown
1307 };
1308
1323enum TRouteType
1324 {
1326 ERtNormal,
1328 ERtUser,
1330 ERtIcmpAdd,
1334
1335class TLinkAddr : public TSockAddr
1361 {
1362public:
1363 IMPORT_C TLinkAddr();
1364 IMPORT_C void SetAddress(const TDesC8 &aAddr);
1365
1366 IMPORT_C TPtrC8 Address() const;
1367
1368 IMPORT_C const static TLinkAddr& Cast(const TSockAddr& aAddr);
1369 IMPORT_C static TLinkAddr& Cast(TSockAddr& aAddr);
1370 IMPORT_C const static TLinkAddr* Cast(const TSockAddr* aAddr);
1371 IMPORT_C static TLinkAddr* Cast(TSockAddr* aAddr);
1372
1373 };
1374
1375class TSoInetRouteInfo
1392public:
1393 IMPORT_C TInt GetLinkAddr( TLinkAddr &aInfo ) const;
1394
1400 TInt iMetric;
1409 };
1410
1419 {
1420public:
1422 TInt iPathMtu;
1425 };
1428const TInt KSoInetCachedRouteByDest = 0x225;
1432
1446 {
1448 EDnsAlias=0x00000001,
1450 EDnsAuthoritive=0x00000002,
1452 EDnsHostsFile=0x00000004,
1454 EDnsServer=0x00000008,
1456 EDnsHostName=0x00000010,
1458 EDnsCache=0x00000020,
1460 EDnsNoRoute=0x00000040
1461 };
1466const TUint KSoDnsCacheEnable = 0x600;
1470const TUint KSoDnsCacheFlush = 0x601;
1471#ifdef SYMBIAN_DNS_PUNYCODE
1476const TUint KSoDnsEnableIdn = 0x602;
1477#endif //SYMBIAN_DNS_PUNYCODE
1479
1489const TUint KIoctlTcpNotifyDataSent = 0x300;
1490
1501const TUint KSoTcpSendWinSize = 0x301;
1512const TUint KSoTcpRecvWinSize = 0x302;
1523const TUint KSoTcpMaxSegSize = 0x303;
1534const TUint KSoTcpNoDelay = 0x304;
1545const TUint KSoTcpKeepAlive = 0x305;
1558const TUint KSoTcpAsync2MslWait = 0x306;
1566const TUint KSoTcpSendBytesPending = 0x307;
1575const TUint KSoTcpReadBytesPending = 0x308;
1585const TUint KSoTcpListening = 0x309;
1593const TUint KSoTcpNumSockets = 0x310;
1607const TUint KSoTcpReadUrgentData = 0x311;
1616const TUint KSoTcpPeekUrgentData = 0x312;
1625const TUint KSoTcpRcvAtMark = 0x313;
1635const TUint KSoTcpNextSendUrgentData = 0x314;
1645const TUint KSoTcpOobInline = 0x315;
1646
1647#ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
1653const TUint KSoTcpMaxRecvWin = 0x316;
1659const TUint KSoTcpRecvWinAuto = 0x317;
1660
1661#endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW
1662
1663
1665const TUint KSOTcpDebugMode = 0x11110000;
1667
1681const TUint KSoIpOptions = 0x401;
1696const TUint KSoRawMode = 0x402;
1710const TUint KSoHeaderIncluded = 0x403;
1723const TUint KSoIpTOS = 0x404;
1740const TUint KSoIpTTL = 0x405;
1750const TUint KSoReuseAddr = 0x406;
1773const TUint KSoNoInterfaceError = 0x407;
1795const TUint KSoUserSocket = 0x408;
1816const TUint KSoInterfaceIndex = 0x409;
1831const TUint KSoKeepInterfaceUp = 0x40a;
1841const TUint KSoNoSourceAddressSelect = 0x40b;
1849const TUint KSoInetLastError = 0x200;
1853const TUint KIoctlInetLastError = 0x200;
1868const TUint KSoIp6UnicastHops = 0x465;
1874const TUint KSoIp6MulticastIf = 0x46a;
1884const TUint KSoIp6MulticastHops = 0x46b;
1902const TUint KSoIp6MulticastLoop = 0x46c;
1909const TUint KSoIp6JoinGroup = 0x46d;
1916const TUint KSoIp6LeaveGroup = 0x46e;
1930const TUint KSoIp6InterfaceUnicastHops = 0x46f;
1932
1933class TSoInetLastErr
1963 {
1964public:
1966 TInt iStatus;
1968 TInt iErrType;
1970 TInt iErrCode;
1981
1982class TIp6Mreq
2004 {
2005public:
2009 TUint iInterface;
2010 };
2012
2027const TUint KSoUdpReceiveICMPError = 0x500;
2028
2035const TUint KSoUdpAddressSet = 0x502;
2036
2043const TUint KSoUdpSynchronousSend = 0x560;
2063const TUint KSoFlowClosing = 0x600 | KSocketInternalOptionBit;
2065
2069const TInt KErrNetUnreach = -190;
2071const TInt KErrHostUnreach = -191;
2073const TInt KErrNoProtocolOpt = -192;
2075const TInt KErrUrgentData = -193;
2077
2078#endif
This class specialises the generic socket server address class TSockAddr for the TCP/IP protocol fami...
Definition in_sock.h:447
IMPORT_C void SetFlowLabel(TInt aLabel)
Sets the Flow Label.
TBool IsWildAddr() const
Tests if the IP address is unspecified.
Definition in_sock.h:562
IMPORT_C void SetV4CompatAddress(TUint32 aAddr)
Creates an IPv4-compatible IPv6 address.
IMPORT_C void ConvertToV4()
Converts an IPv4-mapped or IPv4-comptatible address to IPv4.
IMPORT_C TBool IsSiteLocal() const
Tests if IP address is site-local address.
IMPORT_C const TIp6Addr & Ip6Address() const
Gets the IPv6 address.
IMPORT_C void NetMask(const TInetAddr &aAddr)
Sets the IP address to a mask suitable for extracting the network number part of the IP address (depr...
IMPORT_C void Prefix(const TInetAddr &aAddr, TInt aPrefixLen)
Creates an IPv6 address with the specified number of left-most bits copied from another address,...
IMPORT_C void SubNet(const TInetAddr &aAddr, const TInetAddr &aMask)
Sets the IP address to the network number and subnet parts of the IP address (that is,...
IMPORT_C TInt Input(const TDesC &aBuf)
Sets the IP address from a string containing a representation of an IP address, such as might be ente...
IMPORT_C TBool Match(const TInetAddr &aHost) const
Tests the IP address value with that in another TInetAddr.
IMPORT_C void SetScope(TUint32 aScope)
Sets the scope id value.
IMPORT_C void OutputWithScope(TDes &aBuf) const
Writes the IP address into a string and appends the scope id.
IMPORT_C TInt FlowLabel() const
Gets the Flow Label.
TBool IsWildPort() const
Tests if the port is zero.
Definition in_sock.h:554
SInet6Addr * AddrPtr() const
Returns a pointer to KAfInet6 content format.
Definition in_sock.h:512
IMPORT_C void ConvertToV4Compat()
Converts an IPv4 address to an IPv4-compatible IPv6 address.
IMPORT_C TBool IsLoopback() const
Tests if the IP address is a loopback address.
IMPORT_C TBool IsUnspecified() const
Tests if the IP address is unspecified.
static TInt AddrLen()
Returns the size of the KAfInet6 content format.
Definition in_sock.h:516
IMPORT_C void SubNetBroadcast(const TInetAddr &aAddr, const TInetAddr &aMask)
Sets the IP address to be suitable for a subnet-directed broadcast address.
TBool IsBroadcast() const
Tests if the IP address is a limited broadcast address (255.255.255.255).
Definition in_sock.h:546
TBool IsClassA() const
Tests if the IP address is Class A.
Definition in_sock.h:572
IMPORT_C void Output(TDes &aBuf) const
Writes the IP address into a string.
IMPORT_C TBool IsV4Mapped() const
Tests if this address is an IPv4-mapped address.
IMPORT_C TBool IsMulticast() const
Tests if the IP address is a multicast address.
IMPORT_C void Init(TUint aFamily)
Initialises the object properly according to the address family passed in.
IMPORT_C void NetBroadcast(const TInetAddr &aAddr)
Sets the IP address to be suitable for a network-directed broadcast address (deprecated).
TBool IsClassC() const
Tests if the IP address is Class C.
Definition in_sock.h:598
IMPORT_C void SetAddress(TUint32 aAddr)
Sets the IPv4 address value.
IMPORT_C void ConvertToV4Mapped()
Converts an IPv4 address to an IPv4-mapped IPv6 address.
IMPORT_C void SetV4MappedAddress(TUint32 aAddr)
Creates an IPv4-mapped IPv6 address.
static TInetAddr & Cast(const TSockAddr &aAddr)
Casts a TSockAddr to a TInetAddr reference.
Definition in_sock.h:520
IMPORT_C TBool IsLinkLocal() const
Tests if IP address is link-local address.
IMPORT_C TBool IsUnicast() const
Tests if address is unicast address.
IMPORT_C TUint32 Scope() const
Gets the scope id value.
TBool IsClassB() const
Tests if the IP address is Class B.
Definition in_sock.h:586
IMPORT_C TInetAddr()
Constructs a basic TInetAddr object.
IMPORT_C void Net(const TInetAddr &aAddr)
Obtains a network mask corresponding to the class of the IP address, using the NetMask() function,...
SInetAddr * Addr4Ptr() const
Returns a pointer to KAfInet content format
Definition in_sock.h:542
IMPORT_C TBool CmpAddr(const TInetAddr &aAddr) const
Compares IP address and port values with those in another TInetAddr.
IMPORT_C void PrefixMask(TInt aPrefixLen)
Creates an IPv6 address with the specified number of left-most bits set to 1, and the rest set to 0.
IMPORT_C TBool IsV4Compat() const
Tests if this address is an IPv4-compatible address.
IMPORT_C TUint32 Address() const
Gets the IPv4 address value.
The 128 bits of IPv6 or IPv4 address stored in network byte order.
Definition in_sock.h:325
IMPORT_C TBool IsV4Mapped() const
Tests if this address is an IPv4-mapped address.
TUint8 iAddr8[16]
Definition in_sock.h:340
IMPORT_C TBool IsEqual(const TIp6Addr &aAddr) const
Tests if two addresses are equal.
TUint32 iAddr32[4]
Definition in_sock.h:342
IMPORT_C TBool IsV4Compat() const
Tests if this address is an IPv4-compatible address.
IMPORT_C TBool IsUnspecified() const
Tests if the address is IPv6 unspecified.
IMPORT_C TBool IsLinkLocal() const
Tests if the address is an IPv6 link-local address.
IMPORT_C TBool IsUnicast() const
Tests if the address is IPv6 unicast.
IMPORT_C TInt Scope() const
Return the scope level of the addres.
IMPORT_C TBool IsLoopback() const
Tests if the address is IPv6 loopback.
union TIp6Addr::@27 u
IMPORT_C TInt Match(const TIp6Addr &aAddr) const
Compares two raw IPv6 addresses from left to right and returns the number of bits that match.
IMPORT_C TBool IsMulticast() const
Tests if the IPv6 address is multicast.
IMPORT_C TBool IsSiteLocal() const
Tests if this address is an IPv6 site-local address (fec0::/10).
TUint16 iAddr16[8]
Definition in_sock.h:341
TIp6Mreq.
Definition in_sock.h:2085
TUint iInterface
Interface Index.
Definition in_sock.h:2090
TIp6Addr iAddr
IPv6 or IPv4 multicast address.
Definition in_sock.h:2088
IMPORT_C static const TLinkAddr & Cast(const TSockAddr &aAddr)
This function will cast the address to a TLinkAddr.
IMPORT_C void SetAddress(const TDesC8 &aAddr)
Assigns a string of octets as the address.
IMPORT_C TPtrC8 Address() const
Returns the current stored address as a pointer to string of octets.
IMPORT_C TLinkAddr()
Default constructor initialises the address to be zero-filled.
Extension for TSoInetInterfaceInfo.
Definition in_sock.h:960
TUint iDoId
Address action.
Definition in_sock.h:1043
TUint iDoState
Interface state action.
Definition in_sock.h:1059
TUint iDoProxy
Confiture address as Proxy.
Definition in_sock.h:1101
TUint iAlias
Primary or alias modifier.
Definition in_sock.h:980
TUint iDelete
Add or delete modifier.
Definition in_sock.h:970
TUint iDoPrefix
Prefix action (only for IPv6 addresses).
Definition in_sock.h:1006
TUint iDoAnycast
Configure address as Anycast.
Definition in_sock.h:1080
Access to route cache TPckgBuf<TSoInetCachedRouteInfo>, set iDstAddr for required address With a leve...
Definition in_sock.h:1483
TUint iPathRtt
Unused.
Definition in_sock.h:1488
TInt iPathMtu
Unused.
Definition in_sock.h:1486
Interface query.
Definition in_sock.h:1157
TUint32 iIndex
Interface Index.
Definition in_sock.h:1195
TInetAddr iSrcAddr
Source address.
Definition in_sock.h:1183
TUint iIsUp
Flag that is set to 1 if the network interface is attached.
Definition in_sock.h:1209
TName iName
Interface name.
Definition in_sock.h:1203
TInetScopeIds iZone
Scope Id Vector (iZone[0] = Interface Index, iZone[1] = IAP ID, iZone[15] = Network ID).
Definition in_sock.h:1216
TInetAddr iDstAddr
Destination address.
Definition in_sock.h:1172
Used when listing interfaces with socket option.
Definition in_sock.h:843
TInetAddr iNameSer2
IP secondary name server (if any).
Definition in_sock.h:874
TInetAddr iNetMask
IP netmask.
Definition in_sock.h:866
TInt iSpeedMetric
An approximation of the interface speed in Kbps.
Definition in_sock.h:854
TSockAddr iHwAddr
Hardware address.
Definition in_sock.h:862
TName iName
Interface name.
Definition in_sock.h:848
TInetAddr iBrdAddr
IP broadcast address.
Definition in_sock.h:868
TInetAddr iNameSer1
IP primary name server (if any).
Definition in_sock.h:872
TInetAddr iAddress
Interface IP address.
Definition in_sock.h:864
TInt iMtu
Maximum transmission unit (bytes)
Definition in_sock.h:852
TIfStatus iState
Interface state.
Definition in_sock.h:850
TName iTag
Ignored since 7.0.
Definition in_sock.h:846
TUint iFeatures
Feature flags.
Definition in_sock.h:860
TInetAddr iDefGate
IP default gateway or peer address (if known).
Definition in_sock.h:870
Error information for TCP/IP protocols.
Definition in_sock.h:2042
TInt iStatus
The error code returned by the last ESOCK API function called.
Definition in_sock.h:2045
TInt iErrCode
The value of the Code field of the last ICMP message.
Definition in_sock.h:2049
TInetAddr iDstAddr
A TInetAddr with the IP address and port set to the destination address and port of the failed datagr...
Definition in_sock.h:2055
TInetAddr iSrcAddr
A TInetAddr with the IP address and port set to the source address and port of the failed datagram.
Definition in_sock.h:2052
TInt iErrType
The value of the Type field of the last ICMP message.
Definition in_sock.h:2047
TInetAddr iErrAddr
A TInetAddr with the IP address set to the address of the host that generated the error.
Definition in_sock.h:2058
Route information structure.
Definition in_sock.h:1453
TRouteType iType
Route type.
Definition in_sock.h:1458
TInetAddr iDstAddr
IP address of the destination network or host.
Definition in_sock.h:1468
IMPORT_C TInt GetLinkAddr(TLinkAddr &aInfo) const
TInetAddr iNetMask
Destination mask of network.
Definition in_sock.h:1470
TInetAddr iIfAddr
IP address of the interface used for this route.
Definition in_sock.h:1464
TInt iMetric
Route preference, with a smaller value indicating a preferred route.
Definition in_sock.h:1462
TRouteState iState
Route state.
Definition in_sock.h:1460
TInetAddr iGateway
IP address of the gateway, or link-layer address for neighbour cache entries.
Definition in_sock.h:1466
Represents an end point address.
Definition es_sock.h:258
IMPORT_C TUint Family() const
Gets the address family and thereby the type of address.
IMPORT_C TUint Port() const
Gets the port value.
TUint8 * UserPtr() const
Gets an offset to place data after the base class data.
TDes8 TDes
Defines a build-independent modifiable descriptor.
Definition e32cmn.h:1387
TDesC8 TDesC
Defines a build-independent non-modifiable descriptor.
Definition e32cmn.h:1345
const TUint KSocketInternalOptionBit
Definition es_sock.h:410
const TUint KSoHeaderIncluded
Assume that the IP header is included in all data written by the client.
Definition in_sock.h:1786
const TUint32 KInetAddrLinkLocalNetMask
Link-local net mask.
Definition in_sock.h:228
const TUint KInetMinAutoPort
Minimum value of an automatically allocated port.
Definition in_sock.h:188
const TUint KInetPortAny
Any port flag (0).
Definition in_sock.h:184
const TInt KErrUrgentData
Urgent data error.
Definition in_sock.h:2156
const TUint KSoKeepInterfaceUp
Controls whether the interface flow counter is affected by this socket.
Definition in_sock.h:1909
const TUint KProtocolInet6Ipip
IPv6 inside IP (v4 or v6).
Definition in_sock.h:104
const TUint KSoTcpNoDelay
Send data at once if there is an established connection, without waiting for the maximum segment size...
Definition in_sock.h:1608
const TUint KSoTcpSendWinSize
The maximum number of bytes that can be queued for sending.
Definition in_sock.h:1575
const TUint KSoNoSourceAddressSelect
Enable use of 0 as a source address.
Definition in_sock.h:1919
const TUint KSoIpOptions
Data to place in IP Options field of sent datagrams.
Definition in_sock.h:1757
const TInt KSoInetDeleteRoute
Deletes the specified route from the routing table.
Definition in_sock.h:1316
TRouteState
Identifies the state of a route held in an entry in the IP routing table.
Definition in_sock.h:1352
@ ERtDown
Unused.
Definition in_sock.h:1362
@ ERtBusy
Unused.
Definition in_sock.h:1358
@ ERtPending
Route is neighbour cache entry, ARP or Neighbor discovery is in progress.
Definition in_sock.h:1356
@ ERtReady
The interface for the route is up and ready.
Definition in_sock.h:1360
@ ERtNone
Unused.
Definition in_sock.h:1354
const TUint KSoIpTOS
Type of Service field of outgoing datagrams.
Definition in_sock.h:1799
const TIp6Addr KInet6AddrLoop
Loopback address (::1).
Definition in_sock.h:390
const TInt KIp6AddrScopeNodeLocal
Node-local scope level (RFC-2373 2.7).
Definition in_sock.h:375
const TUint KSoInetIfQueryByName
Get information for the interface specified by the Interface Name (iName) field of the passed package...
Definition in_sock.h:1250
const TUint KSoTcpReadUrgentData
Read out-of-band urgent data.
Definition in_sock.h:1683
const TUint KSoInetResetInterface
Resets interface to initial state.
Definition in_sock.h:755
const TUint KSoTcpRcvAtMark
True if the data stream has been read up to the point where urgent data is available,...
Definition in_sock.h:1701
const TInt KIp6AddrScopeSiteLocal
Site-local scope level (RFC-2373 2.7).
Definition in_sock.h:379
const TUint KSolInetIfCtrl
Interface control socket options level.
Definition in_sock.h:161
const TUint KSoInetStartInterface
Restart interface, auto-reconfigure.
Definition in_sock.h:773
const TIp6Addr KInet6AddrNone
No address (all 0s).
Definition in_sock.h:388
const TUint KSoUdpSynchronousSend
Setting this option causes the UDP send operation to block when dynamic interface setup is in progres...
Definition in_sock.h:2124
const TUint KSoReuseAddr
Allow a socket to be bound to an local address that is already in use.
Definition in_sock.h:1828
const TUint KInetMaxAutoPort
Maximum value of an automatically allocated port.
Definition in_sock.h:190
const TUint KSolInetDnsCtrl
DNS control socket options level.
Definition in_sock.h:165
const TInt KErrNetUnreach
Network could not be reached.
Definition in_sock.h:2150
TNameRecordFlags
Flags returned from DNS records.
Definition in_sock.h:1512
@ EDnsNoRoute
Answer does not have a route set.
Definition in_sock.h:1526
@ EDnsServer
Answer is from a DNS server.
Definition in_sock.h:1520
@ EDnsAlias
Name is an Alias.
Definition in_sock.h:1514
@ EDnsCache
Answer is from the resolver cache.
Definition in_sock.h:1524
@ EDnsHostName
Answer is host name for this host.
Definition in_sock.h:1522
@ EDnsAuthoritive
Answer is authoritive.
Definition in_sock.h:1516
@ EDnsHostsFile
Answer is from hosts file.
Definition in_sock.h:1518
const TUint32 KInetAddrIdValA
Definition in_sock.h:257
const TUint32 KInetAddrIdMaskB
Definition in_sock.h:259
const TUint KSoIp6LeaveGroup
Leave multicast group.
Definition in_sock.h:1994
const TUint KSoIp6JoinGroup
Join multicast group.
Definition in_sock.h:1987
const TInt KErrHostUnreach
Host could not be reached.
Definition in_sock.h:2152
const TInt KInetAddrShiftC
Number of bits to right-shift a Class C address to obtain the network number.
Definition in_sock.h:252
const TUint KSoTcpRecvWinSize
The maximum number of bytes that can be buffered for receiving.
Definition in_sock.h:1586
const TInt KIp6AddrScopeGlobal
Global scope level (RFC-2373 2.7).
Definition in_sock.h:383
const TUint KProtocolInet6Icmp
Identifies the ICMPv6 protocol.
Definition in_sock.h:114
const TUint KSoInetIfQueryBySrcAddr
Get information for the interface specified by the source address (iSrcAddr) field of the passed pack...
Definition in_sock.h:1240
const TUint KSoTcpKeepAlive
On the time-out expiring without an acknowledgement being received, send a packet designed to force a...
Definition in_sock.h:1619
const TUint KSoIp6UnicastHops
Hop limit for outgoing datagrams: same as KSoIpTTL.
Definition in_sock.h:1946
const TUint KSoTcpAsync2MslWait
If address reuse is allowed, and a connection already exists between the requested local and remote a...
Definition in_sock.h:1634
const TUint KSoFlowClosing
Internal flow option called when the flow is about to be closed.
Definition in_sock.h:2144
const TUint KSoTcpOobInline
Receive out-of-band data in the normal data stream.
Definition in_sock.h:1721
const TUint KSolInetIp
IP socket options level.
Definition in_sock.h:159
const TUint KSoInetIfQueryByDstAddr
Get information for the interface specified by the destination address (iDstAddr) field of the passed...
Definition in_sock.h:1227
const TUint KProtocolInetUdp
Identifies the UDP protocol.
Definition in_sock.h:101
const TUint KSolInetIfQuery
Interface query socket options level.
Definition in_sock.h:167
const TUint32 KInetAddrMaskAll
All addresses mask (0.0.0.0).
Definition in_sock.h:231
const TInt KSoInetNextRoute
Return the next route in an enumeration started by setting the option KSoInetEnumRoutes.
Definition in_sock.h:1285
const TUint KSoTcpReadBytesPending
The number of bytes currently available for reading (the same value as is obtained using KSOReadBytes...
Definition in_sock.h:1651
const TUint KSoTcpNumSockets
The number of current TCP sockets.
Definition in_sock.h:1669
const TUint32 KInetAddrNetMaskC
Class C net mask (255.255.255.0).
Definition in_sock.h:248
const TUint32 KInetAddrIdMaskC
Definition in_sock.h:263
const TUint KSoIp6MulticastHops
Hop limit for multicast packets.
Definition in_sock.h:1962
const TUint32 KInetAddrNetMaskA
Class A net mask (255.0.0.0).
Definition in_sock.h:236
const TUint KSOTcpDebugMode
Not supported.
Definition in_sock.h:1741
const TUint KInetPortNone
No port flag (0).
Definition in_sock.h:186
const TUint KSoInetCreateIPv4LLOnInterface
Trigger link local creation.
Definition in_sock.h:792
const TUint KSoIp6InterfaceUnicastHops
Hop limit for outgoing datagrams: similar to KSoIp6UnicastHops except any socket option to override t...
Definition in_sock.h:2008
const TUint KSoTcpSendBytesPending
The number of bytes currently queued for sending.
Definition in_sock.h:1642
const TInt KSoInetEnumInterfaces
Begin enumeration of network interfaces.
Definition in_sock.h:662
const TUint KSoNoInterfaceError
Do not set socket into error state if currently connected interface reports an error.
Definition in_sock.h:1851
const TInt KInetAddrShiftA
Number of bits to right-shift a Class A address to obtain the network number.
Definition in_sock.h:240
const TInt KIp6AddrScopeNetwork
Network scope level (non-standard value, used internally)
Definition in_sock.h:385
TIfStatus
Describes the state of an interface.
Definition in_sock.h:813
@ EIfPending
The interface has been initiated, but is not yet available.
Definition in_sock.h:815
@ EIfBusy
The interface is up, but flowed off.
Definition in_sock.h:819
@ EIfUp
The interface is up and available.
Definition in_sock.h:817
@ EIfDown
The interface is down.
Definition in_sock.h:821
const TUint KSoInetIfQueryByIndex
Get information for the interface specified by the Interface Index (iIndex) field of the passed packa...
Definition in_sock.h:1245
const TUint32 KInetAddrIdMaskD
Definition in_sock.h:267
const TUint KIpDontRoute
Don't route the packet.
Definition in_sock.h:643
const TUint32 KInetAddrNone
No address flag (0.0.0.0).
Definition in_sock.h:213
const TUint32 KInetAddrLinkLocalNet
Link-local net number.
Definition in_sock.h:226
const TUint32 KInetAddrGroupAllHosts
All hosts address (224.0.0.1).
Definition in_sock.h:224
const TInt KIp6AddrScopeLinkLocal
Link-local scope level (RFC-2373 2.7).
Definition in_sock.h:377
TInetAddrClass
Definition in_sock.h:282
@ EInetClassE
Definition in_sock.h:288
@ EInetClassD
Definition in_sock.h:287
@ EInetMulticast
Definition in_sock.h:289
@ EInetClassB
Definition in_sock.h:285
@ EInetClassUnknown
Definition in_sock.h:283
@ EInetClassC
Definition in_sock.h:286
@ EInetClassA
Definition in_sock.h:284
@ EInetExperimental
Definition in_sock.h:290
const TUint32 KInetAddrBroadcast
Broadcast address (255.255.255.255).
Definition in_sock.h:217
const TUint KProtocolInet6Ip
Identifies the IP (v6) protocol module.
Definition in_sock.h:143
#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
const TUint KSoUdpAddressSet
Modifies address flag of UDP.
Definition in_sock.h:2116
const TUint KSoUdpReceiveICMPError
Inform client of error if ICMP error packets received.
Definition in_sock.h:2108
const TUint32 KInetAddrAll
All addresses mask (255.255.255.255).
Definition in_sock.h:215
const TUint KIpDontFragment
Don't fragment the packet.
Definition in_sock.h:623
const TUint KSoInetChangeInterface
Configure the interface details, if it exists.
Definition in_sock.h:732
const TUint KSoRawMode
Include IP header in data returned to client.
Definition in_sock.h:1772
const TUint KSoUserSocket
Modify socket visibility.
Definition in_sock.h:1873
const TInt KSoInetEnumRoutes
Begin enumeration of routes.
Definition in_sock.h:1273
const TUint32 KInetAddrIdValC
Definition in_sock.h:265
const TUint KSolInetUdp
UDP socket options level.
Definition in_sock.h:157
const TUint32 KInetAddrAny
Any address flag (0.0.0.0).
Definition in_sock.h:211
const TUint KSoDnsCacheFlush
No longer supported.
Definition in_sock.h:1542
const TUint KIoctlTcpNotifyDataSent
Complete the ioctl request when the data has been sent.
Definition in_sock.h:1563
const TUint KProtocolUnknown
Unknown Protocol ID.
Definition in_sock.h:146
const TInt KIp6AddrScopeOrganization
Organisation-local scope level (RFC-2373 2.7).
Definition in_sock.h:381
const TUint32 KInetAddrGroupUnspec
Group address range start.
Definition in_sock.h:222
const TUint32 KInetAddrIdMaskE
Definition in_sock.h:271
const TInt KInetAddrMaxBits
Maximum IPv4 address length (bits).
Definition in_sock.h:177
const TUint KProtocolInetIcmp
Identifies the ICMP protocol.
Definition in_sock.h:81
const TUint KProtocolInetTcp
Identifies the TCP protocol.
Definition in_sock.h:91
const TUint32 KInetAddrIdValE
Definition in_sock.h:273
const TUint KSoIpTTL
Time to Live field of outgoing datagrams.
Definition in_sock.h:1816
const TUint KSoInetLastError
Retrieve last error information.
Definition in_sock.h:1927
const TUint KSoTcpListening
The socket has been set to listen (through RSocket::Listen()).
Definition in_sock.h:1661
const TUint KSoDnsCacheEnable
No longer supported.
Definition in_sock.h:1535
const TUint KAfInet
Identifies the TCP/IP protocol family and v4 address family.
Definition in_sock.h:59
const TInt KInetAddrShiftB
Number of bits to right-shift a Class B address to obtain the network number.
Definition in_sock.h:246
const TUint32 KInetAddrIdValD
Definition in_sock.h:269
const TUint KSoIp6MulticastLoop
Enable/disable loopback of the multicast packets.
Definition in_sock.h:1980
const TUint KIpHeaderIncluded
Packet includes IP or IPv6 header.
Definition in_sock.h:637
const TUint KAfInet6
Identifies the TCP/IP v6 address family.
Definition in_sock.h:65
const TUint KSolInetTcp
TCP socket options level.
Definition in_sock.h:155
const TUint32 KInetAddrHostMaskA
Class A host mask (0.255.255.255).
Definition in_sock.h:238
const TUint32 KInetAddrIdValB
Definition in_sock.h:261
const TUint32 KInetAddrMaskHost
All bits mask (255.255.255.255).
Definition in_sock.h:233
const TUint32 KInetAddrHostMaskB
Class B host mask (0.0.255.255).
Definition in_sock.h:244
const TUint KSoInterfaceIndex
Set or get interface index of the socket.
Definition in_sock.h:1894
TUint32 TInetScopeIds[16]
Scope Id vector (member of TSoInetIfQuery).
Definition in_sock.h:1116
const TInt KInet6AddrMaxBits
Maximum IPv6 address length (bits).
Definition in_sock.h:179
const TInt KSoInetNextInterface
Return details of the next interface in an enumeration started by setting the option KSoInetEnumInter...
Definition in_sock.h:679
const TIp6Addr KInet6AddrLinkLocal
Link-local address (prefix fe80::).
Definition in_sock.h:392
const TInt KSoInetAddRoute
Adds the specified route to the routing table.
Definition in_sock.h:1299
TRouteType
Identifies the type of creator of an entry in the IP routing table.
Definition in_sock.h:1382
@ ERtNormal
Normal route entry.
Definition in_sock.h:1384
@ ERtIcmpAdd
Route is ARP or neighbor cache entry.
Definition in_sock.h:1388
@ ERtIcmpDel
Unused.
Definition in_sock.h:1390
@ ERtUser
Unused.
Definition in_sock.h:1386
const TUint32 KInetAddrLoop
Loopback address (127.0.0.1).
Definition in_sock.h:219
const TUint KSoIp6MulticastIf
Interface for outgoing multicast packets.
Definition in_sock.h:1952
const TInt KSoInetConfigInterface
Configures the interface.
Definition in_sock.h:696
const TUint32 KInetAddrNetMaskB
Class B net mask (255.255.0.0).
Definition in_sock.h:242
const TInt KSoInetCachedRouteByDest
No longer supported.
Definition in_sock.h:1492
const TInt KErrNoProtocolOpt
Protocol could not be reached.
Definition in_sock.h:2154
const TUint KProtocolInetIp
Identifies the IP (v4) protocol module.
Definition in_sock.h:132
const TInt KSoInetChangeRoute
Modifies the specified route in the routing table.
Definition in_sock.h:1333
const TUint KSoTcpPeekUrgentData
Peeks for urgent data.
Definition in_sock.h:1692
const TUint KSolInetRtCtrl
Route control socket options level.
Definition in_sock.h:163
const TUint KSoTcpMaxSegSize
The maximum TCP segment size (bytes).
Definition in_sock.h:1597
const TUint KIoctlInetLastError
An Ioctl corresponding to the socket option KSoInetLastError.
Definition in_sock.h:1931
const TUint KSoTcpNextSendUrgentData
The next send operation will mark the last byte sent as urgent data.
Definition in_sock.h:1711
const TUint32 KInetAddrHostMaskC
Class C host mask (0.0.0.255).
Definition in_sock.h:250
const TUint KSolInetIcmp
ICMP socket option level (no options).
Definition in_sock.h:153
const TUint KSoInetDeleteInterface
Deletes the interface.
Definition in_sock.h:712
const TUint32 KInetAddrIdMaskA
Definition in_sock.h:255
IPv4 and IPv6 socket address.
Definition in_sock.h:360
TIp6Addr iAddr
16 bytes of IP6/IP4 address (128 bits)
Definition in_sock.h:362
TUint32 iFlow
4 bytes of Flow Id
Definition in_sock.h:364
TUint32 iScope
4 bytes of Scope Id.
Definition in_sock.h:366
IPv4 socket address.
Definition in_sock.h:307
TUint32 iAddr
Plain IPv4 address.
Definition in_sock.h:309