nmsg  0.9.0
logline.c
Go to the documentation of this file.
1 /* generic log line nmsg message module */
2 
3 /*
4  * Copyright (c) 2009 by Farsight Security, Inc.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 /* Import. */
20 
21 #include "logline.pb-c.h"
22 
23 /* Data. */
24 
25 struct nmsg_msgmod_field logline_fields[] = {
26  { .type = nmsg_msgmod_ft_string, .name = "category" },
27  { .type = nmsg_msgmod_ft_string, .name = "message" },
28  NMSG_MSGMOD_FIELD_END
29 };
30 
31 /* Export. */
32 
33 struct nmsg_msgmod_plugin nmsg_msgmod_ctx = {
34  NMSG_MSGMOD_REQUIRED_INIT,
35  .vendor = NMSG_VENDOR_BASE,
36  .msgtype = { NMSG_VENDOR_BASE_LOGLINE_ID, NMSG_VENDOR_BASE_LOGLINE_NAME },
37 
38  .pbdescr = &nmsg__base__log_line__descriptor,
39  .fields = logline_fields
40 };
41 
Structure exported by message modules to implement a new message type.
Protobuf byte array.
Definition: msgmod.h:84
Structure mapping protocol buffer schema fields to nmsg_msgmod_field_type values for "transparent" mo...
nmsg_msgmod_field_type type
Intended (nmsg) type of this protobuf field.