nmsg  0.9.0
http.pb-c.c
1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: nmsg/base/http.proto */
3 
4 /* Do not generate deprecated warnings for self */
5 #ifndef PROTOBUF_C__NO_DEPRECATED
6 #define PROTOBUF_C__NO_DEPRECATED
7 #endif
8 
9 #include "nmsg/base/http.pb-c.h"
10 void nmsg__base__http__init
11  (Nmsg__Base__Http *message)
12 {
13  static Nmsg__Base__Http init_value = NMSG__BASE__HTTP__INIT;
14  *message = init_value;
15 }
16 size_t nmsg__base__http__get_packed_size
17  (const Nmsg__Base__Http *message)
18 {
19  assert(message->base.descriptor == &nmsg__base__http__descriptor);
20  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
21 }
22 size_t nmsg__base__http__pack
23  (const Nmsg__Base__Http *message,
24  uint8_t *out)
25 {
26  assert(message->base.descriptor == &nmsg__base__http__descriptor);
27  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
28 }
29 size_t nmsg__base__http__pack_to_buffer
30  (const Nmsg__Base__Http *message,
31  ProtobufCBuffer *buffer)
32 {
33  assert(message->base.descriptor == &nmsg__base__http__descriptor);
34  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
35 }
36 Nmsg__Base__Http *
37  nmsg__base__http__unpack
38  (ProtobufCAllocator *allocator,
39  size_t len,
40  const uint8_t *data)
41 {
42  return (Nmsg__Base__Http *)
43  protobuf_c_message_unpack (&nmsg__base__http__descriptor,
44  allocator, len, data);
45 }
46 void nmsg__base__http__free_unpacked
47  (Nmsg__Base__Http *message,
48  ProtobufCAllocator *allocator)
49 {
50  assert(message->base.descriptor == &nmsg__base__http__descriptor);
51  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
52 }
53 static const ProtobufCFieldDescriptor nmsg__base__http__field_descriptors[18] =
54 {
55  {
56  "type",
57  1,
58  PROTOBUF_C_LABEL_REQUIRED,
59  PROTOBUF_C_TYPE_ENUM,
60  0, /* quantifier_offset */
61  offsetof(Nmsg__Base__Http, type),
62  &nmsg__base__http_type__descriptor,
63  NULL,
64  0, /* flags */
65  0,NULL,NULL /* reserved1,reserved2, etc */
66  },
67  {
68  "srcip",
69  2,
70  PROTOBUF_C_LABEL_OPTIONAL,
71  PROTOBUF_C_TYPE_BYTES,
72  offsetof(Nmsg__Base__Http, has_srcip),
73  offsetof(Nmsg__Base__Http, srcip),
74  NULL,
75  NULL,
76  0, /* flags */
77  0,NULL,NULL /* reserved1,reserved2, etc */
78  },
79  {
80  "srchost",
81  3,
82  PROTOBUF_C_LABEL_OPTIONAL,
83  PROTOBUF_C_TYPE_BYTES,
84  offsetof(Nmsg__Base__Http, has_srchost),
85  offsetof(Nmsg__Base__Http, srchost),
86  NULL,
87  NULL,
88  0, /* flags */
89  0,NULL,NULL /* reserved1,reserved2, etc */
90  },
91  {
92  "srcport",
93  4,
94  PROTOBUF_C_LABEL_OPTIONAL,
95  PROTOBUF_C_TYPE_UINT32,
96  offsetof(Nmsg__Base__Http, has_srcport),
97  offsetof(Nmsg__Base__Http, srcport),
98  NULL,
99  NULL,
100  0, /* flags */
101  0,NULL,NULL /* reserved1,reserved2, etc */
102  },
103  {
104  "dstip",
105  5,
106  PROTOBUF_C_LABEL_OPTIONAL,
107  PROTOBUF_C_TYPE_BYTES,
108  offsetof(Nmsg__Base__Http, has_dstip),
109  offsetof(Nmsg__Base__Http, dstip),
110  NULL,
111  NULL,
112  0, /* flags */
113  0,NULL,NULL /* reserved1,reserved2, etc */
114  },
115  {
116  "dstport",
117  6,
118  PROTOBUF_C_LABEL_OPTIONAL,
119  PROTOBUF_C_TYPE_UINT32,
120  offsetof(Nmsg__Base__Http, has_dstport),
121  offsetof(Nmsg__Base__Http, dstport),
122  NULL,
123  NULL,
124  0, /* flags */
125  0,NULL,NULL /* reserved1,reserved2, etc */
126  },
127  {
128  "request",
129  7,
130  PROTOBUF_C_LABEL_OPTIONAL,
131  PROTOBUF_C_TYPE_BYTES,
132  offsetof(Nmsg__Base__Http, has_request),
133  offsetof(Nmsg__Base__Http, request),
134  NULL,
135  NULL,
136  0, /* flags */
137  0,NULL,NULL /* reserved1,reserved2, etc */
138  },
139  {
140  "p0f_genre",
141  65,
142  PROTOBUF_C_LABEL_OPTIONAL,
143  PROTOBUF_C_TYPE_BYTES,
144  offsetof(Nmsg__Base__Http, has_p0f_genre),
145  offsetof(Nmsg__Base__Http, p0f_genre),
146  NULL,
147  NULL,
148  0, /* flags */
149  0,NULL,NULL /* reserved1,reserved2, etc */
150  },
151  {
152  "p0f_detail",
153  66,
154  PROTOBUF_C_LABEL_OPTIONAL,
155  PROTOBUF_C_TYPE_BYTES,
156  offsetof(Nmsg__Base__Http, has_p0f_detail),
157  offsetof(Nmsg__Base__Http, p0f_detail),
158  NULL,
159  NULL,
160  0, /* flags */
161  0,NULL,NULL /* reserved1,reserved2, etc */
162  },
163  {
164  "p0f_dist",
165  67,
166  PROTOBUF_C_LABEL_OPTIONAL,
167  PROTOBUF_C_TYPE_INT32,
168  offsetof(Nmsg__Base__Http, has_p0f_dist),
169  offsetof(Nmsg__Base__Http, p0f_dist),
170  NULL,
171  NULL,
172  0, /* flags */
173  0,NULL,NULL /* reserved1,reserved2, etc */
174  },
175  {
176  "p0f_link",
177  68,
178  PROTOBUF_C_LABEL_OPTIONAL,
179  PROTOBUF_C_TYPE_BYTES,
180  offsetof(Nmsg__Base__Http, has_p0f_link),
181  offsetof(Nmsg__Base__Http, p0f_link),
182  NULL,
183  NULL,
184  0, /* flags */
185  0,NULL,NULL /* reserved1,reserved2, etc */
186  },
187  {
188  "p0f_tos",
189  69,
190  PROTOBUF_C_LABEL_OPTIONAL,
191  PROTOBUF_C_TYPE_BYTES,
192  offsetof(Nmsg__Base__Http, has_p0f_tos),
193  offsetof(Nmsg__Base__Http, p0f_tos),
194  NULL,
195  NULL,
196  0, /* flags */
197  0,NULL,NULL /* reserved1,reserved2, etc */
198  },
199  {
200  "p0f_fw",
201  70,
202  PROTOBUF_C_LABEL_OPTIONAL,
203  PROTOBUF_C_TYPE_UINT32,
204  offsetof(Nmsg__Base__Http, has_p0f_fw),
205  offsetof(Nmsg__Base__Http, p0f_fw),
206  NULL,
207  NULL,
208  0, /* flags */
209  0,NULL,NULL /* reserved1,reserved2, etc */
210  },
211  {
212  "p0f_nat",
213  71,
214  PROTOBUF_C_LABEL_OPTIONAL,
215  PROTOBUF_C_TYPE_UINT32,
216  offsetof(Nmsg__Base__Http, has_p0f_nat),
217  offsetof(Nmsg__Base__Http, p0f_nat),
218  NULL,
219  NULL,
220  0, /* flags */
221  0,NULL,NULL /* reserved1,reserved2, etc */
222  },
223  {
224  "p0f_real",
225  72,
226  PROTOBUF_C_LABEL_OPTIONAL,
227  PROTOBUF_C_TYPE_UINT32,
228  offsetof(Nmsg__Base__Http, has_p0f_real),
229  offsetof(Nmsg__Base__Http, p0f_real),
230  NULL,
231  NULL,
232  0, /* flags */
233  0,NULL,NULL /* reserved1,reserved2, etc */
234  },
235  {
236  "p0f_score",
237  73,
238  PROTOBUF_C_LABEL_OPTIONAL,
239  PROTOBUF_C_TYPE_INT32,
240  offsetof(Nmsg__Base__Http, has_p0f_score),
241  offsetof(Nmsg__Base__Http, p0f_score),
242  NULL,
243  NULL,
244  0, /* flags */
245  0,NULL,NULL /* reserved1,reserved2, etc */
246  },
247  {
248  "p0f_mflags",
249  74,
250  PROTOBUF_C_LABEL_OPTIONAL,
251  PROTOBUF_C_TYPE_UINT32,
252  offsetof(Nmsg__Base__Http, has_p0f_mflags),
253  offsetof(Nmsg__Base__Http, p0f_mflags),
254  NULL,
255  NULL,
256  0, /* flags */
257  0,NULL,NULL /* reserved1,reserved2, etc */
258  },
259  {
260  "p0f_uptime",
261  75,
262  PROTOBUF_C_LABEL_OPTIONAL,
263  PROTOBUF_C_TYPE_INT32,
264  offsetof(Nmsg__Base__Http, has_p0f_uptime),
265  offsetof(Nmsg__Base__Http, p0f_uptime),
266  NULL,
267  NULL,
268  0, /* flags */
269  0,NULL,NULL /* reserved1,reserved2, etc */
270  },
271 };
272 static const unsigned nmsg__base__http__field_indices_by_name[] = {
273  4, /* field[4] = dstip */
274  5, /* field[5] = dstport */
275  8, /* field[8] = p0f_detail */
276  9, /* field[9] = p0f_dist */
277  12, /* field[12] = p0f_fw */
278  7, /* field[7] = p0f_genre */
279  10, /* field[10] = p0f_link */
280  16, /* field[16] = p0f_mflags */
281  13, /* field[13] = p0f_nat */
282  14, /* field[14] = p0f_real */
283  15, /* field[15] = p0f_score */
284  11, /* field[11] = p0f_tos */
285  17, /* field[17] = p0f_uptime */
286  6, /* field[6] = request */
287  2, /* field[2] = srchost */
288  1, /* field[1] = srcip */
289  3, /* field[3] = srcport */
290  0, /* field[0] = type */
291 };
292 static const ProtobufCIntRange nmsg__base__http__number_ranges[2 + 1] =
293 {
294  { 1, 0 },
295  { 65, 7 },
296  { 0, 18 }
297 };
298 const ProtobufCMessageDescriptor nmsg__base__http__descriptor =
299 {
300  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
301  "nmsg.base.Http",
302  "Http",
303  "Nmsg__Base__Http",
304  "nmsg.base",
305  sizeof(Nmsg__Base__Http),
306  18,
307  nmsg__base__http__field_descriptors,
308  nmsg__base__http__field_indices_by_name,
309  2, nmsg__base__http__number_ranges,
310  (ProtobufCMessageInit) nmsg__base__http__init,
311  NULL,NULL,NULL /* reserved[123] */
312 };
313 const ProtobufCEnumValue nmsg__base__http_type__enum_values_by_number[2] =
314 {
315  { "unknown", "NMSG__BASE__HTTP_TYPE__unknown", 0 },
316  { "sinkhole", "NMSG__BASE__HTTP_TYPE__sinkhole", 1 },
317 };
318 static const ProtobufCIntRange nmsg__base__http_type__value_ranges[] = {
319 {0, 0},{0, 2}
320 };
321 const ProtobufCEnumValueIndex nmsg__base__http_type__enum_values_by_name[2] =
322 {
323  { "sinkhole", 1 },
324  { "unknown", 0 },
325 };
326 const ProtobufCEnumDescriptor nmsg__base__http_type__descriptor =
327 {
328  PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
329  "nmsg.base.HttpType",
330  "HttpType",
331  "Nmsg__Base__HttpType",
332  "nmsg.base",
333  2,
334  nmsg__base__http_type__enum_values_by_number,
335  2,
336  nmsg__base__http_type__enum_values_by_name,
337  1,
338  nmsg__base__http_type__value_ranges,
339  NULL,NULL,NULL,NULL /* reserved[1234] */
340 };
nmsg_msgmod_type type
Module type.