The invention discloses a method for transmitting IP and CAN services on an FC network, and relates to the field of FC network transmission. The method comprises the steps that: (1), a kernel module is constructed on an HBA card; and the kernel module is initialized according to a configuration file and configuration
software, so that initialization information is obtained; (2), an FC
interface layer encapsulates an
Ethernet frame or a CAN frame into an FC-AE-ASM frame according to the initialization information, and sends the FC-AE-ASM frame to the HBA card, so that the HBA card is enabled to send data; and (3), an FC
interface layer receiving module decapsulates the FC-AE-ASM frame into the
Ethernet frame or the CAN frame by utilizing a data difference frame type, and sends the
Ethernet frame or the CAN frame to a corresponding upper
protocol stack and CAN protocol
software. According to the method disclosed by the invention, the HBA card is used as physical
transmission equipment; due to design of the kernel module, the configuration
software and the FC
interface layer, transmission of IP and CAN services on the FC network can be realized; the
usability of an FC-AE
network data transmission
programming interface is improved; simultaneously, application requirements of the IP services and the CAN services in a high-reliability
control network are expanded; a scheduling buffer mechanism is arranged; and thus, zero
packet loss in UDP transmission is realized by utilization of an FC-AE underlying flow control mechanism.