nmsg  0.11.2
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 
32 #define NMSG_VERSION 2U
33 
37 #define NMSG_HDRSZ 6
38 
42 #define NMSG_HDRLSZ_V2 10
43 
47 #define NMSG_LENHDRSZ_V1 2
48 
52 #define NMSG_LENHDRSZ_V2 4
53 
57 #define NMSG_PAYHDRSZ 64
58 
62 #define NMSG_WBUFSZ_MIN 512
63 
67 #define NMSG_WBUFSZ_MAX 1048576
68 
73 #define NMSG_WBUFSZ_JUMBO 8192
74 
79 #define NMSG_WBUFSZ_ETHER 1280
80 
86 #define NMSG_RBUFSZ (2 * NMSG_WBUFSZ_MAX)
87 
92 #define NMSG_RBUF_TIMEOUT 500
93 
97 #define NMSG_DEFAULT_SNAPLEN 1522
98 
102 #define NMSG_IPSZ_MAX 65536
103 
104 /* NMSG flags */
105 
109 #define NMSG_FLAG_ZLIB 0x01
110 
114 #define NMSG_FLAG_FRAGMENT 0x02
115 
116 #endif