121,7 → 121,7 |
#define ETH_DIX ( 1 << ETH_MODE_SHIFT ) |
|
/** Returns whether the DIX Ethernet mode flag is set. |
* @param flags The ethernet flags. Input parameter. |
* @param[in] flags The ethernet flags. |
* @see ETH_DIX |
*/ |
#define IS_DIX( flags ) ((( flags ) & ETH_MODE_MASK ) == ETH_DIX ) |
131,7 → 131,7 |
#define ETH_8023_2_LSAP ( 2 << ETH_MODE_SHIFT ) |
|
/** Returns whether the 802.3 + 802.2 + LSAP mode flag is set. |
* @param flags The ethernet flags. Input parameter. |
* @param[in] flags The ethernet flags. |
* @see ETH_8023_2_LSAP |
*/ |
#define IS_8023_2_LSAP( flags ) ((( flags ) & ETH_MODE_MASK ) == ETH_8023_2_LSAP ) |
141,7 → 141,7 |
#define ETH_8023_2_SNAP ( 3 << ETH_MODE_SHIFT ) |
|
/** Returns whether the 802.3 + 802.2 + LSAP + SNAP mode flag is set. |
* @param flags The ethernet flags. Input parameter. |
* @param[in] flags The ethernet flags. |
* @see ETH_8023_2_SNAP |
*/ |
#define IS_8023_2_SNAP( flags ) ((( flags ) & ETH_MODE_MASK ) == ETH_8023_2_SNAP ) |
176,16 → 176,16 |
/*@{*/ |
|
/** Processes IPC messages from the registered device driver modules in an infinite loop. |
* @param iid The message identifier. Input parameter. |
* @param icall The message parameters. Input/output parameter. |
* @param[in] iid The message identifier. |
* @param[in,out] icall The message parameters. |
*/ |
void eth_receiver( ipc_callid_t iid, ipc_call_t * icall ); |
|
/** Registers new device or updates the MTU of an existing one. |
* Determines the device local hardware address. |
* @param device_id The new device identifier. Input parameter. |
* @param service The device driver service. Input parameter. |
* @param mtu The device maximum transmission unit. Input parameter. |
* @param[in] device_id The new device identifier. |
* @param[in] service The device driver service. |
* @param[in] mtu The device maximum transmission unit. |
* @returns EOK on success. |
* @returns EEXIST if the device with the different service exists. |
* @returns ENOMEM if there is not enough memory left. |
197,8 → 197,8 |
|
/** Registers receiving module service. |
* Passes received packets for this service. |
* @param service The module service. Input parameter. |
* @param phone The service phone. Input parameter. |
* @param[in] service The module service. |
* @param[in] phone The service phone. |
* @returns EOK on success. |
* @returns ENOENT if the service is not known. |
* @returns ENOMEM if there is not enough memory left. |
206,11 → 206,11 |
int eth_register_message( services_t service, int phone ); |
|
/** Returns the device packet dimensions for sending. |
* @param device_id The device identifier. Input parameter. |
* @param addr_len The minimum reserved address length. Output parameter. |
* @param prefix The minimum reserved prefix size. Output parameter. |
* @param content The maximum content size. Output parameter. |
* @param suffix The minimum reserved suffix size. Output parameter. |
* @param[in] device_id The device identifier. |
* @param[out] addr_len The minimum reserved address length. |
* @param[out] prefix The minimum reserved prefix size. |
* @param[out] content The maximum content size. |
* @param[out] suffix The minimum reserved suffix size. |
* @returns EOK on success. |
* @returns EBADMEM if either one of the parameters is NULL. |
* @returns ENOENT if there is no such device. |
218,9 → 218,9 |
int eth_packet_space_message( device_id_t device_id, size_t * addr_len, size_t * prefix, size_t * content, size_t * suffix ); |
|
/** Returns the device hardware address. |
* @param device_id The device identifier. Input parameter. |
* @param type Type of the desired address. Input parameter |
* @param address The device hardware address. Output parameter. |
* @param[in] device_id The device identifier. |
* @param[in] type Type of the desired address. |
* @param[out] address The device hardware address. |
* @returns EOK on success. |
* @returns EBADMEM if the address parameter is NULL. |
* @returns ENOENT if there no such device. |
229,9 → 229,9 |
|
/** Sends the packet queue. |
* Sends only packet successfully processed by the eth_prepare_packet() function. |
* @param device_id The device identifier. Input parameter. |
* @param packet The packet queue. Input parameter. |
* @param sender The sending module service. Input parameter. |
* @param[in] device_id The device identifier. |
* @param[in] packet The packet queue. |
* @param[in] sender The sending module service. |
* @returns EOK on success. |
* @returns ENOENT if there no such device. |
* @returns EINVAL if the service parameter is not known. |
241,8 → 241,8 |
/*@}*/ |
|
/** Processes the received packet and chooses the target registered module. |
* @param flags The device flags. Input parameter. |
* @param packet The packet. Input parameter. |
* @param[in] flags The device flags. |
* @param[in] packet The packet. |
* @returns The target registered module. |
* @returns NULL if the packet is not long enough. |
* @returns NULL if the packet is too long. |
253,11 → 253,11 |
eth_proto_ref eth_process_packet( int flags, packet_t packet ); |
|
/** Prepares the packet for sending. |
* @param flags The device flags. Input parameter. |
* @param packet The packet. Input parameter. |
* @param src_addr The source hardware address. Input parameter. |
* @param ethertype The ethernet protocol type. Input parameter. |
* @param mtu The device maximum transmission unit. Input parameter. |
* @param[in] flags The device flags. |
* @param[in] packet The packet. |
* @param[in] src_addr The source hardware address. |
* @param[in] ethertype The ethernet protocol type. |
* @param[in] mtu The device maximum transmission unit. |
* @returns EOK on success. |
* @returns EINVAL if the packet addresses length is not long enough. |
* @returns EINVAL if the packet is bigger than the device MTU. |