WATTCP API Functions
MVI-ADMNET
♦
'C' Programmable
Ethernet Module
ProSoft Technology, Inc.
Page 49 of 90
December 13, 2006
6 WATTCP
API
Functions
In This Chapter
¾
Functions......................................................... 49
¾
ADMNET API Initialize Functions........................................... 51
¾
System Functionality ....................................... 52
¾
Socket Functions............................... 67
¾
ADMNET API Send Socket Functions ................................... 70
¾
Receive Socket Functions............................... 76
6.1 WATTCP
API
Functions
This API is a TCP/IP stack which is used on ADMNET API. Part of this document
are brought from Waterloo TCP by Erik Engelke. Each section provides detailed
programming information for each WATTCP API library functions. The calling
convention for each API function is shown in C format.
The API library routines are categorized according to functionality as shown in in
the following table.
Function Category
Function Name
Description
Initialize Socket
sock_init
TCP/IP system initialization.
tcp_tick
Determine socket connection.
tcp_open &
tcp_open_fast
Generate socket session to a host
computer for TCP protocol.
tcp_open_fast will have no wait for if
the host computer is not found.
udp_open &
udp_open_fast
Generate socket session to a host
computer for UDP protocol.
udp_open_fast will have no wait for if
the host computer is not found.
resolve
Convert string IP Address into a
longword.
sock_mode
Setup socket protocol transfer mode
for the particular use (UDP or TCP).
sock_established
Check if connect has been established.
ip_timer_init Initialize
timing.
ip_timer_expired
Check if timer has been expired.
set_timeout
Set timer.
System Functionality
chk_timeout
Check timer if expired.