directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaspar Luethi <>
Subject Re: [mina] help with implementing a syslog server with mina
Date Thu, 12 Jan 2006 16:48:17 GMT
try the docs, it helps :)
looks like you never get more than 1 packet per message
(typically UDP max. packet size is > 1024).

The BSD Syslog Protocol
Reliable Delivery for syslog


4.1 syslog Message Parts

        The full format of a syslog message seen on the wire has three
        discernable parts.  The first part is called the PRI, the second part
        is the HEADER, and the third part is the MSG.  The total length of
        the packet MUST be 1024 bytes or less.

4.1.3 MSG Part of a syslog Packet

       The MSG part will fill the remainder of the syslog packet.  This will
       usually contain some additional information of the process that
       generated the message, and then the text of the message.  There is no
       ending delimiter to this part.

      If the relay adds a TIMESTAMP, or a TIMESTAMP and HOSTNAME, after the
      PRI part, then it MUST check that the total length of the packet is
      still 1024 bytes or less.  If the packet has been expanded beyond
      1024 bytes, then the relay MUST truncate the packet to be 1024 bytes.



>I am trying to implement a syslog server with mina.
>The syslog protocol sends the messages in UDP packets (1 UDP pachet
>/ message), messages are variable in size
>Mina creates one Iosession / UDP packet received.
>Since the syslog message size is not standard and for UDP transport
>Session open and close is not called (for IOProtocolAdapter) I
>cannot know when I have the complete message, since I assume the
>buffer can countain a partial UDP message Š
>Can anybody give me a hint how to implement this server?
>Right now I am trying to implement a MessageDecoder, but again I
>don't know when I have a complete message in the buffer !!!

View raw message