|
|
|
|
|
/home/brennan/n-sim/OrbisQuartus/server/xen/backend/sim_if.c File Reference#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/proc_fs.h>
#include <linux/fs.h>
#include "oq_kmod.h"
#include "avl.h"
#include <sim_if.h>
Go to the source code of this file.
|
Classes |
| struct | knode |
| struct | ksensor |
| struct | khost |
| struct | data_t |
Defines |
| #define | META_NUM_TYPES 4 |
Enumerations |
| enum | file_t { SIM_ID = 0,
TIME = 1,
ADD_HOST = 2,
RM_HOST = 3
} |
Functions |
| | EXPORT_SYMBOL (req_resp_lists) |
| int | add_node (unsigned int id) |
| void | remove_node (unsigned int number) |
| int | add_sensor_entry (unsigned int node, unsigned int number, unsigned int id) |
| void | remove_sensor_entry (unsigned int number) |
| int | post_sensor_stats (struct sensor_stats stats) |
| loff_t | oq_llseek (struct file *filp, loff_t pos, int where) |
| ssize_t | oq_read (struct file *filp, char __user *buf, size_t count, loff_t *f_pos) |
| ssize_t | oq_write (struct file *filp, const char __user *buf, size_t count, loff_t *f_pos) |
| int | oq_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) |
| int | oq_open (struct inode *inode, struct file *filp) |
| int | oq_release (struct inode *inode, struct file *filp) |
| int | OQLOG (const char *fmt,...) |
| int | init_simulator_iface (int test) |
| void | shutdown_simulator_iface (void) |
Variables |
| oq_req_resp_list * | req_resp_lists |
| char | oq_simulation_daemon [PATH_MAX] |
| proc_dir_entry * | oq_dir |
| oq_dev * | oq_device |
| proc_dir_entry * | oq_hosts |
| proc_dir_entry * | oq_sensors |
| avltree | ksensors |
| avltree | knodes |
| unsigned int | simulation_on |
| unsigned long | ksim_id |
| unsigned long | ktime_dilation_ratio |
| khost | khosts |
| data_t | metadata [META_NUM_TYPES] |
Define Documentation
Enumeration Type Documentation
|
|
- Enumerator:
-
| SIM_ID |
|
| TIME |
|
| ADD_HOST |
|
| RM_HOST |
|
Definition at line 99 of file sim_if.c. |
Function Documentation
| int add_node |
( |
unsigned int |
id |
) |
|
|
| int add_sensor_entry |
( |
unsigned int |
node, |
|
|
unsigned int |
number, |
|
|
unsigned int |
id |
|
) |
|
|
| int init_simulator_iface |
( |
int |
test |
) |
|
|
|
|
Definition at line 681 of file sim_if.c.
References add_entry(), ADD_HOST, khosts, khost::list, metadata, oq_dir, oq_hosts, oq_sensors, req_resp_lists, RM_HOST, SIM_ID, simulation_on, and TIME. |
| int oq_ioctl |
( |
struct inode * |
inode, |
|
|
struct file * |
filp, |
|
|
unsigned int |
cmd, |
|
|
unsigned long |
arg |
|
) |
|
|
| loff_t oq_llseek |
( |
struct file * |
filp, |
|
|
loff_t |
pos, |
|
|
int |
where |
|
) |
|
|
| int oq_open |
( |
struct inode * |
inode, |
|
|
struct file * |
filp |
|
) |
|
|
| ssize_t oq_read |
( |
struct file * |
filp, |
|
|
char __user * |
buf, |
|
|
size_t |
count, |
|
|
loff_t * |
f_pos |
|
) |
|
|
| int oq_release |
( |
struct inode * |
inode, |
|
|
struct file * |
filp |
|
) |
|
|
| ssize_t oq_write |
( |
struct file * |
filp, |
|
|
const char __user * |
buf, |
|
|
size_t |
count, |
|
|
loff_t * |
f_pos |
|
) |
|
|
| int OQLOG |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
|
|
|
|
Definition at line 361 of file sim_if.c.
References avl_retrieve(), sensor_stats::id, ksensors, sensor_stats::rx_bytes, sensor_stats::rx_dropped, sensor_stats::rx_errors, sensor_stats::rx_overruns, ksensor::sensor, sensor_stats::tx_bytes, sensor_stats::tx_dropped, sensor_stats::tx_errors, and sensor_stats::tx_overruns. |
| void remove_node |
( |
unsigned int |
number |
) |
|
|
| void remove_sensor_entry |
( |
unsigned int |
number |
) |
|
|
| void shutdown_simulator_iface |
( |
void |
|
) |
|
|
|
|
Definition at line 811 of file sim_if.c.
References avl_find_min(), avlnode::element, khosts, ksensors, khost::list, khost::name, oq_dir, oq_hosts, remove_node(), remove_sensor_entry(), and simulation_on. |
Variable Documentation
|
|
Definition at line 57 of file oq.c. |
|