1.1. Network communication
VxWorks provides powerful network features that communicate with many other host systems. The network is fully compatible with 4.3BSD, and is also compatible with Sun's NFS. This extensive protocol supports a seamless work environment between the host and the VxWorksh target, and the task can access files to other systems through the network, that is, remote file access, and support remote procedure calls. With Ethernet, TCP / IP and UDP / IP protocols are used to transmit data between different hosts.
VxWorks provides some of the following network tools complete information transfer:
Ÿ Sockets
Complete messaging between tasks running between VxWorks systems or other systems;
Ÿ Remote Process Call (RPC)
Allow the task to call another host (running system is VxWorks or other).
Ÿ Remote file access
The VxWorks task can be remotely accessed remotely with host files using NFS, RSH, FTP, TFTP.
Ÿ File output
Ÿ Remote execution command
The VxWorks task can activate commands in the host system via the network.
The VxWorks network component structure is as follows:
1.1.1. Sockets
The interface of the VxWorks system and network protocol is implemented by sockets. The Sockets specification is a widely used, open, network programming interface that supports multiple protocols. The cornerstone of the communication is a socket, a communication port is one end of the socket, on which you can find a corresponding name. A socket that is being used has its type and its related tasks. The socket exists in the communication domain. The communication domain is an abstract concept introduced to handle the general thread through the socket communication. The socket is usually exchanged with sockets in the same domain (data exchange may also pass the boundaries of the domain, but at this time you must perform some explanation). Each task uses this domain to communicate with an Internet protocol between each other.
The socket can be classified according to the nature of the communication. Applications generally communicate only in the sockets of the same class. However, as long as the underlying communication protocol is allowed, there is also a different type of socket that can be in communication. The user is currently using two sockets, namely joint interfaces (TCP protocols), and data sets (using UDP protocols). The junction interface provides two-way, orderly, no duplicate data stream services. The data setup interface supports the two-way data stream, but it is not guaranteed to be reliable, orderly, and no repetition. That is, the task of receiving information from the data jacket interface is possible to find that the information is repeated, or the order in which it is issued. An important feature of the data settlement interface is that it retains the record boundary. For this feature, the data settlement interface uses a model that is very similar to now many package switched networks (such as Ethernet).
The maximum advantage of socket communication is that communication between processes is completely equal, regardless of the positioning of the process or operating system running in the network. In general, the stream sleeve interface provides a reliable service-oriented service, which is widely used. The timing chart of its application is as follows:
Socket function:
Socket () Create a set of interfaces
Bind () gives a set of interface
Listen () opens the TCP socket connection
Accept () completes a socket connection
Connect () request connection interface
Shutdown () Close connection between junction
Send () sends data to the TCP socket
Recv () receives data from TCP socket
SELECT () Complete synchronous I / O transmission
Read () reads information from a socket
Write () write information to the socket interface
IOCTL () completes the control of the socket interface