Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3684 → Rev 3685

/branches/network/uspace/srv/net/netif/netif.h
39,18 → 39,10
 
#include "netif_device_id_type.h"
 
#define networking_message( ... ) \
if( netif_globals.networking_phone ) ipc_call_sync_3_3( netif_globals.networking_phone, __VA_ARGS__ )
 
#define ll_message( device, message, arg2, arg3, result1, result2, result3 ) \
if(( device )->ll_registered ) async_msg_3(( device )->ll_registered, ( message ), ( device )->device_id, arg2, arg3 )
if(( device )->ll_registered >= 0 ) async_msg_3(( device )->ll_registered, ( message ), ( device )->device_id, arg2, arg3 )
 
typedef enum netif_status{
NETIF_NULL = 0,
NETIF_STOPPED,
NETIF_ACTIVE,
NETIF_CARRIER_LOST
} netif_status_t;
typedef enum netif_state netif_state_t;
 
typedef struct netif_device_stats netif_device_stats_t;
typedef netif_device_stats_t * netif_device_stats_ref;
60,6 → 52,13
 
DEVICE_MAP_DECLARE( netif_device_map, netif_device_t );
 
enum netif_state{
NETIF_NULL = 0,
NETIF_STOPPED,
NETIF_ACTIVE,
NETIF_CARRIER_LOST
};
 
// based on linux_kernel/include/linux/netdevice.h
 
struct netif_device_stats{
96,11 → 95,12
 
struct netif_device{
netif_device_id_t device_id;
ipc_callid_t ll_registered;
int ll_registered;
netif_device_stats_t stats;
netif_status_t status;
netif_state_t state;
int flags;
int mtu;
size_t mtu;
void * specific;
};
 
struct netif_globals{