
DS80C400 Network Microcontroller
78 of 96
TCP/IP Stack and Berkeley Sockets
The ROM firmware implements TCP/IP Ethernet networking over an industry-standard/Berkeley socket interface.
The stack supports TCP and UDP transport protocols, allowing a maximum of 24 client/server sockets for either
IPv4 or IPv6.
Table 19
lists the socket functions implemented and accessible in the ROM firmware. The full details
of each socket function are contained in the
High-Speed Microcontroller User’s Guide:
DS80C400 Supplement
.
Figure 19
illustrates the typical sequences for using TCP/UDP client/server sockets. The IPv4 implementation
supports multicasting, ICMP echo request (“ping”), DHCP client, and TFTP client. It does not, however, allow IP
packet fragmentation or reassembly, and it ignores the extended IP options field. The IPv6 implementation
supports ICMP and the TFTP client protocols.
Table 19. Socket Functions
FUNCTION DESCRIPTION
socket
Creates the specified TCP or UDP network socket
closesocket
Closes the specified socket
sendto
Sends a UDP datagram to the specified address
recvfrom
Receives a UDP datagram
connect
Connects a TCP socket to the specified address
bind
Binds a socket to the specified address, port
listen
Listens for connections on the specified socket
accept
Accepts a TCP connection on the specified socket
recv
Reads data from the specified TCP socket connection
send
Sends data to the specified TCP socket connection
getsockopt
Gets options for the specified socket
setsockopt
Sets options for the specified socket
getsockname
Gets current local address for the specified socket
getpeername
Gets current remote address for the specified TCP socket
cleanup
Closes all sockets associated with the specified task ID
avail
Returns the number of bytes available for reading on the specified TCP socket
join
Adds the specified UDP socket to a specified multicast group
leave
Removes the specified UDP socket from a specified multicast group
ping
Sends ICMP echo request to the specified address
setnetworkparams
Sets the IPv4 address and configuration parameters
getnetworkparams
Gets the IPv4 address and configuration parameters
getipv6params
Gets the IPv6 address
getethernetstatus
Gets the status of the Ethernet link
gettftpserver
Gets the IP address of the TFTP server
settftpserver
Sets the IP address of the TFTP server
Figure 19. Typical TCP/UDP Sockets
UDP
UDP
Unicast Multicast
TCP
TCP
Server Client
socket
bind, getsockopt, setsockopt (optional)
listen (max. 16)
accept
connect
avail, send, recv
sendto, recvfrom
closesocket
join
leave
Содержание DS80C400
Страница 6: ...DS80C400 Network Microcontroller 6 of 96...
Страница 7: ...DS80C400 Network Microcontroller 7 of 96...
Страница 15: ...DS80C400 Network Microcontroller 15 of 96...
Страница 16: ...DS80C400 Network Microcontroller 16 of 96 l...
Страница 22: ...DS80C400 Network Microcontroller 22 of 96 OW PIN TIMING...