RL-TCPNet库提供的函数整理

摘自MDK v4.7的“RL-ARM Real-Time Library User's Guide”

【System Functions】

RoutineDescription
init_TcpNetInitializes RL-TCPnet system resources, protocols, and applications.
main_TcpNetProcesses RL-TCPnet operations including protocol timeouts, ARP address cache, and Ethernet controller polling.
timer_tickGenerates periodic events for RL-TCPnet.

【TCP Functions】

RoutineDescription
tcp_get_socketAllocates a TCP socket.
tcp_connectInitiates a TCP connection.
tcp_listenOpens a TCP socket for listening.
tcp_closeCloses a TCP socket.
tcp_abortCloses a TCP socket immediately.
tcp_release_socketReleases (deallocates) a TCP socket.
tcp_get_bufAllocates memory for a TCP send buffer.
tcp_max_dsizeChanges the TCP maximum segment size.
tcp_sendSends a TCP packet.
tcp_get_stateRetrieves the current state of the TCP socket.
tcp_check_sendDetermines if a TCP socket is ready to send data.
tcp_reset_windowResets the TCP window to maximum size.

【UDP Functions】

RoutineDescription
udp_get_socketAllocates a UDP socket.
udp_openOpens a UDP socket for communication.
udp_closeCloses a UDP socket.
udp_release_socketReleases (deallocates) a UDP socket.
udp_get_bufAllocates memory for a UDP send buffer.
udp_sendSends a UDP packet.
udp_mcast_ttlSets the Time to Live (TTL) for the outgoing multicast messages of a socket.

【BSD 标准接口】

RoutineDescription
acceptAccepts a connection request queued for a listening socket.
bindAssigns a name (local address) to a socket.
closesocketCloses an existing socket and releases a socket descriptor.
connectEstablishes connection between the endpoints on stream sockets.
gethostbynameRetrieves host address corresponding to a host name from a host database.
getpeernameRetrieves the address of the peer to which a socket is connected.
getsocknameRetrieves the local address of the socket.
ioctlsocketSets or retrieves some of the operating parameters on a socket.
listenSets the socket in a listen mode.
recvReceives incoming data that has been queued for a socket.
recvfromReceives incoming data on a datagram socket.
sendSends outgoing data on a socket.
sendtoSends outgoing data on a datagram socket to destination address.
socketCreates a communication socket.

【Ethernet 接口函数】

RoutineDescription
init_ethernetInitializes the Ethernet controller.
int_disable_ethDisables Ethernet controller interrupts.
int_enable_ethEnables Ethernet controller interrupts.
interrupt_ethernetInterrupt service routine for the Ethernet controller.
poll_ethernetPolls the status register of the Ethernet controller.
send_frameSends an Ethernet frame.

【HTTP Functions】

RoutineDescription
http_accept_hostChecks if a connection from the remote host is allowed.
http_check_accountChecks the user account database if account exists.
http_file_accessChecks if file access is allowed for the user.
http_get_infoRetrieves remote machine information.
http_get_langRetrieves preferred browser language settings.
http_get_sessionRetrieves current session ID.
http_get_user_idRetrieves current user ID.
http_get_varRetrieves HTTP environment variables.
http_get_content_typeRetrieves HTTP Content-Type header value.
http_fopenOpens a file for reading.
http_floseCloses a file that was previously opened.
http_freadReads a block of data from a file to data buffer.
http_fgetsReads a string from a file to data buffer.
http_finfoReads a time when the file was last modified.
http_date

【CGI Functions】

RoutineDescription
cgi_funcProcesses CGI script commands.
cgi_process_dataProcesses data returned from an HTTP POST request.
cgi_process_varProcesses data returned from an HTTP GET request.
http_accept_hostUsed for the web server access filtering.

【Telnet Functions】

RoutineDescription
tnet_check_accountChecks if a connection from the remote host is allowed.
tnet_accept_hostChecks the user account database if account exists.
tnet_cbfuncTELNET call-back function.
tnet_ccmpCompares the TELNET buffer to a command string.
tnet_get_infoRetrieves information about the remote host connected to the TELNET server.
tnet_get_user_idRetrieves current user ID.
tnet_process_cmdProcesses and executes a TELNET command.
tnet_set_delaySets the time delay used between TELNET command processing.
tnet_msg_pollPolls the upper-layer application for Unsolicited messages.

【FTP Functions】

RoutineModuleDescription
ftp_accept_hostServerChecks if a connection from the remote host is allowed.
ftp_check_accountServerChecks the user account database if account exists.
ftp_fcloseServerCloses a file that was previously opened.
ftp_evt_notifyServerNotifies the user application about FTP server events.
ftp_fdeleteServerDeletes a specified file.
ftp_ffindServerLists a file directory.
ftp_file_accessServerChecks if file access is allowed for the user.
ftp_fopenServerOpens a file for reading or writing.
ftp_freadServerReads a block of data from a file to data buffer.
ftp_frenameServerRenames a file to a new name.
ftp_fwriteServerWrites a block of data from buffer to a file.
ftp_get_user_idServerRetrieves current user ID.
ftpc_cbfuncClientA call-back function for FTP Client.
ftpc_connectClientStarts a FTP Client.
ftpc_fcloseClientCloses a file that was previously opened for FTP Client.
ftpc_fopenClientOpens a file for reading or writing for FTP Client.
ftpc_freadClientReads a block of data from a file to data buffer for FTP Client.
ftpc_fwriteClientWrites a block of data from buffer to a file for FTP Client.

【arp,dhcp,icmp】

RoutineDescription
arp_cache_ipDetermines if a MAC address is in the ARP cache for the requested IP address, and requests resolving it, if it is not in the cache.
arp_cache_macDetermines if an IP address is in the ARP cache for the requested MAC address, and requests resolving it, if it is not in the cache.
arp_get_infoRetrieves a MAC address for the requested IP address, or an IP address for the requested MAC address from the ARP cache.
dhcp_disablePermanently disables DHCP at run-time.
dhcp_cbfuncNotifies the user about extended DHCP option values.
get_host_by_nameGets the IP address for a hostname.
icmp_pingPings the IP address of remote host.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值