The Information Transport Module ables the communication beteween the user space and the kernel space.
Definition in file itm.c.
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <linux/version.h>
#include <linux/netdevice.h>
#include "include/itm.h"
#include "include/usi.h"
#include "compat.h"
#include "net80211/if_media.h"
#include "net80211/ieee80211_var.h"
#include "include/xian_proto.h"
Go to the source code of this file.
Defines | |
#define | GET_NODE_METRIC(_type, _func) |
#define | GET_METRIC(_type, _func) |
Functions | |
int | cross_layer_mod_init (void) |
Load Module. | |
void | cross_layer_mod_unload (void) |
UnLoad Module. | |
module_init (cross_layer_mod_init) | |
module_exit (cross_layer_mod_unload) | |
MODULE_DESCRIPTION ("XIAN - Information Transport Module - ITM") | |
MODULE_LICENSE ("GPL") |
#define GET_NODE_METRIC | ( | _type, | |||
_func | ) |
Value:
msg->type_metric = _type; \ switch (msg->type_metric) \ { \ case INT8: \ msg->metric.int8 = _func(mac_addr_converted, msg->dev_name, &(msg->id_error)); \ break; \ case INT32: \ msg->metric.int32 = _func(mac_addr_converted, msg->dev_name, &(msg->id_error)); \ break; \ case INT64: \ msg->metric.int64 = _func(mac_addr_converted, msg->dev_name, &(msg->id_error)); \ break; \ default : \ { \ msg->id_error = UNKNOW_METRIC; \ printk("Function GET_NODE_METRIC : Unknown Specified Metric.\n"); \ break; \ } \ } \ break; \
#define GET_METRIC | ( | _type, | |||
_func | ) |
Value:
msg->type_metric = _type; \ switch (msg->type_metric) \ { \ case INT8: \ msg->metric.int8 = _func(msg->dev_name, &(msg->id_error)); \ break; \ case INT32: \ msg->metric.int32 = _func(msg->dev_name, &(msg->id_error)); \ break; \ case INT64: \ msg->metric.int64 = _func(msg->dev_name, &(msg->id_error)); \ break; \ default : \ { \ msg->id_error = UNKNOW_METRIC; \ printk("Function GET_METRIC : Unknown Specified Metric.\n"); \ break; \ } \ } \ break;
int cross_layer_mod_init | ( | void | ) |
Load Module.
It allows to register a unix device with description of CROSS_LAYER_DEV_MAJOR, CROSS_LAYER_DEV_NAME, and file operations.
Definition at line 81 of file itm.c.
References CROSS_LAYER_DEV_MAJOR, and CROSS_LAYER_DEV_NAME.
void cross_layer_mod_unload | ( | void | ) |
UnLoad Module.
It allows to unregister an unix device with description of CROSS_LAYER_DEV_MAJOR, CROSS_LAYER_DEV_NAME.
Definition at line 136 of file itm.c.
References CROSS_LAYER_DEV_MAJOR, and CROSS_LAYER_DEV_NAME.
module_init | ( | cross_layer_mod_init | ) |
module_exit | ( | cross_layer_mod_unload | ) |
MODULE_DESCRIPTION | ( | "XIAN - Information Transport Module - ITM" | ) |
MODULE_LICENSE | ( | "GPL" | ) |