Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

netmon.c File Reference

#include "model.h"
#include "mdnshandler.h"
#include "eventrxhandler.h"

Defines

#define INSERT_EVENT_KW(name, kw, val)
#define INSERT_INTEGER_KW(name, kw, val)
#define INSERT_KW(name, kw)
#define INSERT_STRING_KW(name, kw, val)

Functions

int32_t aw_model_netmon_add_probe_by_name (aw_model_t *model, aw_model_netmon_class_t handler_class, u_int32_t id, const byte_t *name, const byte_t *ip, u_int32_t port, const byte_t *proto, const byte_t *handler, u_int32_t timeout, u_int32_t cycle, const byte_t *handlercron, const byte_t *maintcron, u_int32_t perf)
 Add network monitoring service probe.

void aw_model_netmon_clear (aw_model_t *model)
 UNDO aw_model_netmon_init().

void aw_model_netmon_init (aw_model_t *model)
 Init all network monitoring (call this only 1 time!).

u_int32_t aw_model_netmon_is_disabled (aw_model_t *model)
 Test to see if network monitoring is running.

void aw_model_netmon_remove_probe (aw_model_t *model, aw_model_netmon_class_t handler_class, u_int32_t id)
 Stop all particular network monitoring probe.

void aw_model_netmon_restart (aw_model_t *model)
 Stop / start all network monitoring probes (if enabled).

void aw_model_netmon_start (aw_model_t *model)
 Start all network monitoring probes.

void aw_model_netmon_stop (aw_model_t *model)
 Stop all network monitoring probes.


Define Documentation

#define INSERT_EVENT_KW (  name,
kw,
val   ) 
 

Value:

{\
    INSERT_KW(name, kw); \
    name ## _val . value . type = AW_WIRE_EVENT_OBJ ; \
    name ## _val . value . obj . event = val ; \
 }

#define INSERT_INTEGER_KW (  name,
kw,
val   ) 
 

Value:

{\
    INSERT_KW(name, kw); \
    name ## _val . value . type = AW_WIRE_INUMBER_OBJ ; \
    name ## _val . value . obj . inumber = val ; \
 }

#define INSERT_KW (  name,
kw   ) 
 

Value:

{\
    memset( & (name ## _kw ), 0, sizeof( name ## _kw )); \
    name ## _kw . keyword = kw; \
    name ## _kw . next = prev_kw; prev_kw = &( name ## _kw ) ; /* push into list */\
    memset( & (name ## _val ), 0, sizeof( name ## _val )); \
    name ## _kw . values = &( name ## _val ); \
    kw_list = & name ## _kw; \
 }

#define INSERT_STRING_KW (  name,
kw,
val   ) 
 

Value:

{\
    INSERT_KW(name, kw); \
    name ## _val . value . type = AW_WIRE_STRING_OBJ ; \
    name ## _val . value . obj . string = val ; \
 }


Function Documentation

int32_t aw_model_netmon_add_probe_by_name (  aw_model_t *  model,
aw_model_netmon_class_t  handler_class,
u_int32_t  id,
const byte_t *  name,
const byte_t *  ip,
u_int32_t  port,
const byte_t *  proto,
const byte_t *  handler,
u_int32_t  timeout,
u_int32_t  cycle,
const byte_t *  handlercron,
const byte_t *  maintcron,
u_int32_t  perf
) 
 

Add network monitoring service probe.

aw_model_netmon_add_probe_by_name

Parameters:
model Model
handler_class Either AW_MODEL_INTERFACE_HANDLER or AW_MODEL_SERVICE_HANDLER
id Id in the database of service
name Name in database
ip IP address as string
port Port to probe
proto Protocol, 'tcp','udp'
handler Name of handler to use
timeout Timeout in seconds
cycle Cycle period in seconds
handlercron Cron string, if not empty then use as run schedule
maintcron Cron string
perf Non-zero if you want rrt performance monitoring
Returns:
Non-zero on error

void aw_model_netmon_clear (  aw_model_t *  model  ) 
 

UNDO aw_model_netmon_init().

aw_model_netmon_clear

Parameters:
model Model

void aw_model_netmon_init (  aw_model_t *  model  ) 
 

Init all network monitoring (call this only 1 time!).

aw_model_netmon_init

Parameters:
model Model

u_int32_t aw_model_netmon_is_disabled (  aw_model_t *  model  ) 
 

Test to see if network monitoring is running.

aw_model_netmon_is_disabled

Parameters:
model Model
Returns:
Non-zero if network monitoring is disabled

void aw_model_netmon_remove_probe (  aw_model_t *  model,
aw_model_netmon_class_t  handler_class,
u_int32_t  id
) 
 

Stop all particular network monitoring probe.

aw_model_netmon_remove_probe

Parameters:
model Model
handler_class Type of network monitor
id Id in database

void aw_model_netmon_restart (  aw_model_t *  model  ) 
 

Stop / start all network monitoring probes (if enabled).

aw_model_netmon_restart

Parameters:
model Model

void aw_model_netmon_start (  aw_model_t *  model  ) 
 

Start all network monitoring probes.

aw_model_netmon_start

Parameters:
model Model

void aw_model_netmon_stop (  aw_model_t *  model  ) 
 

Stop all network monitoring probes.

aw_model_netmon_stop

Parameters:
model Model

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)