[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit] Support for SIP protocol test
From: |
pierrick grasland |
Subject: |
[monit] Support for SIP protocol test |
Date: |
Thu, 8 Nov 2007 11:38:24 +0100 |
Hello,
Currently, i'm trying to create a new protocol test for SIP. For that, I have follow the steps as listed in protocols/NOTES, but monit doesn't seems to accept my protocol. I'm using monit
4.10.1, and also try with monit 4.9 .
monit -v validate prompt :
monit: Debug: Adding host allow 'localhost' (127.0.0.1).
monit: Debug: Adding net allow '
192.168.1.209'.
monit: Debug: Adding credentials for user 'admin'.
/home/pierrick/temp/bin/monitrc:59: Error: syntax error 'SIP'
I attached my configuration and my modify files (for monit
4.10.1), with a summary of change here.
I hope someone can show me a way to make this test correct.
Currently, I have modify p.y and l.l to obtain this configuration :
l.l :
adding :
sip { return SIP; }
under
pgsql { return PGSQL; }
------
p.y :
add SIP to the line %token SSH DWP LDAP2 LDAP3 RDATE RSYNC TNS PGSQL POSTFIXPOLICY
,
| PROTOCOL SIP {
portset.protocol= addprotocol(P_SIP);
}
in the part protocol,
and :
case P_SIP: return create_sip(); in the switch in "
static void *addprotocol(int protocol)"
I also modify protocol.h and protocol.c :
protocol.h :
adding :
#define P_SIP 23
void* create_sip();
int check_sip(Socket_T);
as needed
protocol.c :
static Protocol_T mysip= NULL; add in the #define list
FREE(mysip); add in gc_protocols()
void *create_sip() {
if(mysip == NULL) {
NEW(mysip);
mysip->name= "SIP";
mysip->check= check_sip;
}
return mysip;
}
as writen in NOTES.
Thank you for your help.
--
Grasland Pierrick
NEXCOM Systems
http://www.nexcom.fr
p.y
Description: Binary data
l.l
Description: Binary data
protocol.c
Description: Binary data
protocol.h
Description: Binary data
sip.c
Description: Binary data
monitrc
Description: Binary data
- [monit] Support for SIP protocol test,
pierrick grasland <=