/branches/network/uspace/srv/net/nil/eth/eth.c |
---|
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. |
/branches/network/uspace/srv/net/nil/eth/eth_module.c |
---|
62,7 → 62,7 |
/** Starts the Ethernet module. |
* Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop. |
* @param client_connection The client connection processing function. The module skeleton propagates its own one. Input parameter. |
* @param[in] client_connection The client connection processing function. The module skeleton propagates its own one. |
* @returns EOK on success. |
* @returns Other error codes as defined for the pm_init() function. |
* @returns Other error codes as defined for the nil_initialize() function. |
71,10 → 71,10 |
int module_start( async_client_conn_t client_connection ); |
/** Passes the parameters to the module specific nil_message() function. |
* @param callid The message identifier. Input parameter. |
* @param call The message parameters. Input parameter. |
* @param answer The message answer parameters. Output parameter. |
* @param answer_count The last parameter for the actual answer in the answer parameter. Output parameter. |
* @param[in] callid The message identifier. |
* @param[in] call The message parameters. |
* @param[out] answer The message answer parameters. |
* @param[out] answer_count The last parameter for the actual answer in the answer parameter. |
* @returns EOK on success. |
* @returns ENOTSUP if the message is not known. |
* @returns Other error codes as defined for each specific module message function. |
/branches/network/uspace/srv/net/nil/nil_module.h |
---|
42,7 → 42,7 |
/** Module initialization. |
* Is called by the module_start() function. |
* @param net_phone The networking moduel phone. Input parameter. |
* @param[in] net_phone The networking moduel phone. |
* @returns EOK on success. |
* @returns Other error codes as defined for each specific module initialize function. |
*/ |
49,10 → 49,10 |
int nil_initialize( int net_phone ); |
/** Message processing function. |
* @param callid The message identifier. Input parameter. |
* @param call The message parameters. Input parameter. |
* @param answer The message answer parameters. Output parameter. |
* @param answer_count The last parameter for the actual answer in the answer parameter. Output parameter. |
* @param[in] callid The message identifier. |
* @param[in] call The message parameters. |
* @param[out] answer The message answer parameters. |
* @param[out] answer_count The last parameter for the actual answer in the answer parameter. |
* @returns EOK on success. |
* @returns ENOTSUP if the message is not known. |
* @returns Other error codes as defined for each specific module message function. |
/branches/network/uspace/srv/net/nil/nildummy/nildummy.c |
---|
73,16 → 73,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 nildummy_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. |
92,11 → 92,11 |
int nildummy_device_message( device_id_t device_id, services_t service, size_t mtu ); |
/** 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. |
105,8 → 105,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. |
114,9 → 114,9 |
int nildummy_register_message( services_t service, int phone ); |
/** Sends the packet queue. |
* @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. |
124,8 → 124,8 |
int nildummy_send_message( device_id_t device_id, packet_t packet, services_t sender ); |
/** Returns the device hardware address. |
* @param device_id The device identifier. Input parameter. |
* @param address The device hardware address. Output parameter. |
* @param[in] device_id The device identifier. |
* @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. |
/branches/network/uspace/srv/net/nil/nildummy/nildummy_module.c |
---|
62,7 → 62,7 |
/** Starts the dummy nil module. |
* Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop. |
* @param client_connection The client connection processing function. The module skeleton propagates its own one. Input parameter. |
* @param[in] client_connection The client connection processing function. The module skeleton propagates its own one. |
* @returns EOK on success. |
* @returns Other error codes as defined for the pm_init() function. |
* @returns Other error codes as defined for the nil_initialize() function. |
71,10 → 71,10 |
int module_start( async_client_conn_t client_connection ); |
/** Passes the parameters to the module specific nil_message() function. |
* @param callid The message identifier. Input parameter. |
* @param call The message parameters. Input parameter. |
* @param answer The message answer parameters. Output parameter. |
* @param answer_count The last parameter for the actual answer in the answer parameter. Output parameter. |
* @param[in] callid The message identifier. |
* @param[in] call The message parameters. |
* @param[out] answer The message answer parameters. |
* @param[out] answer_count The last parameter for the actual answer in the answer parameter. |
* @returns EOK on success. |
* @returns ENOTSUP if the message is not known. |
* @returns Other error codes as defined for each specific module message function. |