1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/ftrace/tcp.proto
3 
4 #include "protos/perfetto/trace/ftrace/tcp.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
TcpRetransmitSkbFtraceEvent(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR TcpRetransmitSkbFtraceEvent::TcpRetransmitSkbFtraceEvent(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.daddr_)*/0u
28   , /*decltype(_impl_.dport_)*/0u
29   , /*decltype(_impl_.skaddr_)*/::uint64_t{0u}
30   , /*decltype(_impl_.saddr_)*/0u
31   , /*decltype(_impl_.sport_)*/0u
32   , /*decltype(_impl_.skbaddr_)*/::uint64_t{0u}
33   , /*decltype(_impl_.state_)*/0} {}
34 struct TcpRetransmitSkbFtraceEventDefaultTypeInternal {
TcpRetransmitSkbFtraceEventDefaultTypeInternalperfetto::protos::TcpRetransmitSkbFtraceEventDefaultTypeInternal35   PROTOBUF_CONSTEXPR TcpRetransmitSkbFtraceEventDefaultTypeInternal()
36       : _instance(::_pbi::ConstantInitialized{}) {}
~TcpRetransmitSkbFtraceEventDefaultTypeInternalperfetto::protos::TcpRetransmitSkbFtraceEventDefaultTypeInternal37   ~TcpRetransmitSkbFtraceEventDefaultTypeInternal() {}
38   union {  // NOLINT(misc-non-private-member-variables-in-classes)
39     TcpRetransmitSkbFtraceEvent _instance;
40   };
41 };
42 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TcpRetransmitSkbFtraceEventDefaultTypeInternal _TcpRetransmitSkbFtraceEvent_default_instance_;
43 }  // namespace protos
44 }  // namespace perfetto
45 namespace perfetto {
46 namespace protos {
47 
48 // ===================================================================
49 
50 class TcpRetransmitSkbFtraceEvent::_Internal {
51  public:
52   using HasBits = decltype(std::declval<TcpRetransmitSkbFtraceEvent>()._impl_._has_bits_);
set_has_daddr(HasBits * has_bits)53   static void set_has_daddr(HasBits* has_bits) {
54     (*has_bits)[0] |= 1u;
55   }
set_has_dport(HasBits * has_bits)56   static void set_has_dport(HasBits* has_bits) {
57     (*has_bits)[0] |= 2u;
58   }
set_has_saddr(HasBits * has_bits)59   static void set_has_saddr(HasBits* has_bits) {
60     (*has_bits)[0] |= 8u;
61   }
set_has_skaddr(HasBits * has_bits)62   static void set_has_skaddr(HasBits* has_bits) {
63     (*has_bits)[0] |= 4u;
64   }
set_has_skbaddr(HasBits * has_bits)65   static void set_has_skbaddr(HasBits* has_bits) {
66     (*has_bits)[0] |= 32u;
67   }
set_has_sport(HasBits * has_bits)68   static void set_has_sport(HasBits* has_bits) {
69     (*has_bits)[0] |= 16u;
70   }
set_has_state(HasBits * has_bits)71   static void set_has_state(HasBits* has_bits) {
72     (*has_bits)[0] |= 64u;
73   }
74 };
75 
TcpRetransmitSkbFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)76 TcpRetransmitSkbFtraceEvent::TcpRetransmitSkbFtraceEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
77                          bool is_message_owned)
78   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
79   SharedCtor(arena, is_message_owned);
80   // @@protoc_insertion_point(arena_constructor:perfetto.protos.TcpRetransmitSkbFtraceEvent)
81 }
TcpRetransmitSkbFtraceEvent(const TcpRetransmitSkbFtraceEvent & from)82 TcpRetransmitSkbFtraceEvent::TcpRetransmitSkbFtraceEvent(const TcpRetransmitSkbFtraceEvent& from)
83   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
84   TcpRetransmitSkbFtraceEvent* const _this = this; (void)_this;
85   new (&_impl_) Impl_{
86       decltype(_impl_._has_bits_){from._impl_._has_bits_}
87     , /*decltype(_impl_._cached_size_)*/{}
88     , decltype(_impl_.daddr_){}
89     , decltype(_impl_.dport_){}
90     , decltype(_impl_.skaddr_){}
91     , decltype(_impl_.saddr_){}
92     , decltype(_impl_.sport_){}
93     , decltype(_impl_.skbaddr_){}
94     , decltype(_impl_.state_){}};
95 
96   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
97   ::memcpy(&_impl_.daddr_, &from._impl_.daddr_,
98     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.state_) -
99     reinterpret_cast<char*>(&_impl_.daddr_)) + sizeof(_impl_.state_));
100   // @@protoc_insertion_point(copy_constructor:perfetto.protos.TcpRetransmitSkbFtraceEvent)
101 }
102 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)103 inline void TcpRetransmitSkbFtraceEvent::SharedCtor(
104     ::_pb::Arena* arena, bool is_message_owned) {
105   (void)arena;
106   (void)is_message_owned;
107   new (&_impl_) Impl_{
108       decltype(_impl_._has_bits_){}
109     , /*decltype(_impl_._cached_size_)*/{}
110     , decltype(_impl_.daddr_){0u}
111     , decltype(_impl_.dport_){0u}
112     , decltype(_impl_.skaddr_){::uint64_t{0u}}
113     , decltype(_impl_.saddr_){0u}
114     , decltype(_impl_.sport_){0u}
115     , decltype(_impl_.skbaddr_){::uint64_t{0u}}
116     , decltype(_impl_.state_){0}
117   };
118 }
119 
~TcpRetransmitSkbFtraceEvent()120 TcpRetransmitSkbFtraceEvent::~TcpRetransmitSkbFtraceEvent() {
121   // @@protoc_insertion_point(destructor:perfetto.protos.TcpRetransmitSkbFtraceEvent)
122   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
123   (void)arena;
124     return;
125   }
126   SharedDtor();
127 }
128 
SharedDtor()129 inline void TcpRetransmitSkbFtraceEvent::SharedDtor() {
130   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
131 }
132 
SetCachedSize(int size) const133 void TcpRetransmitSkbFtraceEvent::SetCachedSize(int size) const {
134   _impl_._cached_size_.Set(size);
135 }
136 
Clear()137 void TcpRetransmitSkbFtraceEvent::Clear() {
138 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TcpRetransmitSkbFtraceEvent)
139   ::uint32_t cached_has_bits = 0;
140   // Prevent compiler warnings about cached_has_bits being unused
141   (void) cached_has_bits;
142 
143   cached_has_bits = _impl_._has_bits_[0];
144   if (cached_has_bits & 0x0000007fu) {
145     ::memset(&_impl_.daddr_, 0, static_cast<size_t>(
146         reinterpret_cast<char*>(&_impl_.state_) -
147         reinterpret_cast<char*>(&_impl_.daddr_)) + sizeof(_impl_.state_));
148   }
149   _impl_._has_bits_.Clear();
150   _internal_metadata_.Clear<std::string>();
151 }
152 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)153 const char* TcpRetransmitSkbFtraceEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
154 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
155   _Internal::HasBits has_bits{};
156   while (!ctx->Done(&ptr)) {
157     ::uint32_t tag;
158     ptr = ::_pbi::ReadTag(ptr, &tag);
159     switch (tag >> 3) {
160       // optional uint32 daddr = 1;
161       case 1:
162         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
163           _Internal::set_has_daddr(&has_bits);
164           _impl_.daddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
165           CHK_(ptr);
166         } else {
167           goto handle_unusual;
168         }
169         continue;
170       // optional uint32 dport = 2;
171       case 2:
172         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
173           _Internal::set_has_dport(&has_bits);
174           _impl_.dport_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
175           CHK_(ptr);
176         } else {
177           goto handle_unusual;
178         }
179         continue;
180       // optional uint32 saddr = 3;
181       case 3:
182         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
183           _Internal::set_has_saddr(&has_bits);
184           _impl_.saddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
185           CHK_(ptr);
186         } else {
187           goto handle_unusual;
188         }
189         continue;
190       // optional uint64 skaddr = 4;
191       case 4:
192         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
193           _Internal::set_has_skaddr(&has_bits);
194           _impl_.skaddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
195           CHK_(ptr);
196         } else {
197           goto handle_unusual;
198         }
199         continue;
200       // optional uint64 skbaddr = 5;
201       case 5:
202         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
203           _Internal::set_has_skbaddr(&has_bits);
204           _impl_.skbaddr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
205           CHK_(ptr);
206         } else {
207           goto handle_unusual;
208         }
209         continue;
210       // optional uint32 sport = 6;
211       case 6:
212         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
213           _Internal::set_has_sport(&has_bits);
214           _impl_.sport_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
215           CHK_(ptr);
216         } else {
217           goto handle_unusual;
218         }
219         continue;
220       // optional int32 state = 7;
221       case 7:
222         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
223           _Internal::set_has_state(&has_bits);
224           _impl_.state_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
225           CHK_(ptr);
226         } else {
227           goto handle_unusual;
228         }
229         continue;
230       default:
231         goto handle_unusual;
232     }  // switch
233   handle_unusual:
234     if ((tag == 0) || ((tag & 7) == 4)) {
235       CHK_(ptr);
236       ctx->SetLastTag(tag);
237       goto message_done;
238     }
239     ptr = UnknownFieldParse(
240         tag,
241         _internal_metadata_.mutable_unknown_fields<std::string>(),
242         ptr, ctx);
243     CHK_(ptr != nullptr);
244   }  // while
245 message_done:
246   _impl_._has_bits_.Or(has_bits);
247   return ptr;
248 failure:
249   ptr = nullptr;
250   goto message_done;
251 #undef CHK_
252 }
253 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const254 ::uint8_t* TcpRetransmitSkbFtraceEvent::_InternalSerialize(
255     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
256   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TcpRetransmitSkbFtraceEvent)
257   ::uint32_t cached_has_bits = 0;
258   (void) cached_has_bits;
259 
260   cached_has_bits = _impl_._has_bits_[0];
261   // optional uint32 daddr = 1;
262   if (cached_has_bits & 0x00000001u) {
263     target = stream->EnsureSpace(target);
264     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_daddr(), target);
265   }
266 
267   // optional uint32 dport = 2;
268   if (cached_has_bits & 0x00000002u) {
269     target = stream->EnsureSpace(target);
270     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_dport(), target);
271   }
272 
273   // optional uint32 saddr = 3;
274   if (cached_has_bits & 0x00000008u) {
275     target = stream->EnsureSpace(target);
276     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_saddr(), target);
277   }
278 
279   // optional uint64 skaddr = 4;
280   if (cached_has_bits & 0x00000004u) {
281     target = stream->EnsureSpace(target);
282     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_skaddr(), target);
283   }
284 
285   // optional uint64 skbaddr = 5;
286   if (cached_has_bits & 0x00000020u) {
287     target = stream->EnsureSpace(target);
288     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_skbaddr(), target);
289   }
290 
291   // optional uint32 sport = 6;
292   if (cached_has_bits & 0x00000010u) {
293     target = stream->EnsureSpace(target);
294     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_sport(), target);
295   }
296 
297   // optional int32 state = 7;
298   if (cached_has_bits & 0x00000040u) {
299     target = stream->EnsureSpace(target);
300     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_state(), target);
301   }
302 
303   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
304     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
305         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
306   }
307   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TcpRetransmitSkbFtraceEvent)
308   return target;
309 }
310 
ByteSizeLong() const311 size_t TcpRetransmitSkbFtraceEvent::ByteSizeLong() const {
312 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TcpRetransmitSkbFtraceEvent)
313   size_t total_size = 0;
314 
315   ::uint32_t cached_has_bits = 0;
316   // Prevent compiler warnings about cached_has_bits being unused
317   (void) cached_has_bits;
318 
319   cached_has_bits = _impl_._has_bits_[0];
320   if (cached_has_bits & 0x0000007fu) {
321     // optional uint32 daddr = 1;
322     if (cached_has_bits & 0x00000001u) {
323       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_daddr());
324     }
325 
326     // optional uint32 dport = 2;
327     if (cached_has_bits & 0x00000002u) {
328       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dport());
329     }
330 
331     // optional uint64 skaddr = 4;
332     if (cached_has_bits & 0x00000004u) {
333       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_skaddr());
334     }
335 
336     // optional uint32 saddr = 3;
337     if (cached_has_bits & 0x00000008u) {
338       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_saddr());
339     }
340 
341     // optional uint32 sport = 6;
342     if (cached_has_bits & 0x00000010u) {
343       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_sport());
344     }
345 
346     // optional uint64 skbaddr = 5;
347     if (cached_has_bits & 0x00000020u) {
348       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_skbaddr());
349     }
350 
351     // optional int32 state = 7;
352     if (cached_has_bits & 0x00000040u) {
353       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_state());
354     }
355 
356   }
357   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
358     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
359   }
360   int cached_size = ::_pbi::ToCachedSize(total_size);
361   SetCachedSize(cached_size);
362   return total_size;
363 }
364 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)365 void TcpRetransmitSkbFtraceEvent::CheckTypeAndMergeFrom(
366     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
367   MergeFrom(*::_pbi::DownCast<const TcpRetransmitSkbFtraceEvent*>(
368       &from));
369 }
370 
MergeFrom(const TcpRetransmitSkbFtraceEvent & from)371 void TcpRetransmitSkbFtraceEvent::MergeFrom(const TcpRetransmitSkbFtraceEvent& from) {
372   TcpRetransmitSkbFtraceEvent* const _this = this;
373   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TcpRetransmitSkbFtraceEvent)
374   GOOGLE_DCHECK_NE(&from, _this);
375   ::uint32_t cached_has_bits = 0;
376   (void) cached_has_bits;
377 
378   cached_has_bits = from._impl_._has_bits_[0];
379   if (cached_has_bits & 0x0000007fu) {
380     if (cached_has_bits & 0x00000001u) {
381       _this->_impl_.daddr_ = from._impl_.daddr_;
382     }
383     if (cached_has_bits & 0x00000002u) {
384       _this->_impl_.dport_ = from._impl_.dport_;
385     }
386     if (cached_has_bits & 0x00000004u) {
387       _this->_impl_.skaddr_ = from._impl_.skaddr_;
388     }
389     if (cached_has_bits & 0x00000008u) {
390       _this->_impl_.saddr_ = from._impl_.saddr_;
391     }
392     if (cached_has_bits & 0x00000010u) {
393       _this->_impl_.sport_ = from._impl_.sport_;
394     }
395     if (cached_has_bits & 0x00000020u) {
396       _this->_impl_.skbaddr_ = from._impl_.skbaddr_;
397     }
398     if (cached_has_bits & 0x00000040u) {
399       _this->_impl_.state_ = from._impl_.state_;
400     }
401     _this->_impl_._has_bits_[0] |= cached_has_bits;
402   }
403   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
404 }
405 
CopyFrom(const TcpRetransmitSkbFtraceEvent & from)406 void TcpRetransmitSkbFtraceEvent::CopyFrom(const TcpRetransmitSkbFtraceEvent& from) {
407 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TcpRetransmitSkbFtraceEvent)
408   if (&from == this) return;
409   Clear();
410   MergeFrom(from);
411 }
412 
IsInitialized() const413 bool TcpRetransmitSkbFtraceEvent::IsInitialized() const {
414   return true;
415 }
416 
InternalSwap(TcpRetransmitSkbFtraceEvent * other)417 void TcpRetransmitSkbFtraceEvent::InternalSwap(TcpRetransmitSkbFtraceEvent* other) {
418   using std::swap;
419   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
420   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
421   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
422       PROTOBUF_FIELD_OFFSET(TcpRetransmitSkbFtraceEvent, _impl_.state_)
423       + sizeof(TcpRetransmitSkbFtraceEvent::_impl_.state_)  // NOLINT
424       - PROTOBUF_FIELD_OFFSET(TcpRetransmitSkbFtraceEvent, _impl_.daddr_)>(
425           reinterpret_cast<char*>(&_impl_.daddr_),
426           reinterpret_cast<char*>(&other->_impl_.daddr_));
427 }
428 
GetTypeName() const429 std::string TcpRetransmitSkbFtraceEvent::GetTypeName() const {
430   return "perfetto.protos.TcpRetransmitSkbFtraceEvent";
431 }
432 
433 
434 // @@protoc_insertion_point(namespace_scope)
435 }  // namespace protos
436 }  // namespace perfetto
437 PROTOBUF_NAMESPACE_OPEN
438 template<> PROTOBUF_NOINLINE ::perfetto::protos::TcpRetransmitSkbFtraceEvent*
CreateMaybeMessage(Arena * arena)439 Arena::CreateMaybeMessage< ::perfetto::protos::TcpRetransmitSkbFtraceEvent >(Arena* arena) {
440   return Arena::CreateMessageInternal< ::perfetto::protos::TcpRetransmitSkbFtraceEvent >(arena);
441 }
442 PROTOBUF_NAMESPACE_CLOSE
443 
444 // @@protoc_insertion_point(global_scope)
445 #include <google/protobuf/port_undef.inc>
446