[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom protocol testing with UDP
From: |
Einar S. Idsø |
Subject: |
Re: Custom protocol testing with UDP |
Date: |
Tue, 19 Jul 2005 17:14:20 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.5 (X11/20050711) |
Christian Hopp wrote:
> On Mon, 18 Jul 2005, "Einar S. Idsø" wrote:
>
> Hi!
>
>> I recently tried to make a custom protocol testing of a UDP port using
>> the send/receive construct, but it kept failing with the following
>> logged error:
>>
>> GENERIC: receiving unexpected data [\]
>
> This error message means that the received string "\" and your pattern
> do not match. That also mean that you have received some thing. What
> kind of protocol are you trying to match? Is there really a "\" in it?
I am trying to match the Gamespy protocol used by Battlefield 2. The
output goes like this:
$ echo "\xfe" | nc -w 1 -u 81.166.125.5 29900
\hostname\Battlefield.no #1 All maps\gamename\[ANDSOFORTH]
>> Even with receive set to ".*" it failed, and that's when I went to the
>> manual for help...
>
> Well this should always match. (:
>
> Are you sure that your monit is compiled with regex support? What OS
> are you using with it? Maybe a problem of the regex-lib?
Ah, maybe that's where the problem lies? I use Gentoo, and the USE-flags
are set like this:
---------------
$ nice emerge -pv monit
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] app-admin/monit-4.5.1 +ssl 0 kB
---------------
Perhaps it by default doesn't compile with regex-support? Looking at the
ebuild, there is no mention of regexp whatsoever. On the other hand:
Looking at the README, there is no mention of regex-support either. What
must I do to enable regex?
Also, are you sure that send/receive does work with the UDP protocol, as
opposed to what the manual states? If so, then you have most likely
pointed me towards the solution. :)
Thanks,
Einar