N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/OrbisQuartus/server/xen/backend/sdev.h File Reference

#include <linux/version.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/ip.h>
#include <linux/in.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <asm/io.h>
#include <asm/pgalloc.h>
#include <xen/evtchn.h>
#include <xen/interface/io/netif.h>
#include <xen/interface/grant_table.h>
#include <xen/gnttab.h>
#include <xen/driver_util.h>

Go to the source code of this file.

Classes

struct  sdev_st

Defines

#define DPRINTK(_f, _a...)
#define NET_TX_RING_SIZE   __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
#define NET_RX_RING_SIZE   __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
#define sdev_get(_b)   (atomic_inc(&(_b)->refcnt))
#define sdev_put(_b)

Typedefs

typedef sdev_st sdev_t

Functions

void sdev_creditlimit (sdev_t *sdev)
void sdev_disconnect (sdev_t *sdev)
sdev_talloc_sdev (domid_t domid, unsigned int handle, u8 be_mac[ETH_ALEN])
void free_sdev (sdev_t *sdev)
int sdev_map (sdev_t *sdev, unsigned long tx_ring_ref, unsigned long rx_ring_ref, unsigned int evtchn)
void sdev_xenbus_init (void)
void sdev_xenbus_exit (void)
void sdev_schedule_work (sdev_t *sdev)
void sdev_deschedule_work (sdev_t *sdev)
int sdev_be_start_xmit (struct sk_buff *skb, struct net_device *dev)
net_device_stats * sdev_be_get_stats (struct net_device *dev)
irqreturn_t sdev_be_int (int irq, void *dev_id, struct pt_regs *regs)


Define Documentation

#define DPRINTK _f,
_a...   ) 
 

Value:

pr_debug("(file=%s, line=%d) " _f, \
                                    __FILE__ , __LINE__ , ## _a )

Definition at line 88 of file sdev.h.

Referenced by alloc_sdev().

#define NET_RX_RING_SIZE   __RING_SIZE((netif_rx_sring_t *)0, PAGE_SIZE)
 

Definition at line 134 of file sdev.h.

#define NET_TX_RING_SIZE   __RING_SIZE((netif_tx_sring_t *)0, PAGE_SIZE)
 

Definition at line 133 of file sdev.h.

#define sdev_get _b   )     (atomic_inc(&(_b)->refcnt))
 

Definition at line 144 of file sdev.h.

Referenced by sdev_map().

#define sdev_put _b   ) 
 

Value:

do {                                                    \
                if ( atomic_dec_and_test(&(_b)->refcnt) )       \
                        free_sdev(_b);                          \
        } while (0)

Definition at line 145 of file sdev.h.

Referenced by sdev_disconnect().


Typedef Documentation

typedef struct sdev_st sdev_t
 


Function Documentation

sdev_t* alloc_sdev domid_t  domid,
unsigned int  handle,
u8  be_mac[ETH_ALEN]
 

Definition at line 105 of file sdev_if.c.

References DPRINTK, name, sdev_be_get_stats(), and sdev_be_start_xmit().

void free_sdev sdev_t sdev  ) 
 

Definition at line 321 of file sdev_if.c.

References sdev_st::free_work.

Referenced by sdev_disconnect().

struct net_device_stats* sdev_be_get_stats struct net_device *  dev  ) 
 

Referenced by alloc_sdev().

irqreturn_t sdev_be_int int  irq,
void *  dev_id,
struct pt_regs *  regs
 

Referenced by sdev_map().

int sdev_be_start_xmit struct sk_buff skb,
struct net_device *  dev
 

Referenced by alloc_sdev().

void sdev_creditlimit sdev_t sdev  ) 
 

Definition at line 327 of file sdev_if.c.

References sdev_st::credit_bytes, sdev_st::credit_timeout, sdev_st::credit_usec, sdev_st::remaining_credit, sdev_schedule_work(), and sdev_st::status.

void sdev_deschedule_work sdev_t sdev  ) 
 

void sdev_disconnect sdev_t sdev  ) 
 

Definition at line 346 of file sdev_if.c.

References sdev_st::dev, free_sdev(), sdev_st::refcnt, sdev_put, and sdev_st::status.

int sdev_map sdev_t sdev,
unsigned long  tx_ring_ref,
unsigned long  rx_ring_ref,
unsigned int  evtchn
 

Definition at line 238 of file sdev_if.c.

References sdev_st::dev, sdev_st::domid, sdev_st::evtchn, sdev_st::irq, sdev_st::rx, sdev_st::rx_comms_area, sdev_st::rx_req_cons_peek, sdev_be_int(), sdev_get, sdev_st::status, sdev_st::tx, and sdev_st::tx_comms_area.

void sdev_schedule_work sdev_t sdev  ) 
 

Referenced by sdev_creditlimit().

void sdev_xenbus_exit void   ) 
 

Definition at line 364 of file sdev_bus.c.

void sdev_xenbus_init void   ) 
 

Definition at line 353 of file sdev_bus.c.


© 2007, Los Alamos National Security, LLC.