ieee_802_3_mac ieee_802_3_phy
API Reference Manual  /  4 Model-to-Model Interfaces  / 

ieee_802_3_mac_v3

Description
#define IEEE_802_3_MAC_V3_INTERFACE "ieee_802_3_mac_v3"
SIM_INTERFACE(ieee_802_3_mac_v3) {
        void (*receive_frame)(
                conf_object_t *obj, int phy, const frags_t *frame, int crc_ok);
        void (*tx_bandwidth_available)(conf_object_t *obj, int phy);
        void (*link_status_changed)(
                conf_object_t *obj, int phy, ieee_802_3_link_status_t status);
};

typedef enum {
        IEEE_link_unconnected,
        IEEE_link_down,
        IEEE_link_up
} ieee_802_3_link_status_t;

Interface that should be implemented by 802.3 media access control layers.

The receive_frame function is called when a frame has been received by the phy. The frame is passed as a frags_t that must not be modified.

The crc_ok flag is set to indicate that the frame is valid with regards to CRC calculations. If the crc_ok flag is not set, the frame is considered invalid. Note that in general, crc_ok does not indicate whether or not the CRC field in the frame can be relied upon, or whether its computation has been skipped to improve simulation performance. When using new-style links, crc_ok set to false indicates that the CRC field contains valid information that is not matching with the frame contents.

The tx_bandwidth_available is called by the PHY when a previous call to send_frame or check_tx_bandwidth in the ieee_802_3_phy_v3 interface have returned no bandwidth available.

link_status_changed is called when the phy detects a change of the link status.

The phy parameter is deprecated and should be ignored.

Execution Context
Cell Context for all methods.

ieee_802_3_mac ieee_802_3_phy