VIRTUTECH CONFIDENTIAL    Previous - Up - Next

ieee_802_3_phy

Implemented By
mii-transceiver
Description
#define IEEE_802_3_PHY_INTERFACE "ieee_802_3_phy"
typedef struct {
        
        int (*send_frame)(conf_object_t *obj, dbuffer_t *buf, int replace_crc);
        int (*check_tx_bandwidth)(conf_object_t *obj);
        
} ieee_802_3_phy_interface_t;

Interface that should be implemented by 802.3 physical layers.

The send_frame function is used by a device to send an Ethernet frame. The frame should be a dbuffer_t containing a complete Ethernet frame. excluding the preamble and SFD, but including the CRC. The replace_crc flag indicates whether the CRC is not actually calculated yet. The passed buf should not be modified by the called function. If the function return 0, the frame was sent to the link; In case -1 is returned, there was not enough bandwidth available right now, and the frame could not be sent. The PHY should call the tx_bandwidth_available in the ieee_802_3_mac interface at the MAC, when the frame can be sent.

The check_tx_bandwidth can also be used to check that there is bandwidth available, without sending a frame. It returns 0 if there is no bandwidth available, and a positive value if the frame can be sent right away.

VIRTUTECH CONFIDENTIAL    Previous - Up - Next