Network interface module skeleton implementation. More...
#include <async.h>
#include <mem.h>
#include <fibril_synch.h>
#include <stdio.h>
#include <ipc/ipc.h>
#include <ipc/services.h>
#include "../err.h"
#include "../messages.h"
#include "../modules.h"
#include "../structures/packet/packet.h"
#include "../structures/packet/packet_client.h"
#include "../structures/measured_strings.h"
#include "../include/device.h"
#include "../include/netif_interface.h"
#include "../include/nil_interface.h"
#include "netif.h"
#include "netif_messages.h"
#include "netif_module.h"
Functions | |
int | find_device (device_id_t device_id, device_ref *device) |
Finds the device specific data. | |
void | null_device_stats (device_stats_ref stats) |
Clears the usage statistics. | |
int | netif_message (ipc_callid_t callid, ipc_call_t *call, ipc_call_t *answer, int *answer_count) |
Processes the netif module messages. | |
int | netif_init_module (async_client_conn_t client_connection) |
Initializes the netif module. | |
int | netif_run_module (void) |
Starts and maintains the netif module until terminated. | |
void | netif_pq_release (packet_id_t packet_id) |
Releases the given packet. | |
packet_t | netif_packet_get_1 (size_t content) |
Allocates new packet to handle the given content size. | |
Message processing functions | |
int | register_message (device_id_t device_id, int phone) |
Registers the device notification receiver, the network interface layer module. | |
Network interface module interface | |
int | netif_probe_req (int netif_phone, device_id_t device_id, int irq, int io) |
Probes the existence of the device. | |
int | netif_send_msg (int netif_phone, device_id_t device_id, packet_t packet, services_t sender) |
Sends the packet queue. | |
int | netif_start_req (int netif_phone, device_id_t device_id) |
Starts the device. | |
int | netif_stop_req (int netif_phone, device_id_t device_id) |
Stops the device. | |
int | netif_stats_req (int netif_phone, device_id_t device_id, device_stats_ref stats) |
Returns the device usage statistics. | |
int | netif_get_addr_req (int netif_phone, device_id_t device_id, measured_string_ref *address, char **data) |
Returns the device local hardware address. | |
int | netif_bind_service (services_t service, device_id_t device_id, services_t me, async_client_conn_t receiver) |
Creates bidirectional connection with the network interface module and registers the message receiver. | |
Variables | |
netif_globals_t | netif_globals |
Network interface module global data. |
Network interface module skeleton implementation.