added lwes-filter-listener
[lwes.git] / src / lwes_types.c
blobac874903790177557bc5637ea2bc6dacc37c5588
1 /*======================================================================*
2 * Copyright (C) 2008 Light Weight Event System *
3 * All rights reserved. *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
18 * Boston, MA 02110-1301 USA. *
19 *======================================================================*/
20 #include "lwes_types.h"
22 /* maximum datagram size for UDP is 64K minus IP layer overhead which is
23 20 bytes for IP header, and 8 bytes for UDP header, so this value
24 should be
26 65535 - 28 = 65507
28 const size_t MAX_MSG_SIZE = 65507;
29 const size_t MAX_QUEUED_ELEMENTS = 10000;
31 /* TODO: these really need to go away and be replaced with the type enumeration
32 in the header, until then they need to remain in-sync.
34 const LWES_BYTE LWES_UNDEFINED_TOKEN= (LWES_BYTE)0xff;
35 const LWES_BYTE LWES_U_INT_16_TOKEN = (LWES_BYTE)0x01;
36 const LWES_BYTE LWES_INT_16_TOKEN = (LWES_BYTE)0x02;
37 const LWES_BYTE LWES_U_INT_32_TOKEN = (LWES_BYTE)0x03;
38 const LWES_BYTE LWES_INT_32_TOKEN = (LWES_BYTE)0x04;
39 const LWES_BYTE LWES_STRING_TOKEN = (LWES_BYTE)0x05;
40 const LWES_BYTE LWES_IP_ADDR_TOKEN = (LWES_BYTE)0x06;
41 const LWES_BYTE LWES_INT_64_TOKEN = (LWES_BYTE)0x07;
42 const LWES_BYTE LWES_U_INT_64_TOKEN = (LWES_BYTE)0x08;
43 const LWES_BYTE LWES_BOOLEAN_TOKEN = (LWES_BYTE)0x09;
45 const LWES_SHORT_STRING LWES_UNDEFINED_STRING=(LWES_SHORT_STRING)"undef";
46 const LWES_SHORT_STRING LWES_U_INT_16_STRING =(LWES_SHORT_STRING)"uint16";
47 const LWES_SHORT_STRING LWES_INT_16_STRING =(LWES_SHORT_STRING)"int16";
48 const LWES_SHORT_STRING LWES_U_INT_32_STRING =(LWES_SHORT_STRING)"uint32";
49 const LWES_SHORT_STRING LWES_INT_32_STRING =(LWES_SHORT_STRING)"int32";
50 const LWES_SHORT_STRING LWES_STRING_STRING =(LWES_SHORT_STRING)"string";
51 const LWES_SHORT_STRING LWES_IP_ADDR_STRING =(LWES_SHORT_STRING)"ip_addr";
52 const LWES_SHORT_STRING LWES_INT_64_STRING =(LWES_SHORT_STRING)"int64";
53 const LWES_SHORT_STRING LWES_U_INT_64_STRING =(LWES_SHORT_STRING)"uint64";
54 const LWES_SHORT_STRING LWES_BOOLEAN_STRING =(LWES_SHORT_STRING)"boolean";
57 const LWES_SHORT_STRING LWES_META_INFO_STRING=(LWES_SHORT_STRING)"MetaEventInfo";