nmsg  1.0.1
constants.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008 by Farsight Security, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef NMSG_CONSTANTS_H
18 #define NMSG_CONSTANTS_H
19 
27 #define NMSG_MAGIC {'N', 'M', 'S', 'G'}
28 
35 #define NMSG_VERSION 2U
36 #define NMSG_PROTOCOL_VERSION NMSG_VERSION
37 
41 #define NMSG_HDRSZ 6
42 
46 #define NMSG_HDRLSZ_V2 10
47 
51 #define NMSG_LENHDRSZ_V1 2
52 
56 #define NMSG_LENHDRSZ_V2 4
57 
61 #define NMSG_PAYHDRSZ 64
62 
66 #define NMSG_WBUFSZ_MIN 512
67 
71 #define NMSG_WBUFSZ_MAX 1048576
72 
77 #define NMSG_WBUFSZ_JUMBO 8192
78 
83 #define NMSG_WBUFSZ_ETHER 1280
84 
90 #define NMSG_RBUFSZ (2 * NMSG_WBUFSZ_MAX)
91 
96 #define NMSG_RBUF_TIMEOUT 500
97 
101 #define NMSG_DEFAULT_SNAPLEN 1522
102 
106 #define NMSG_IPSZ_MAX 65536
107 
108 /* NMSG flags */
109 
113 #define NMSG_FLAG_ZLIB 0x01
114 
118 #define NMSG_FLAG_FRAGMENT 0x02
119 
120 #endif