summaryrefslogtreecommitdiff
path: root/src/drivers/net/network.c
blob: c60148f702a10b68a2e11c5d51c865bd3c698883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "network.h"

#include "string.h"
#include "kernel.h"

#undef DEBUG

static network_vtable_t const network_vtable = {
	{
	network_activate,
	network_deactivate,
	network_deinit,
	network_print_info
	}
};

void network_init( network_t *network, interrupt_t *interrupt, void *context )
{
	memset( network, 0, sizeof( network_t ) );

	driver_init( (driver_t *)network, DRIVER_TYPE_NETWORK, interrupt, context );

	((driver_t *)network)->vtable = (driver_vtable_t *)&network_vtable;
}

void network_activate( void *obj )
{
	kernel_panic( "Activating generic netowrk driver should not be called directly." );
}

void network_deactivate( void *obj )
{
	kernel_panic( "Deactivating generic netowrk driver should not be called directly." );
}

void network_deinit( void *obj )
{
	kernel_panic( "Printing info of generic network driver should not be called directly." );
}

void network_print_info( void *obj )
{
}