TCPIP API Reference Core
The application programming interfaces (APIs) to µC/TCP-IP using any of the functions or macros are described in this section. The functions/macros in this section are organized alphabetically with the exception of alphabetizing all BSD functions/macros in their own section.
Table - µC/TCP-IP API List
Function Name | Description |
---|---|
General Network Functions | |
Net_Init
| Initializes µC/TCP-IP and must be called prior to calling any other µC/TCP-IP API functions. |
Net_InitDflt
| Initialize default values for all µC/TCP-IP configurable parameters. |
Net_VersionGet
| Get the µC/TCP-IP software version. |
Network Application Interface Functions | |
NetApp_SetSockAddr
| Setup a socket address from an IPv4 or an IPv6 address. |
NetApp_SockAccept() | Return a new application socket accepted from a listen application socket. |
NetApp_SockBind() | Bind an application socket to a local address. |
NetApp_SockClose() | Close an application socket. |
NetApp_SockConn() | Connect an application socket to a remote address. |
NetApp_SockListen() | Set an application socket to listen for connection requests. |
NetApp_SockOpen() | Open an application socket. |
NetApp_SockRx() | Receive application data via socket. |
NetApp_SockTx() | Transmit application data via socket. |
NetApp_TimeDly_ms
| Delay for specified time, in milliseconds. |
ARP Functions | |
NetARP_CacheCalcStat()
| Calculate ARP cache found percentage statistics. |
NetARP_CacheGetAddrHW
| Get the hardware address corresponding to a specific ARP cache’s protocol address. |
NetARP_CachePoolStatGet
| Get ARP caches’ statistics pool. |
NetARP_CachePoolStatResetMaxUsed
| Reset ARP caches’ statistics pool’s maximum number of entries used. |
NetARP_CacheProbeADdrOnNet() | Transmit an ARP request to probe the local network for a specific protocol address. |
NetARP_CfgCacheAccessedTh
| Configure ARP cache access promotion threshold. |
NetARP_CfgCacheTimeout
| Configure ARP cache timeout for ARP Cache List. |
NetARP_CfgReqMaxReries() | Configure maximum number of ARP request retries. |
NerARP_CfgReqTimeout() | Configure timeout between ARP request timeouts. |
NetARP_IsAddrProtocolConflit() | Check interface’s protocol address conflict status between this interface’s ARP host protocol address(es) and any other host(s) on the local network. |
NDP Functions | |
NetNDP_CfgNeighborCacheTimeout
| Configure NDP neighbor cache timeout for NDP Neighbor Cache List. |
NetNDP_CfgReachabilityTimeout
| Configure one of the NDP neighbor timeouts associated with the Neighbors Unreachability Detection. |
NetNDP_CfgSolicitMaxNbr
| Configure one of the NDP neighbor maximum solicitations number. |
Network ASCII Functions | |
NetASCII_IPv4_to_Str
| Convert an IPv4 address in host-order into an IPv4 dotted-decimal notation ASCII string. |
NetASCII_IPv6_to_Str
| Convert an IPv6 address into an IPv6 colon-decimal notation ASCII string. |
NetASCII_MAC_to_Str
| Convert a Media Access Control (MAC) address into a hexadecimal address string. |
NetASCII_Str_to_IP
| Convert a string of an IPv4 or IPv6 address in their respective decimal notation to an IPv4 or IPv6 address. |
NetASCII_Str_to_IPv4
| Convert a string of an IPv4 address in dotted-decimal notation to an IPv4 address in host-order. |
NetASCII_Str_to_IPv6
| Convert a string of an IPv6 address in common-decimal notation to an IPv6 address. |
NetASCII_Str_to_MAC
| Convert an hexadecimal address string to a Media Access Control (MAC) address. |
Network Buffer Functions | |
NetBuf_PoolStatGet
| Get an interface’s Network Buffers’ statistics pool. |
NetBuf_PoolStatResetMaxUsed
| Reset an interface’s Network Buffers’ statistics pool’s maximum number of entries used. |
NetBuf_RxLargePoolStatGet
| Get an interface’s large receive buffers’ statistics pool. |
NetBuf_RxLargePoolStatResetMaxUsed
| Reset an interface’s large receive buffers’ statistics pool’s maximum number of entries used. |
NetBuf_TxLargePoolStatGet
| Get an interface’s large transmit buffers’ statistics pool. |
NetBuf_TxLargePoolStatResetMaxUsed
| Reset an interface’s large transmit buffers’ statistics pool’s maximum number of entries used. |
NetBuf_TxSmallPoolStatGet
| Get an interface’s small transmit buffers’ statistics pool. |
NetBuf_TxSmallPoolStatResetMaxUsed
| Reset an interface’s small transmit buffers’ statistics pool’s maximum number of entries used. |
Network Connections Functions | |
NetConn_CfgAccessedTh
| Configure network connection access promotion threshold. |
NetConn_PoolStatGet
| Get Network Connections’ statistics pool. |
NetConn_PoolStatResetMaxUsed
| Reset Network Connections’ statistics pool’s maximum number of entries used. |
ICMP Functions | |
NetICMP_TxEchoReq
| Send ICMPv4 or ICMPv6 Echo Request message to a network host. |
Network Interface Functions | |
NetIF_Add
| Add a network device and hardware as a network interface. |
NetIF_AddrHW_Get
| Get network interface’s hardware address. |
NetIF_AddrHW_IsValid
| Validate a network interface hardware address. |
NetIF_AddrHW_Set
| Set network interface’s hardware address. |
NetIF_CfgPerfMonPeriod
| Configure the network interface Performance Monitor Handler timeout. |
NetIF_CfgPhyLinkPeriod
| Configure network interface Physical Link State Handler timeout. |
NetIF_GetRxDataAlignPtr
| Get an aligned pointer into a receive application data buffer. |
NetIF_GetTxDataAlignPtr
| Get an aligned pointer into a transmit application data buffer. |
NetIF_IO_Ctrl
| Handle network interface and/or device specific (I/O) control(s). |
NetIF_IsEn
| Validate network interface as enabled. |
NetIF_IsEnCfgd
| Validate configured network interface as enabled. |
NetIF_ISR_Handler
| Handle a network interface’s device interrupts. |
NetIF_IsValid
| Validate network interface number. |
NetIF_IsValidCfgd
| Validate configured network interface number. |
NetIF_LinkStateGet
| Get network interface’s last known physical link state. |
NetIF_LinkStateSubscribe
| Subscribe to get notified when an interface link state changes. |
NetIF_LinkStateUnsubscribe
| Unsubscribe to get notified when interface link state changes. |
NetIF_LinkStateWaitUntilUp
| Wait for a network interface's physical link state to be UP . |
NetIF_MTU_Get
| Get network interface’s MTU. |
NetIF_MTU_Set
| Set network interface’s MTU. |
NetIF_Start
| Start a network interface. |
NetIF_Stop
| Stop a network interface. |
Wireless Network Interface Functions | |
NetIF_WiFi_CreateAP
| Create an wireless adhoc access point. |
NetIF_WiFi_Join
| Join an wireless access point. |
NetIF_WiFi_Leave
| Leave the access point previously joined. |
NetIF_WiFi_Scan
| Scan available wireless access point. |
IGMP Functions | |
NetIGMP_HostGrpJoin
| Join a host group. |
NetIGMP_HostGrpLeave
| Leave a host group. |
MLDP Functions | |
NetMLDP_HostGrpJoin
| Join a MLDP Multicast host group. |
NetMLDP_HostGrpLeave
| Leave a MLDP host group. |
IPv4 Functions | |
NetIPv4_CfgAddrAdd
| Add a statically-configured IPv4 host address, subnet mask, and default gateway to an interface. |
NetIPv4_CfgAddrAddDynamic
| Add a dynamically-configured IPv4 host address, subnet mask, and default gateway to an interface. |
NetIPv4_CfgAddrAddDynamicStart
| Start dynamic IPv4 address configuration for an interface. |
NetIPv4_CfgAddrAddDynamicStop
| Stop dynamic IPv4 address configuration for an interface. |
NetIPv4_CfgAddrRemove
| Remove a configured IPv4 host address from an interface. |
NetIPv4_CfgAddrRemoveAll
| Remove all configured IPv4 host address(es) from an interface. |
NetIPv4_CfgFragReasmTimeout
| Configure IPv4 fragment reassembly timeout. |
NetIPv4_GetAddrDfltGateway
| Get the default gateway IPv4 address for a host’s configured IPv4 address. |
NetIPv4_GetAddrHost
| Get an interface’s configured IPv4 host address(es). |
NetIPv4_GetAddrSrc
| Get corresponding configured IPv4 host address for a remote IPv4 address to use as source address. |
NetIPv4_GetAddrSubnetMask
| Get the IPv4 address subnet mask for a host’s configured IPv4 address. |
NetIPv4_IsAddrBroadcast
| Validate an IPv4 address as the limited broadcast IPv4 address. |
NetIPv4_IsAddrClassA
| Validate an IPv4 address as a Class-A IPv4 address. |
NetIPv4_IsAddrClassB
| Validate an IPv4 address as a Class-B IPv4 address. |
NetIPv4_IsAddrClassC
| Validate an IPv4 address as a Class-C IPv4 address. |
NetIPv4_IsAddrHost
| Validate an IPv4 address as one the host’s IPv4 address(es). |
NetIPv4_IsAddrHostCfgd
| Validate an IPv4 address as one the host’s configured IPv4 address(es). |
NetIPv4_IsAddrLocalHost
| Validate an IPv4 address as a Localhost IPv4 address. |
NetIPv4_IsAddrLocalLink
| Validate an IPv4 address as a link-local IPv4 address. |
NetIPv4_IsAddrsHostCfgdOnIF() | Check if any IPv4 address(es) are configured on an interface. |
NetIPv4_IsAddrThisHost
| Validate an IPv4 address as the ‘This Host’ initialization IPv4 address. |
NetIPv4_IsValidAddrHost
| Validate an IPv4 address as a valid IPv4 host address. |
NetIPv4_IsValidAddrHostCfgd
| Validate an IPv4 address as a valid, configurable IPv4 host address. |
NetIPv4_IsValidAddrSubnetMask
| Validate an IPv4 address subnet mask. |
IPv6 Functions | |
NetIPv6_CfgAddrAdd
| Add a statically-configured IPv6 host address to an interface. |
NetIPv6_CfgAddrRemove
| Remove a configured IPv6 host address & multicast solicited mode address from an interface. |
NetIPv6_CfgAddrRemoveAll
| Remove all configured IPv6 host address(es) from an interface. |
NetIPv6_CfgFragReasmTimeout
| Configure IPv6 fragment reassembly timeout. |
| Get an interface's IPv6 host address(es). |
NetIPv6_GetAddrSrc() | Find the best matched source address in the IPv6 configured host addresses for the specified destination address. |
NetIPv6_GetAddrMatchingLen() | Compute the number of identical most significant bits of two IPv6 addresses. |
NetIPv6_GetAddrScope() | Get the scope of a specific IPv6 address. |
NetIPv6_IsAddrHostCfgd() | Validate an IPv6 address as a configured IPv6 host address on an enabled interface. |
NetIPv6_IsAddrsCfgdOnIF() | Validate if any IPv6 host addresses are configured on a specific interface. |
NetIPv6_IsValidAddrHost
| Validate an IPv6 host address. |
NetIPv6_IsAddrLinkLocal() | Validate an IPv6 address as a link-local IPv6 address. |
NetIPv6_IsAddrSiteLocal() | Validate an IPv6 address as a site-local address. |
NetIPv6_IsAddrMcast() | Validate an IPv6 address as a multicast address. |
NetIPv6_IsAddrMcastSolNode() | Validate an IPv6 address as a solicited node multicast address. |
NetIPv6_IsAddrMcastAllNodes() | Validate an IPv6 address as the all nodes multicast address. |
NetIPv6_IsAddrMcastAllRouters() | Validate an IPv6 address as the all routers multicast address. |
NetIPv6_IsAddrMcastRsvd() | Validate the IPv6 address as a a reserved multicast IPv6 address. |
NetIPv6_IsAddrUnspecified() | Validate an IPv6 address as the unspecified IPv6 address. |
NetIPv6_IsAddrLoopback
| Validate an IPv6 address as the IPv6 loopback address. |
Network Socket Functions | |
NET_SOCK_DESC_CLR() | Remove a socket file descriptor ID as a member of a file descriptor set. |
NET_SOCK_DESC_COPY() | Copy a file descriptor set to another file descriptor set. |
NET_SOCK_DESC_INIT() | Initialize/zero-clear a file descriptor set. |
NET_SOCK_DESC_IS_SET() | Check if a socket file descriptor ID is a member of a file descriptor set. |
NET_SOCK_DESC_SET() | Add a socket file descriptor ID as a member of a file descriptor set. |
NetSock_Accept() | Wait for new socket connections on a listening server socket. |
NetSock_Bind() | Assign network addresses to sockets. |
NetSock_CfgBlock() | Configure a socket’s blocking mode. |
NetSock_CfgConnChildQ_SizeGet() | Get socket's connection child queue size value. |
NetSock_CfgConnChildQ_SizeSet() | Configure socket's child connection queue size. |
NetSock_CfgIF
| Configure the interface that must be used by the socket. |
NetSock_CfgRxQ_Size() | Configure socket's receive queue size. |
NetSock_CfgSecure()
| Configure a socket’s secure mode. |
NetSock_CfgSecureClientCommonName() | Configure client socket's common name. |
NetSock_CfgSecureClientTrustCallBack() | Configure client socket's trust call back function. |
NetSock_CfgSecureServerCertKeyInstall() | Install certificate (CERT) and private key (KEY) from a buffer which must be used by a server. |
NetSock_CfgTimeoutConnAcceptDflt() | Set socket’s connection accept timeout to configured-default value. |
NetSock_CfgTimeoutConnAcceptGet_ms() | Get socket’s connection accept timeout value. |
NetSock_CfgTimeoutConnAcceptSet() | Set socket’s connection accept timeout value. |
NetSock_CfgTimeoutConnCloseDflt() | Set socket’s connection close timeout to configured-default value. |
NetSock_CfgTimeoutConnCloseGet_ms() | Get socket’s connection close timeout value. |
NetSock_CfgTimeoutConnCloseSet() | Set socket’s connection close timeout value. |
NetSock_CfgTimeoutConnReqDflt() | Set socket’s connection request timeout to configured-default value. |
NetSock_CfgTimeoutConnReqGet_ms() | Get socket’s connection request timeout value. |
NetSock_CfgTimeoutConnReqSet() | Set socket’s connection request timeout value. |
NetSock_CfgTimeoutRxQ_Dflt() | Set socket’s connection receive queue timeout to configured-default value. |
NetSock_CfgTimeoutRxQ_Get_ms() | Get socket’s receive queue timeout value. |
NetSock_CfgTimeoutRxQ_Set() | Set socket’s connection receive queue timeout value. |
NetSock_CfgTimeoutTxQ_Dflt() | Set socket’s connection transmit queue timeout to configured-default value. |
NetSock_CfgTimeoutTxQ_Get_ms() | Get socket’s transmit queue timeout value. |
NetSock_CfgTimeoutTxQ_Set() | Set socket’s connection transmit queue timeout value. |
NetSock_CfgTxIP_TOS() | Configure socket's transmit IPv4 Type of Service (TOS). |
NetSock_CfgTxIP_TTL_Multicast() | Configure socket's transmit IPv4 multicast Time to live (TTL). |
NetSock_CfgTxIP_TTL() | Configure socket's transmit IPv4 Time to Live (TTL). |
NetSock_CfgTxQ_Size() | Configure socket's transmit queue size. |
NetSock_Close() | Terminate communication and free a socket. |
NetSock_Conn() | Connect a local socket to a remote socket address. |
NetSock_GetConnTransportID
| Gets a socket’s transport layer connection handle ID (e.g., TCP connection ID) if available. |
NetSock_IsConn() | Check if a socket is connected to a remote socket. |
NetSock_Listen() | Set a socket to accept incoming connections. |
NetSock_Open() | Create a datagram (i.e., UDP) or stream (i.e., TCP) type socket. |
NetSock_OptGet
| Get the specified socket option from the sock_id socket. |
NetSock_OptSet
| Set the specified socket option to the sock_id socket. |
NetSock_PoolStatGet
| Get Network Sockets’ statistics pool. |
NetSock_PoolStatResetMaxUsed
| Reset Network Sockets’ statistics pool’s maximum number of entries used. |
NetSock_RxData() / NetSock_RxDataFrom() | Copy up to a specified number of bytes received from a remote socket into an application memory buffer. |
NetSock_Sel() | Check if any sockets are ready for available read or write operations or error conditions. |
NetSock_TxData() / NetSock_TxDataTo() | Copy bytes from an application memory buffer into a socket to send to a remote socket. |
TCP Functions | |
NetTCP_ConnCfgIdleTimeout() | Configure TCP connection’s idle timeout. |
NetTCP_ConnCfgMaxSegSizeLocal() | Configure TCP connection’s local maximum segment size. |
NetTCP_ConnCfgMSL_Timeout() | Configure TCP connection's maximum segment lifetime (MSL) timeout. |
NetTCP_ConnCfgReTxMaxTh() | Configure TCP connection’s maximum number of same segment retransmissions. |
NetTCP_ConnCfgReTxMaxTimeout() | Configure TCP connection’s maximum retransmission timeout. |
NetTCP_ConnCfgRxWinSize() | Configure TCP connection’s receive window size. |
NetTCP_ConnCfgTxAckDlyTimeout() | Configure TCP connection's transmit acknowledgement delay timeout. |
NetTCP_ConnCfgTxAckImmedRxdPushEn() | Configure TCP connection’s transmit immediate acknowledgement for received and pushed TCP segments. |
NetTCP_ConnCfgTxKeepAliveEn() | Configure TCP connection's transmit keep-alive enable. |
NetTCP_ConnCfgTxKeepAliveRetryTimeout() | Configure TCP connection's transmit keep-alive retry timeout. |
NetTCP_ConnCfgTxKeepAliveTh() | Configure TCP connection's maximum number of consecutive keep-alives to transmit. |
NetTCP_ConnCfgTxNagleEn() | Configure TCP connection's transmit Nagle algorithm enable. |
NetTCP_ConnCfgTxWinSize() | Configure TCP connection’s transmit window size. |
NetTCP_ConnPoolStatGet() | Get TCP connections’ statistics pool. |
NetTCP_ConnPoolStatResetMaxUsed() | Reset TCP connections’ statistics pool’s maximum number of entries used. |
General Network Utility Functions | |
NET_UTIL_HOST_TO_NET_16
| Convert 16-bit integer values from CPU host-order to network-order. |
NET_UTIL_HOST_TO_NET_32
| Convert 32-bit integer values from CPU host-order to network-order. |
NET_UTIL_NET_TO_HOST_16
| Convert 16-bit integer values from network-order to CPU host- order. |
NET_UTIL_NET_TO_HOST_32
| Convert 32-bit integer values from network-order to CPU host- order. |
NetUtil_TS_Get_ms
| Get current millisecond timestamp. |
NetUtil_TS_Get
| Get the current Internet Timestamp. |
BSD Functions | |
accept() | Wait for new socket connections on a listening server socket. |
bind() | Assign network addresses to sockets. |
close() | Terminate communication and free a socket. |
connect() | Connect a local socket to a remote socket address. |
FD_CLR() | Remove a socket file descriptor ID as a member of a file descriptor set. |
FD_ISSET() | Check if a socket file descriptor ID is a member of a file descriptor set. |
FD_SET() | Add a socket file descriptor ID as a member of a file descriptor set. |
FD_ZERO() | Initialize/zero-clear a file descriptor set. |
getsockopt() | Get a specific option value on a specific TCP socket. |
htonl
| Convert 32-bit integer values from CPU host-order to network-order. |
htons
| Convert 16-bit integer values from CPU host-order to network-order. |
inet_addr() | Convert a string of an IPv4 address in dotted-decimal notation to an IPv4 address in host-order. |
inet_aton() | Convert an IPv4 address in ASCII dotted-decimal notation to a network protocol IPv4 address in network-order. |
inet_ntoa() | Convert an IPv4 address in host-order into an IPv4 dotted-decimal notation ASCII string. |
listen() | Set a socket to accept incoming connections. |
ntohl
| Convert 32-bit integer values from network-order to CPU host-order. |
ntohs
| Convert 16-bit integer values from network-order to CPU host-order. |
recv() / recvfrom() | Copy up to a specified number of bytes received from a remote socket into an application memory buffer. |
select() | Check if any sockets are ready for available read or write operations or error conditions. |
send() / sendto() | Copy bytes from an application memory buffer into a socket to send to a remote socket. |
setsockopt() | Set a specific option on a specific TCP socket. |
socket() | Create a datagram (i.e., UDP) or stream (i.e., TCP) type socket. |