nmsg  0.9.0
ipconn.pb-c.c
1 /* Generated by the protocol buffer compiler. DO NOT EDIT! */
2 /* Generated from: nmsg/base/ipconn.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/ipconn.pb-c.h"
10 void nmsg__base__ipconn__init
11  (Nmsg__Base__IPConn *message)
12 {
13  static Nmsg__Base__IPConn init_value = NMSG__BASE__IPCONN__INIT;
14  *message = init_value;
15 }
16 size_t nmsg__base__ipconn__get_packed_size
17  (const Nmsg__Base__IPConn *message)
18 {
19  assert(message->base.descriptor == &nmsg__base__ipconn__descriptor);
20  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
21 }
22 size_t nmsg__base__ipconn__pack
23  (const Nmsg__Base__IPConn *message,
24  uint8_t *out)
25 {
26  assert(message->base.descriptor == &nmsg__base__ipconn__descriptor);
27  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
28 }
29 size_t nmsg__base__ipconn__pack_to_buffer
30  (const Nmsg__Base__IPConn *message,
31  ProtobufCBuffer *buffer)
32 {
33  assert(message->base.descriptor == &nmsg__base__ipconn__descriptor);
34  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
35 }
36 Nmsg__Base__IPConn *
37  nmsg__base__ipconn__unpack
38  (ProtobufCAllocator *allocator,
39  size_t len,
40  const uint8_t *data)
41 {
42  return (Nmsg__Base__IPConn *)
43  protobuf_c_message_unpack (&nmsg__base__ipconn__descriptor,
44  allocator, len, data);
45 }
46 void nmsg__base__ipconn__free_unpacked
47  (Nmsg__Base__IPConn *message,
48  ProtobufCAllocator *allocator)
49 {
50  assert(message->base.descriptor == &nmsg__base__ipconn__descriptor);
51  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
52 }
53 static const ProtobufCFieldDescriptor nmsg__base__ipconn__field_descriptors[5] =
54 {
55  {
56  "proto",
57  1,
58  PROTOBUF_C_LABEL_OPTIONAL,
59  PROTOBUF_C_TYPE_UINT32,
60  offsetof(Nmsg__Base__IPConn, has_proto),
61  offsetof(Nmsg__Base__IPConn, proto),
62  NULL,
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__IPConn, has_srcip),
73  offsetof(Nmsg__Base__IPConn, srcip),
74  NULL,
75  NULL,
76  0, /* flags */
77  0,NULL,NULL /* reserved1,reserved2, etc */
78  },
79  {
80  "srcport",
81  3,
82  PROTOBUF_C_LABEL_OPTIONAL,
83  PROTOBUF_C_TYPE_UINT32,
84  offsetof(Nmsg__Base__IPConn, has_srcport),
85  offsetof(Nmsg__Base__IPConn, srcport),
86  NULL,
87  NULL,
88  0, /* flags */
89  0,NULL,NULL /* reserved1,reserved2, etc */
90  },
91  {
92  "dstip",
93  4,
94  PROTOBUF_C_LABEL_OPTIONAL,
95  PROTOBUF_C_TYPE_BYTES,
96  offsetof(Nmsg__Base__IPConn, has_dstip),
97  offsetof(Nmsg__Base__IPConn, dstip),
98  NULL,
99  NULL,
100  0, /* flags */
101  0,NULL,NULL /* reserved1,reserved2, etc */
102  },
103  {
104  "dstport",
105  5,
106  PROTOBUF_C_LABEL_OPTIONAL,
107  PROTOBUF_C_TYPE_UINT32,
108  offsetof(Nmsg__Base__IPConn, has_dstport),
109  offsetof(Nmsg__Base__IPConn, dstport),
110  NULL,
111  NULL,
112  0, /* flags */
113  0,NULL,NULL /* reserved1,reserved2, etc */
114  },
115 };
116 static const unsigned nmsg__base__ipconn__field_indices_by_name[] = {
117  3, /* field[3] = dstip */
118  4, /* field[4] = dstport */
119  0, /* field[0] = proto */
120  1, /* field[1] = srcip */
121  2, /* field[2] = srcport */
122 };
123 static const ProtobufCIntRange nmsg__base__ipconn__number_ranges[1 + 1] =
124 {
125  { 1, 0 },
126  { 0, 5 }
127 };
128 const ProtobufCMessageDescriptor nmsg__base__ipconn__descriptor =
129 {
130  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
131  "nmsg.base.IPConn",
132  "IPConn",
133  "Nmsg__Base__IPConn",
134  "nmsg.base",
135  sizeof(Nmsg__Base__IPConn),
136  5,
137  nmsg__base__ipconn__field_descriptors,
138  nmsg__base__ipconn__field_indices_by_name,
139  1, nmsg__base__ipconn__number_ranges,
140  (ProtobufCMessageInit) nmsg__base__ipconn__init,
141  NULL,NULL,NULL /* reserved[123] */
142 };