Functions | Variables
conf.c File Reference
#include "config/compiler.h"
#include "core/include/global.h"
#include <linux/version.h>
#include <linux/proc_fs.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <asm/uaccess.h>
#include "conf.h"
Include dependency graph for conf.c:

Go to the source code of this file.

Functions

int __getPortConf (tpPortConf *portConf, u16 port, signed char *priority, tpTraffic *traffic)
void asign_port (tpPortConf *portConf, u16 number, signed char priority, tpTraffic traffic, int type)
void asignConfICMP (tpPortConfICMP *portConf, signed char priority, tpTraffic traffic)
int conf_close_proc (tpConfig *conf)
int conf_init_proc (void)
int f_port_read (char *page, char **start, off_t off, int count, int *eof, void *data)
int f_port_write (struct file *f, const char __user *buff, unsigned long len, void *data)
int getConfICMP (tpConfig *conf, signed char *priority, tpTraffic *traffic)
int getPortConf (tpConfig *conf, tpProto proto, tpDir dir, u16 port, signed char *priority, tpTraffic *traffic)
int readConfig (tpConfig *conf)

Variables

static struct proc_dir_entry * directory

Function Documentation

int __getPortConf ( tpPortConf portConf,
u16  port,
signed char *  priority,
tpTraffic traffic 
)

Definition at line 255 of file conf.c.

void asign_port ( tpPortConf portConf,
u16  number,
signed char  priority,
tpTraffic  traffic,
int  type 
)

If there is space left in 'portConf' for another port, stores the configuration (priority and type of traffic) for the port 'number' If 'number' is 0, the configuration is used for every port

Definition at line 108 of file conf.c.

void asignConfICMP ( tpPortConfICMP portConf,
signed char  priority,
tpTraffic  traffic 
)

Stores 'priority' and 'traffic' as configuration in 'portConf'

Definition at line 152 of file conf.c.

int conf_close_proc ( tpConfig conf)

Definition at line 50 of file conf.c.

int conf_init_proc ( void  )

Definition at line 38 of file conf.c.

int f_port_read ( char *  page,
char **  start,
off_t  off,
int  count,
int *  eof,
void *  data 
)

Definition at line 71 of file conf.c.

int f_port_write ( struct file *  f,
const char __user *  buff,
unsigned long  len,
void *  data 
)

Definition at line 84 of file conf.c.

int getConfICMP ( tpConfig conf,
signed char *  priority,
tpTraffic traffic 
)

Returns TRUE only if there is a configuration for ICMP in 'conf' The priority and the type of traffic for ICMP are assigned to 'priority' and 'traffic'

Definition at line 296 of file conf.c.

int getPortConf ( tpConfig conf,
tpProto  proto,
tpDir  dir,
u16  port,
signed char *  priority,
tpTraffic traffic 
)

Returns TRUE only if the given port has a configuration in 'conf' for the given protocol and the given direction The priority and the type of traffic are assigned to 'priority' and 'traffic'

Definition at line 273 of file conf.c.

int readConfig ( tpConfig conf)

Reads the configuration from the file and stores it in 'conf'

Definition at line 162 of file conf.c.


Variable Documentation

struct proc_dir_entry* directory [static]

Definition at line 35 of file conf.c.



ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Mon Oct 6 2014 08:27:12