RL-TCPNet库提供的函数整理

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

【System Functions】

Routine Description
init_TcpNet Initializes RL-TCPnet system resources, protocols, and applications.
main_TcpNet Processes RL-TCPnet operations including protocol timeouts, ARP address cache, and Ethernet controller polling.
timer_tick Generates periodic events for RL-TCPnet.

【TCP Functions】

Routine Description
tcp_get_socket Allocates a TCP socket.
tcp_connect Initiates a TCP connection.
tcp_listen Opens a TCP socket for listening.
tcp_close Closes a TCP socket.
tcp_abort Closes a TCP socket immediately.
tcp_release_socket Releases (deallocates) a TCP socket.
tcp_get_buf Allocates memory for a TCP send buffer.
tcp_max_dsize Changes the TCP maximum segment size.
tcp_send Sends a TCP packet.
tcp_get_state Retrieves the current state of the TCP socket.
tcp_check_send Determines if a TCP socket is ready to send data.
tcp_reset_window Resets the TCP window to maximum size.

【UDP Functions】

Routine Description
udp_get_socket Allocates a UDP socket.
udp_open Opens a UDP socket for communication.
udp_close Closes a UDP socket.
udp_release_socket Releases (deallocates) a UDP socket.
udp_get_buf Allocates memory for a UDP send buffer.
udp_send Sends a UDP packet.
udp_mcast_ttl Sets the Time to Live (TTL) for the outgoing multicast messages of a socket.

【BSD 标准接口】

Routine Description
accept Accepts a connection request queued for a listening socket.
bind Assigns a name (local address) to a socket.
closesocket Closes an existing socket and releases a socket descriptor.
connect Establishes connection between the endpoints on stream sockets.
gethostbyname Retrieves host address corresponding to a host name from a host database.
getpeername Retrieves the address of the peer to which a socket is connected.
getsockname Retrieves the local address of the socket.
ioctlsocket Sets or retrieves some of the operating parameters on a socket.
listen Sets the socket in a listen mode.
recv Receives incoming data that has been queued for a socket.
recvfrom Receives incoming data on a datagram socket.
send Sends outgoing data on a socket.
sendto Sends outgoing data on a datagram socket to destination address.
socket Creates a communication socket.

【Ethernet 接口函数】

Routine Description
init_ethernet Initializes the Ethernet controller.
int_disable_eth Disables Ethernet controller interrupts.
int_enable_eth Enables Ethernet controller interrupts.
interrupt_ethernet Interrupt service routine for the Ethernet controller.
poll_ethernet Polls the status register of the Ethernet controller.
send_frame Sends an Ethernet frame.

【HTTP Functions】

Routine Description
http_accept_host Checks if a connection from the remote host is allowed.
http_check_account Checks the user account database if account exists.
http_file_access Checks if file access is allowed for the user.
http_get_info Retrieves remote machine information.
http_get_lang Retrieves preferred browser language settings.
http_get_session Retrieves current session ID.
http_get_user_id Retrieves current user ID.
http_get_var Retrieves HTTP environment variables.
http_get_content_type Retrieves HTTP Content-Type header value.
http_fopen Opens a file for reading.
http_flose Closes a file that was previously opened.
http_fread Reads a block of data from a file to data buffer.
http_fgets Reads a string from a file to data buffer.
http_finfo Reads a time when the file was last modified.
http_date

【CGI Functions】

Routine Description
cgi_func Processes CGI script commands.
cgi_process_data Processes data returned from an HTTP POST request.
cgi_process_var Processes data returned from an HTTP GET request.
http_accept_host Used for the web server access filtering.

【Telnet Functions】

Routine Description
tnet_check_account Checks if a connection from the remote host is allowed.
tnet_accept_host Checks the user account database if account exists.
tnet_cbfunc TELNET call-back function.
tnet_ccmp Compares the TELNET buffer to a command string.
tnet_get_info Retrieves information about the remote host connected to the TELNET server.
tnet_get_user_id Retrieves current user ID.
tnet_process_cmd Processes and executes a TELNET command.
tnet_set_delay Sets the time delay used between TELNET command processing.
tnet_msg_poll Polls the upper-layer application for Unsolicited messages.

【FTP Functions】

Routine Module Description
ftp_accept_host Server Checks if a connection from the remote host is allowed.
ftp_check_account Server Checks the user account database if account exists.
ftp_fclose Server Closes a file that was previously opened.
ftp_evt_notify Server Notifies the user application about FTP server events.
ftp_fdelete Server Deletes a specified file.
ftp_ffind Server Lists a file directory.
ftp_file_access Server Checks if file access is allowed for the user.
ftp_fopen Server Opens a file for reading or writing.
ftp_fread Server Reads a block of data from a file to data buffer.
ftp_frename Server Renames a file to a new name.
ftp_fwrite Server Writes a block of data from buffer to a file.
ftp_get_user_id Server Retrieves current user ID.
ftpc_cbfunc Client A call-back function for FTP Client.
ftpc_connect Client Starts a FTP Client.
ftpc_fclose Client Closes a file that was previously opened for FTP Client.
ftpc_fopen Client Opens a file for reading or writing for FTP Client.
ftpc_fread Client Reads a block of data from a file to data buffer for FTP Client.
ftpc_fwrite Client Writes a block of data from buffer to a file for FTP Client.

【arp,dhcp,icmp】

Routine Description
arp_cache_ip Determines 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_mac Determines 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_info Retrieves a MAC address for the requested IP address, or an IP address for the requested MAC address from the ARP cache.
dhcp_disable Permanently disables DHCP at run-time.
dhcp_cbfunc Notifies the user about extended DHCP option values.
get_host_by_name Gets the IP address for a hostname.
icmp_ping Pings the IP address of remote host.


你可能感兴趣的:(rl-tcpnet)