Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4349 → Rev 4350

/branches/network/uspace/srv/net/netif/netif_module.h
30,6 → 30,12
* @{
*/
 
/** @file
* Network interface module interface.
* The interface has to be implemented by each network interface module.
* The interface is used by the network interface module skeleton.
*/
 
#ifndef __NET_NETIF_MODULE_H__
#define __NET_NETIF_MODULE_H__
 
41,14 → 47,70
 
#include "../include/device.h"
 
/** Initializes the specific module.
*/
int netif_initialize( void );
 
/** Automatically probes all known devices.
*/
int netif_probe_auto_message( void );
 
/** Probes the existence of the device.
* @param device_id The device identifier. Input parameter.
* @param irq The device interrupt number. Input parameter.
* @param io The device input/output address. Input parameter.
* @returns EOK on success.
* @returns Other error codes as defined for the find_device() function.
* @returns Other error codes as defined for the specific module message implementation.
*/
int netif_probe_message( device_id_t device_id, int irq, int io );
 
/** 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.
* @returns EOK on success.
* @returns Other error codes as defined for the find_device() function.
* @returns Other error codes as defined for the specific module message implementation.
*/
int netif_send_message( device_id_t device_id, packet_t packet, services_t sender );
 
/** Starts the device.
* @param device The device structure. Input parameter.
* @returns EOK on success.
* @returns Other error codes as defined for the find_device() function.
* @returns Other error codes as defined for the specific module message implementation.
*/
int netif_start_message( device_ref device );
 
/** Stops the device.
* @param device The device structure. Input parameter.
* @returns EOK on success.
* @returns Other error codes as defined for the find_device() function.
* @returns Other error codes as defined for the specific module message implementation.
*/
int netif_stop_message( device_ref device );
 
/** Returns the device local hardware address.
* @param device_id The device identifier. Input parameter.
* @param address The device local hardware address. Output parameter.
* @returns EOK on success.
* @returns EBADMEM if the address parameter is NULL.
* @returns ENOENT if there no such device.
* @returns Other error codes as defined for the find_device() function.
* @returns Other error codes as defined for the specific module message implementation.
*/
int netif_get_addr_message( device_id_t device_id, measured_string_ref address );
 
int netif_specific_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count );
 
/** Returns the device usage statistics.
* @param device_id The device identifier. Input parameter.
* @param stats The device usage statistics. Output parameter.
* @returns EOK on success.
* @returns Other error codes as defined for the find_device() function.
* @returns Other error codes as defined for the specific module message implementation.
*/
int netif_get_device_stats( device_id_t device_id, device_stats_ref stats );
 
#endif