nmsg  0.9.0
ipconn.c
Go to the documentation of this file.
1 /* ipconn 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 "ipconn.pb-c.h"
22 
23 /* Data. */
24 
25 struct nmsg_msgmod_field ipconn_fields[] = {
26  { .type = nmsg_msgmod_ft_uint16, .name = "proto" },
27  { .type = nmsg_msgmod_ft_ip, .name = "srcip" },
28  { .type = nmsg_msgmod_ft_uint16, .name = "srcport" },
29  { .type = nmsg_msgmod_ft_ip, .name = "dstip" },
30  { .type = nmsg_msgmod_ft_uint16, .name = "dstport" },
31  NMSG_MSGMOD_FIELD_END
32 };
33 
34 /* Export. */
35 
36 struct nmsg_msgmod_plugin nmsg_msgmod_ctx = {
37  NMSG_MSGMOD_REQUIRED_INIT,
38  .vendor = NMSG_VENDOR_BASE,
39  .msgtype = { NMSG_VENDOR_BASE_IPCONN_ID, NMSG_VENDOR_BASE_IPCONN_NAME },
40 
41  .pbdescr = &nmsg__base__ipconn__descriptor,
42  .fields = ipconn_fields
43 };
44 
Structure exported by message modules to implement a new message type.
Protobuf byte array.
Definition: msgmod.h:96
Structure mapping protocol buffer schema fields to nmsg_msgmod_field_type values for "transparent" mo...
Protobuf uint32.
Definition: msgmod.h:99
nmsg_msgmod_field_type type
Intended (nmsg) type of this protobuf field.