Download TCP/IP - Hilscher Knowledge Base
Transcript
Introduction 2/134 Table of Contents 1 Introduction ............................................................................................................................................. 3 1.1 About this document ...................................................................................................................... 3 1.1.1 List of revisions .................................................................................................................................. 3 1.2 1.3 1.4 1.5 Functional overview ....................................................................................................................... 4 System requirements ..................................................................................................................... 4 Intended audience .......................................................................................................................... 4 Specifications ................................................................................................................................. 5 1.5.1 Supported protocols .......................................................................................................................... 5 1.5.2 Technical data ................................................................................................................................... 5 1.5.3 Limitations ......................................................................................................................................... 5 1.6 1.7 1.8 Terms, abbreviations and definitions ............................................................................................. 6 References to documents .............................................................................................................. 6 Legal notes ..................................................................................................................................... 7 1.8.1 1.8.2 1.8.3 1.8.4 Copyright ........................................................................................................................................... 7 Important notes ................................................................................................................................. 7 Exclusion of liability ........................................................................................................................... 8 Export ................................................................................................................................................ 8 2 Protocol parameters .............................................................................................................................. 9 2.1 Sending configuration parameters using commands ..................................................................... 9 2.2 Description of the protocol parameters .......................................................................................... 9 3 Start-up of the TCP/IP stack ................................................................................................................ 11 4 Sockets-based programming model .................................................................................................. 12 4.1 TCP client example ...................................................................................................................... 12 4.2 TCP server example .................................................................................................................... 15 4.3 UDP communication example ...................................................................................................... 18 5 The startup parameters ....................................................................................................................... 20 6 The application interface ..................................................................................................................... 25 6.1 Configuration of the TCP/IP stack ................................................................................................ 25 6.2 The TCP_UDP task ...................................................................................................................... 26 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.2.7 6.2.8 6.2.9 6.2.10 6.2.11 6.2.12 6.2.13 6.2.14 6.2.15 6.2.16 6.2.17 6.2.18 6.2.19 6.2.20 TCPIP_IP_CMD_SET_CONFIG_REQ/CNF - Providing configuration data ...................................... 27 TCPIP_IP_CMD_GET_CONFIG_REQ/CNF - Obtaining configuration data ...................................... 32 TCPIP_IP_CMD_SET_PARAM_REQ/CNF - Setting IP parameters .................................................. 36 TCPIP_IP_CMD_GET_PARAM_REQ/CNF - Obtaining IP parameters .............................................. 49 TCPIP_IP_CMD_GET_OPTIONS_REQ/CNF - Obtaining TCP/IP stack capabilities ......................... 56 TCPIP_IP_CMD_PING_REQ/CNF - Sending a ping ........................................................................ 60 TCPIP_TCP_UDP_CMD_OPEN_REQ/CNF - Opening a socket ......................................................... 64 TCPIP_TCP_UDP_CMD_CLOSE_REQ/CNF - Closing a socket ........................................................ 70 TCPIP_TCP_UDP_CMD_CLOSE_ALL_REQ/CNF - Closing all sockets............................................. 75 TCPIP_TCP_CMD_WAIT_CONNECT_REQ/CNF - Waiting for an Incoming TCP connection ............ 80 TCPIP_TCP_CMD_CONNECT_REQ/CNF - Establishing a TCP connection ...................................... 85 TCPIP_TCP_CMD_SEND_REQ/CNF - Sending TCP data ................................................................ 90 TCPIP_UDP_CMD_SEND_REQ/CNF - Sending UDP data ................................................................ 95 TCPIP_TCP_UDP_CMD_SET_SOCK_OPTION_REQ/CNF - Setting socket options ........................ 100 TCPIP_TCP_UDP_CMD_GET_SOCK_OPTION_REQ/CNF - Obtaining socket options .................... 107 TCPIP_TCP_UDP_CMD_RECEIVE_IND - Receiving TCP data and UDP data .............................. 112 TCPIP_TCP_UDP_CMD_SHUTDOWN_IND/RES - Shutdown of the stack ....................................... 115 TCPIP_TCP_UDP_CMD_RECEIVE_STOP_IND - Stop receiving of TCP data and UDP data ........ 117 TCPIP_TCP_UDP_CMD_ACD_CONFLICT_IND – Address conflict occurred ................................. 120 TCPIP_IP_CMD_ICMP_IND – ICMP indication has been received ............................................. 122 7 Status/error codes overview ............................................................................................................. 124 8 Appendix ............................................................................................................................................. 131 8.1 List of tables ............................................................................................................................... 131 8.2 List of figures .............................................................................................................................. 133 8.3 Contacts ..................................................................................................................................... 134 TCP/IP | Packet Interface DOC050201API13EN | Revision 13 | English | 2015-09 | Released | Public © Hilscher, 2005-2015