TECHNOTE for Winsock API
Copyright 1996-2008 by IntervalZero, Inc. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means, graphic, electronic, or mechanical, including photocopying, and recording or by any information storage or retrieval system without the prior written permission of IntervalZero, Inc. unless such copying is expressly permitted by federal copyright law. While every effort has been made to ensure the accuracy and completeness of all information in this document, IntervalZero, Inc. assumes no liability to any party for any loss or damage caused by errors or omissions or by statements of any kind in this document, its updates, supplements, or special editions, whether such errors, omissions, or statements result from negligence, accident, or any other cause. IntervalZero, Inc. further assumes no liability arising out of the application or use of any product or system described herein; nor any liability for incidental or consequential damages arising from the use of this document. IntervalZero, Inc. disclaims all warranties regarding the information contained herein, whether expressed, implied or statutory, including implied warranties of merchantability or fitness for a particular purpose. IntervalZero, Inc. reserves the right to make changes to this document or to the products described herein without further notice. RTX, RT-TCP/IP, RtxTcpIpStack, Platform Evaluator, and TimeView are all trademarks of IntervalZero, Inc. Microsoft, MS, and Win32 are registered trademarks and Windows Vista, Windows Server 2003, Windows XP, and Windows 2000 Server are trademarks of Microsoft Corporation. All other companies and product names may be trademarks or registered trademarks of their respective holders. TECHNOTE for Winsock API September 2008
TECHNOTE Overview An RT-TCP/IP design goal is to have as much source-level compatibility as possible between the RT-TCP/IP stack and the Winsock API (the API used to develop TCP/IP applications for Microsoft Windows). The RT-TCP/IP stack is based on Unicoi System's Fusion TCP/IP protocol stack v8.4.3. This stack implements its own set of Fusion BSD Socket APIs for socket communication and management. In order to accomplish source-level compatibility, a layer was inserted into the RT-TCP/IP stack that translates between Microsoft Winsock APIs and the Fusion BSD Socket APIs. During the course of this implementation, a number of areas were identified where the Winsock API could not be translated into a corresponding Fusion function call. For this reason, not all Winsock functions and options are available when using the RT-TCP/IP stack. This document details the most commonly used Winsock functions and options that are not supported by RTX. Future documentation will expand this list to provide details for all unsupported functions and options. Unsupported Winsock Features API getsockopt recv setsockopt getaddrinfo getnameinfo ioctlsocket WSAEventSelect Unsupported Features Some values for the optname parameter are not supported. See Unsupported Options for getsockopt and setsockopt below. This value for the optname parameter is not supported: MSG_WAITALL Some values for the optname parameter are not supported. See Unsupported Options for getsockopt and setsockopt below. These values for ai_flags in the hints parameter are not supported: AI_ADDRCONFIG AI_NON_AUTHORITATIVE AI_SECURE AI_RETURN_PREFERRED_NAMES These values for the flag parameter are not supported: NI_NOFQDN NI_NAMEREQD NI_DGRAM This command is not supported for RTX 8.1 and earlier: FIONREAD These network event types are not supported in the RT-TCP/IP stack: FD_QOS FD_GROUP_QOS FD_ROUTING_INTERFACE_CHANGE FD_ADDRESS_LIST_CHANGE
4 TECHNOTE for Winsock API Unsupported Options for getsockopt and setsockopt Some values for the optname parameter are not supported for the getsockopt and setsockopt functions. The following sections list the unsupported options by socket type. Note None of the options for the IPPROTO_RM, NSPROTO_IPX, SOL_APPLETALK, and SOL_IRLMP socket types are supported. Unsupported IPPROTO_IP socket options: IP_HDRINCL IP_OPTIONS IP_PKTINFO IP_RECEIVE_BROADCAST IP_TOS Unsupported IPPROTO_IPV6 socket options: IPV6_ADD_MEMBERSHIP IPV6_DROP_MEMBERSHIP IPV6_HDRINCL IPV6_HOPLIMIT IPV6_MULTICAST_LOOP IPV6_PKTINFO IPV6_PROTECTION_LEVEL IPV6_UNICAST_HOPS IPV6_V6ONLY Unsupported IPPROTO_TCP socket options: TCP_BSDURGENT TCP_EXPEDITED_1122 Unsupported IPPROTO_UDP socket options: UDP_CHECKSUM_COVERAGE UDP_NOCHECKSUM
5 Unsupported SOL_SOCKET socket options: PVD_CONFIG SO_BSP_STATE SO_CONDITIONAL_ACCEPT SO_CONNDATA SO_CONNDATALEN SO_CONNECT_TIME SO_CONNOPT SO_CONNOPTLEN SO_DISCDATA SO_DISCDATALEN SO_DISCOPT SO_DISCOPTLEN SO_DONTLINGER SO_ERROR SO_EXCLUSIVEADDRUSE SO_GROUP_ID SO_GROUP_PRIORITY SO_MAX_MSG_SIZE SO_MAXDG SO_MAXPATHDG SO_OPENTYPE SO_PORT_SCALABILITY SO_PROTOCOL_INFO SO_PROTOCOL_INFOA SO_PROTOCOL_INFOW SO_RCVLOWAT SO_RCVTIMEO SO_SNDLOWAT SO_SNDTIMEO SO_TYPE SO_UPDATE_ACCEPT_CONTEXT
6 TECHNOTE for Winsock API SO_UPDATE_CONNECT_CONTEXT SO_USELOOPBACK