equal
deleted
inserted
replaced
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
10 // |
10 // |
11 // Contributors: |
11 // Contributors: |
13 // Description: |
13 // Description: |
14 // IPv6/IPv4 socket library public header |
14 // IPv6/IPv4 socket library public header |
15 // |
15 // |
16 // |
16 // |
17 |
17 |
18 |
|
19 |
|
20 /** |
18 /** |
21 @file in_sock.h |
19 @file in_sock.h |
22 @publishedAll |
20 @publishedAll |
23 @released |
21 @released |
24 */ |
22 */ |
26 #ifndef __IN_SOCK_H__ |
24 #ifndef __IN_SOCK_H__ |
27 #define __IN_SOCK_H__ |
25 #define __IN_SOCK_H__ |
28 |
26 |
29 #ifndef __ES_SOCK_H__ |
27 #ifndef __ES_SOCK_H__ |
30 #include <es_sock.h> |
28 #include <es_sock.h> |
|
29 #endif |
|
30 |
|
31 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
32 #include <in_sock_internal.h> |
31 #endif |
33 #endif |
32 |
34 |
33 /** |
35 /** |
34 * @name TCP/IP Protocol and address family |
36 * @name TCP/IP Protocol and address family |
35 * |
37 * |
147 const TUint KSolInetRtCtrl = 0x202; |
149 const TUint KSolInetRtCtrl = 0x202; |
148 /** DNS control socket options level. @removed */ |
150 /** DNS control socket options level. @removed */ |
149 const TUint KSolInetDnsCtrl = 0x204; |
151 const TUint KSolInetDnsCtrl = 0x204; |
150 /** Interface query socket options level. @since 7.0 */ |
152 /** Interface query socket options level. @since 7.0 */ |
151 const TUint KSolInetIfQuery = 0x206; |
153 const TUint KSolInetIfQuery = 0x206; |
|
154 #ifdef SYMBIAN_DNS_PUNYCODE |
|
155 /** DNS set options level. */ |
|
156 /**using a new constant instead of KSolInetDnsCtrl |
|
157 */ |
|
158 const TUint KSolInetDns = 0x208; |
|
159 #endif //SYMBIAN_DNS_PUNYCODE |
152 //@} |
160 //@} |
153 |
161 |
154 /** Maximum IPv4 address length (bits). */ |
162 /** Maximum IPv4 address length (bits). */ |
155 const TInt KInetAddrMaxBits = 32; |
163 const TInt KInetAddrMaxBits = 32; |
156 /** Maximum IPv6 address length (bits). */ |
164 /** Maximum IPv6 address length (bits). */ |
770 /** The interface is up and available. */ |
778 /** The interface is up and available. */ |
771 EIfUp, |
779 EIfUp, |
772 /** The interface is up, but flowed off. */ |
780 /** The interface is up, but flowed off. */ |
773 EIfBusy, |
781 EIfBusy, |
774 /** The interface is down. */ |
782 /** The interface is down. */ |
775 EIfDown, |
783 EIfDown |
|
784 #ifdef SYMBIAN_TCPIPDHCP_UPDATE |
|
785 , |
|
786 /** The interface is not-configured */ |
|
787 EIfNotConfigured |
|
788 #endif //SYMBIAN_TCPIPDHCP_UPDATE |
776 }; |
789 }; |
777 |
790 |
778 class TSoInetInterfaceInfo |
791 class TSoInetInterfaceInfo |
779 /** |
792 /** |
780 * Used when listing interfaces with socket option. |
793 * Used when listing interfaces with socket option. |
1190 * Get information for the interface specified by the Interface Name (iName) field |
1203 * Get information for the interface specified by the Interface Name (iName) field |
1191 * of the passed packaged TSoInetIfQuery. |
1204 * of the passed packaged TSoInetIfQuery. |
1192 */ |
1205 */ |
1193 const TUint KSoInetIfQueryByName = 0x4; |
1206 const TUint KSoInetIfQueryByName = 0x4; |
1194 |
1207 |
1195 /** Load scope vector from iZone (Set) @internalAll */ |
|
1196 const TUint KSoInetIfQuerySetScope = 0x10; |
|
1197 /** Set interface to Host mode @internalAll */ |
|
1198 const TUint KSoInetIfQuerySetHost = 0x11; |
|
1199 /** Set interface to Router mode @internalAll */ |
|
1200 const TUint KSoInetIfQuerySetRouter = 0x12; |
|
1201 |
|
1202 //@} |
1208 //@} |
1203 |
1209 |
1204 /** |
1210 /** |
1205 * @name Route control socket options |
1211 * @name Route control socket options |
1206 * |
1212 * |
1361 |
1367 |
1362 IMPORT_C const static TLinkAddr& Cast(const TSockAddr& aAddr); |
1368 IMPORT_C const static TLinkAddr& Cast(const TSockAddr& aAddr); |
1363 IMPORT_C static TLinkAddr& Cast(TSockAddr& aAddr); |
1369 IMPORT_C static TLinkAddr& Cast(TSockAddr& aAddr); |
1364 IMPORT_C const static TLinkAddr* Cast(const TSockAddr* aAddr); |
1370 IMPORT_C const static TLinkAddr* Cast(const TSockAddr* aAddr); |
1365 IMPORT_C static TLinkAddr* Cast(TSockAddr* aAddr); |
1371 IMPORT_C static TLinkAddr* Cast(TSockAddr* aAddr); |
|
1372 |
1366 }; |
1373 }; |
1367 |
1374 |
1368 class TSoInetRouteInfo |
1375 class TSoInetRouteInfo |
1369 /** |
1376 /** |
1370 * Route information structure. |
1377 * Route information structure. |
1459 const TUint KSoDnsCacheEnable = 0x600; |
1466 const TUint KSoDnsCacheEnable = 0x600; |
1460 /** No longer supported. |
1467 /** No longer supported. |
1461 * @removed |
1468 * @removed |
1462 * @since 7.0 */ |
1469 * @since 7.0 */ |
1463 const TUint KSoDnsCacheFlush = 0x601; |
1470 const TUint KSoDnsCacheFlush = 0x601; |
|
1471 #ifdef SYMBIAN_DNS_PUNYCODE |
|
1472 /** Enable International Domain Name support |
|
1473 * @publishedAll |
|
1474 * @released |
|
1475 */ |
|
1476 const TUint KSoDnsEnableIdn = 0x602; |
|
1477 #endif //SYMBIAN_DNS_PUNYCODE |
1464 //@} |
1478 //@} |
1465 |
1479 |
1466 /** |
1480 /** |
1467 * @name TCP socket options |
1481 * @name TCP socket options |
1468 * |
1482 * |
1627 * Option data type is TInt. |
1641 * Option data type is TInt. |
1628 * |
1642 * |
1629 * Values are: 0 = Disable, 1 = Enable. |
1643 * Values are: 0 = Disable, 1 = Enable. |
1630 */ |
1644 */ |
1631 const TUint KSoTcpOobInline = 0x315; |
1645 const TUint KSoTcpOobInline = 0x315; |
|
1646 |
|
1647 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
1648 /** |
|
1649 * TCP max receive value |
|
1650 * |
|
1651 * Used with SetOpt to set TCP Max recv window size |
|
1652 */ |
|
1653 const TUint KSoTcpMaxRecvWin = 0x316; |
|
1654 /** |
|
1655 * TCP Receive window size for auto tuning |
|
1656 * |
|
1657 * Used with SetOpt to set TCP Max recv window size |
|
1658 */ |
|
1659 const TUint KSoTcpRecvWinAuto = 0x317; |
|
1660 |
|
1661 #endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
1662 |
|
1663 |
1632 /** Not supported. @removed */ |
1664 /** Not supported. @removed */ |
1633 const TUint KSOTcpDebugMode = 0x11110000; |
1665 const TUint KSOTcpDebugMode = 0x11110000; |
1634 //@} |
1666 //@} |
1635 |
1667 |
1636 /** |
1668 /** |
1993 * Values are: 0 = Disable, 1 = Enable. |
2025 * Values are: 0 = Disable, 1 = Enable. |
1994 */ |
2026 */ |
1995 const TUint KSoUdpReceiveICMPError = 0x500; |
2027 const TUint KSoUdpReceiveICMPError = 0x500; |
1996 |
2028 |
1997 /** |
2029 /** |
1998 Set the UDP receive buffer size for a socket in bytes. Overrides global ini parameter |
|
1999 <tt>udp_recv_buf</tt>. At least one datagram always fits to the buffer, no matter how |
|
2000 small it is. |
|
2001 |
|
2002 Default receive buffer size is 8192 bytes, or the value given in <tt>udp_recv_buf</tt>. |
|
2003 |
|
2004 @internalAll |
|
2005 @released |
|
2006 */ |
|
2007 const TUint KSoUdpRecvBuf = 0x501; |
|
2008 |
|
2009 /** |
|
2010 Modifies address flag of UDP. Flag is used to control whether the socket is bound to |
2030 Modifies address flag of UDP. Flag is used to control whether the socket is bound to |
2011 IP address or not. Binding to specific address and then clearing this flag makes possible |
2031 IP address or not. Binding to specific address and then clearing this flag makes possible |
2012 to receive packets sent to broadcast address but still to have a specific bound address |
2032 to receive packets sent to broadcast address but still to have a specific bound address |
2013 for outgoing packets. |
2033 for outgoing packets. |
2014 */ |
2034 */ |