network-internet-protocol 0.1.8

A domain model of internet protocol version 4 and version 6 host addresses, masks, network addresses and packets and associated types.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
// This file is part of network. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/network/master/COPYRIGHT. No part of predicator, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
// Copyright © 2016-2018 The developers of network. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/network/master/COPYRIGHT.


/// Captures the reason and salient data for dropping with a packet earlier than might be expected.
///
/// This reason is reported immediately before the underlying packet is dropped, at which point all referenced data will no longer exist.
///
/// Salient data is by its nature unlikely to always be completely valid, and should be used only as a source of raw bytes.
#[derive(Debug)]
#[derive(Serialize)]
pub enum InternetProtocolVersion6IncomingNetworkPacketDropReason<ICMPV6INPDR: IncomingNetworkPacketProcessingDropReason, TCPINPDR: IncomingNetworkPacketProcessingDropReason, UDPINPDR: IncomingNetworkPacketProcessingDropReason>
{
	/// Packet is too short.
	PacketIsTooShort,
	
	/// Header is not version 6.
	HeaderIsNot6
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Flow label was zero.
	///
	/// Only if the feature `drop-ipv6-packets-with-non-zero-flow-label` is configured.
	FlowLabelIsNonZero
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Hop-by-hop options extension header was not the first extension header.
	HopByHopOptionsIsNotFirstExtensionHeader
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Hop-by-hop options extension header was too short.
	HopByHopOptionsUnderflow
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Hop-by-hop options extension header was too long.
	HopByHopOptionsHeaderExtensionLengthOverflow
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Type-Length-Value option in an extension header was too short.
	TypeLengthValueOptionTypeUnderflow
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Type-Length-Value option in an extension header was too short.
	TypeLengthValueOptionLengthUnderflow
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Type-Length-Value option in an extension header was too short.
	TypeLengthValueOptionDataUnderflow
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Type-Length-Value option in an extension header required discard of packet if not supported.
	TypeLengthValueOptionDiscardPacket
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Option type.
		option_type: u8,
	},
	
	/// Type-Length-Value option in an extension header was experimental or should not be used on the internet.
	TypeLengthValueOptionShouldNotBeUsedOnTheInternet
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Option type.
		option_type: u8,
	},
	
	/// Routing extension header was repeated.
	RoutingExtensionHeaderRepeated
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Routing extension header was too short.
	RoutingExtensionHeaderUnderflow
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// We are not a router, and the routing extension header has route segments left, ie we are not the final destination.
	RoutingExtensionHeaderHasSegmentsLeft
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Routing type.
		routing_type: u8,
		
		/// Segments left.
		segments_left: u8,
	},
	
	/// We are not a router, and the routing extension header had a deprecated, experimental or reserved routing type.
	RoutingExtensionHeaderRoutingTypeIsDeprecatedExperimentalOrReserved
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Routing type.
		routing_type: u8,
		
		/// Segments left.
		segments_left: u8,
	},
	
	/// Fragment extension header was repeated.
	FragmentExtensionHeaderRepeated
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Fragment extension header was too short.
	FragmentExtensionHeaderUnderflow
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Fragment extension header had its first reserved field set to a value which is not zero.
	///
	/// Only if the feature `drop-ipv6-fragments-when-first-reserved-field-is-not-zero` was configured.
	FragmentExtensionHeaderFirstReservedFieldNonZero
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Value of the reserved field.
		reserved: u8,
	},
	
	/// Fragment extension header had its first reserved field set to a value which is not zero.
	///
	/// Only if the feature `drop-ipv6-fragments-when-second-reserved-field-is-not-zero` was configured.
	FragmentExtensionHeaderSecondReservedFieldNonZero
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Value of the reserved field.
		reserved: u8,
	},
	
	/// Fragment extension header implies that there is only one fragment, or that the last fragment is the first.
	///
	/// Whilst strictly possible, there is no good reason to send fragmented packets when there is only one fragment!
	FragmentExtensionHeaderOnlyOneFragmentOrLastFragmentIsFirst
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Packet fragment, apart from the last fragment, has a length which is not a multiple of eight (8).
	PacketFragmentNotAMultipleOfEight
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Reassembling using this fragment would make the packet including payload larger than 65,535 bytes.
	PacketFragmentWouldMakeReassembledPacketWouldTooLarge
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// A packet has overly small fragments.
	///
	/// This is usually indicative of an attack.
	PacketFragmentTooSmall
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// The encapsulating security payload (ESP) extension header is unsupported.
	///
	/// ESP is part of IPsec.
	EncapulatingSecurityPayloadExtensionHeaderUnsupported
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// The authentication header (AH) extension header is unsupported.
	///
	/// AH is part of IPsec.
	AuthenticationHeaderExtensionHeaderUnsupported
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// The no-next-header 'psuedo' extension header is unsupported.
	NoNextHeaderIsUnsupported
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// The destination options extension header was repeated more than twice.
	MoreThanTwoDestinationOptionsExtensionHeaders
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// The mobility extension header is unsupported.
	MobilityExtensionHeaderUnsupported
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// The host identity protocol (HIP) extension header is unsupported.
	HostIdentityProtocolExtensionHeaderUnsupported
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// The SHIM6 extension header is unsupported.
	Shim6ProtocolExtensionHeaderUnsupported
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Experimentation extension headers are unsupported.
	ExperimentationExtensionHeaderUnsupported
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// An unrecognised extension header or unsupported layer 4 protocol was specified.
	///
	/// Only a very small number of layer 4 protocols are supported.
	UnrecognisedExtensionHeaderOrLayer4Protocol
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Next header (extension header type) or layer 4 protocol number.
		next_header: u8,
	},
	
	/// Occurs during Internet Protocol (IP) version 4 packet processing.
	///
	/// Received a packet with a source address that was the same as the destination address.
	SourceAndDestinationAddressAreTheSame
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Received a packet with a source address that was an invalid unicast address.
	///
	/// This can include the loopback, unspecified ('any'), broadcast and documentation addresses.
	SourceAddressNotValidUnicast
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Received a packet with a source address that was denied (eg banned, firewalled).
	SourceAddressDenied
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Received a packet with a destination address that was reserved for documentation.
	DestinationAddressDocumentation
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Received a packet with a destination address that was reserved for loopback (ie is should never be received by a network card).
	DestinationAddressLoopback
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Received a packet with a destination address that was reserved for multicast 'loopback' (interface-local) (ie is should never be received by a network card).
	DestinationAddressInterfaceLocal
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Received a unicast packet to a destination that isn't us.
	UnicastDestinationIsNotUs
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	MulticastAddressIsNotMulticast
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	MulticastAddressIsNotValidMulticast
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Parsing error.
		parsing_error: InternetProtocolVersion6MulticastAddressParseError,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	MulticastAddressMismatchesEthernetAddress
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	EthernetBroadcastShouldNotOccur
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	MulticastAddressDenied
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	DestinationWasLoopbackOrDocumentationAddress
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	TransmissionControlProtocolPacketsShouldOnlyBeUnicast
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Occurs during Internet Protocol (IP) version 6 packet processing.
	UserDatagramProtocolPacketsMustHaveACheckSumSet
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Internet Control Message Protocol (ICMP) version 6 packets sent over Internet Protocol (IP) version 6 should not be fragmented.
	InternetControlMessageProtocolVersion6PacketsShouldNotBeFragmented
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
	},
	
	/// Wrapper around a problematic Internet Control Message Protocol (ICMP) version 6 packet.
	ProblematicInternetControlMessageProtocolVersion6Packet
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Reason
		reason: ICMPV6INPDR,
	},
	
	/// Wrapper around a problematic Transmission Control Protocol (TCP) packet.
	ProblematicTransmissionControlProtocolPacket
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Reason
		reason: TCPINPDR,
	},
	
	/// Wrapper around a problematic User Datagram Protocol (UDP) packet.
	ProblematicUserDatagramProtocolPacket
	{
		/// Internet Protocol (IP) version 6 packet header.
		#[serde(serialize_with = "InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null")]
		header: NonNull<InternetProtocolVersion6PacketHeader>,
		
		/// Reason
		reason: UDPINPDR,
	},
}

impl<ICMPV6INPDR: IncomingNetworkPacketProcessingDropReason, TCPINPDR: IncomingNetworkPacketProcessingDropReason, UDPINPDR: IncomingNetworkPacketProcessingDropReason> IncomingNetworkPacketProcessingDropReason for InternetProtocolVersion6IncomingNetworkPacketDropReason<ICMPV6INPDR, TCPINPDR, UDPINPDR>
{
}

#[allow(non_snake_case)]
#[inline(always)]
fn InternetProtocolVersion6IncomingNetworkPacketDropReason_serialize_non_null<S: Serializer>(to_serialize: &NonNull<InternetProtocolVersion6PacketHeader>, serializer: S) -> Result<S::Ok, S::Error>
{
	unsafe { to_serialize.as_ref().serialize(serializer) }
}