-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevents_generated.go
executable file
·2394 lines (2127 loc) · 100 KB
/
events_generated.go
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
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by events-generate; DO NOT EDIT.
package wgevents
import (
"fmt"
"golang.zx2c4.com/wireguard/device"
"golang.zx2c4.com/wireguard/tai64n"
"log/slog"
)
var parser parsers
type parsers interface {
ParseUDPGSODisabled(*EventUDPGSODisabled, string, ...any) bool
}
const (
FormatVerbosefDroppedPacketsFromMultiSegmentRead = "Dropped some packets from multi-segment read: %v"
FormatVerbosefStartedDecryptionWorker = "Routine: decryption worker %d - started"
FormatVerbosefDeviceClosing = "Device closing"
FormatVerbosefPeerStarting = "%v - Starting"
FormatVerbosefUAPIUpdatingPrivateKey = "UAPI: Updating private key"
FormatVerbosefPacketIPVersionUnknown = "Received packet with unknown IP version"
FormatVerbosefPacketReceiveFailed = "Failed to receive %s packet: %v"
FormatErrorfAssumingDefaultMTU = "Trouble determining MTU, assuming default: %v"
FormatVerbosefEventWorkerStarted = "Routine: event worker - started"
FormatVerbosefDecodeCookieReplyFailed = "Failed to decode cookie reply"
FormatVerbosefCookieResponseInvalid = "Could not decrypt invalid cookie response"
FormatVerbosefSendingHandshakeInitiation = "%v - Sending handshake initiation"
FormatErrorfLoadMTUFailed = "Failed to load updated MTU of device: %v"
FormatErrorfPacketDataSendFailed = "%v - Failed to send data packets: %v"
FormatVerbosefEventWorkerStopped = "Routine: event worker - stopped"
FormatVerbosefStoppedReceivingIncoming = "Routine: receive incoming %s - started"
FormatVerbosefReceivedInvalidInitiation = "Received invalid initiation message from %s"
FormatVerbosefSendCookieDenied = "Sending cookie response for denied handshake message for %v"
FormatErrorfBindCloseFailed = "Bind close failed: %v"
FormatErrorfInvalidPacketInHandshakeQueue = "Invalid packet ended up in the handshake queue"
FormatVerbosefRemovingAllKeys = "%s - Removing all keys, since we haven't received a new one in %d seconds"
FormatVerbosefMTUUpdated = "MTU updated: %v"
FormatVerbosefUAPIRemovingAllPeers = "UAPI: Removing all peers"
FormatVerbosefMessageUnknownType = "Received message with unknown type"
FormatVerbosefStoppedHandshakeWorker = "Routine: handshake worker %d - stopped"
FormatVerbosefTUNReaderStarted = "Routine: TUN reader - started"
FormatVerbosefRetryingHandshakeNoResponse = "%s - Retrying handshake because we stopped hearing back after %d seconds"
FormatErrorfInvalidOperation = "invalid UAPI operation: %v"
FormatVerbosefUAPIAddingAllowedIP = "%v - UAPI: Adding allowedip"
FormatVerbosefInvalidMAC1 = "Received packet with invalid mac1"
FormatVerbosefUAPIRemovingAllAllowedIPs = "%v - UAPI: Removing all allowedips"
FormatVerbosefSendingKeepalivePacket = "%v - Sending keepalive packet"
FormatVerbosefReceivingKeepalivePacket = "%v - Receiving keepalive packet"
FormatErrorfCreateResponseMessageFailed = "%v - Failed to create response message: %v"
FormatVerbosefBindUpdated = "UDP bind has been updated"
FormatVerbosefUAPIUpdatingEndpoint = "%v - UAPI: Updating endpoint"
FormatVerbosefStartedReceivingIncoming = "Routine: receive incoming %s - stopped"
FormatErrorfCreateCookieReplyFailed = "Failed to create cookie reply: %v"
FormatVerbosefInterfaceCloseIgnoreRequestedState = "Interface closed, ignored requested state %s"
FormatVerbosefStoppedEncryptionWorker = "Routine: encryption worker %d - stopped"
FormatVerbosefSequentialReaderStopped = "%v - Routine: sequential sender - stopped"
FormatVerbosefUDPGSODisabled = "disabled UDP GSO on %s, NIC(s) may not support checksum offload"
FormatErrorfHandshakeSendFailed = "%v - Failed to send handshake response: %v"
FormatErrorfCreateInitiationMessageFailed = "%v - Failed to create initiation message: %v"
FormatErrorfDeriveKeypairFailed = "%v - Failed to derive keypair: %v"
FormatVerbosefInterfaceUpRequested = "Interface up requested"
FormatVerbosefInterfaceDownRequested = "Interface down requested"
FormatVerbosefUAPIUpdatingPersistentKeepalive = "%v - UAPI: Updating persistent keepalive interval"
FormatVerbosefPacketIPVersionInvalid = "Packet with invalid IP version from %v"
FormatVerbosefReceivedInvalidResponse = "Received invalid response message from %s"
FormatErrorfSendHandshakeInitiationFailed = "%v - Failed to send handshake initiation: %v"
FormatVerbosefPeerStopping = "%v - Stopping"
FormatVerbosefHandshakeFlood = "%v - ConsumeMessageInitiation: handshake flood"
FormatErrorfTUNWriteFailed = "Failed to write packets to TUN device: %v"
FormatVerbosefInterfaceStateChanged = "Interface state was %s, requested %s, now %s"
FormatVerbosefDecryptionWorkerStopped = "Routine: decryption worker %d - stopped"
FormatVerbosefUAPIRemovingPeer = "%v - UAPI: Removing"
FormatVerbosefStartedHandshakeWorker = "Routine: handshake worker %d - started"
FormatErrorfValue = "%v"
FormatErrorfTunPacketReadFailed = "Failed to read packet from TUN device: %v"
FormatErrorfUpdateBind = "Unable to update bind: %v"
FormatVerbosefSequentialReceiverStopped = "%v - Routine: sequential receiver - stopped"
FormatVerbosefIPv4PacketDisallowed = "IPv4 packet with disallowed source address from %v"
FormatVerbosefReceivingCookieResponse = "Receiving cookie response from %s"
FormatVerbosefMTUTooLarge = "MTU updated: %v (too large, capped at %v)"
FormatVerbosefDeviceClosed = "Device closed"
FormatVerbosefHandshakeReplay = "%v - ConsumeMessageInitiation: handshake replay @ %v"
FormatVerbosefUAPIUpdatingPresharedKey = "%v - UAPI: Updating preshared key"
FormatVerbosefStartedEncryptionWorker = "Routine: encryption worker %d - started"
FormatVerbosefSequentialReceiverStarted = "%v - Routine: sequential receiver - started"
FormatVerbosefHandshakeDidNotComplete = "%s - Handshake did not complete after %d attempts, giving up"
FormatVerbosefUAPICreated = "%v - UAPI: Created"
FormatVerbosefIPv6PacketDisallowed = "IPv6 packet with disallowed source address from %v"
FormatVerbosefRetryingHandshake = "%s - Handshake did not complete after %d seconds, retrying (try %d)"
FormatErrorfNegativeMTU = "MTU not updated to negative value: %v"
FormatErrorfInitiationMessageDecodeFailed = "Failed to decode initiation message"
FormatVerbosefUAPIUpdatingFWMark = "UAPI: Updating fwmark"
FormatVerbosefTUNReaderStopped = "Routine: TUN reader - stopped"
FormatVerbosefReceivedHandshakeResponse = "%v - Received handshake response"
FormatVerbosefSendingHandshakeResponse = "%v - Sending handshake response"
FormatVerbosefSequentialSenderStarted = "%v - Routine: sequential sender - started"
FormatErrorfResponseMessageDecodeFailed = "Failed to decode response message"
FormatVerbosefUAPIUpdatingListenPort = "UAPI: Updating listen port"
FormatVerbosefReceivedHandshakeInitiation = "%v - Received handshake initiation"
)
const (
NiceVerbosefDroppedPacketsFromMultiSegmentRead = "Dropped some packets from multi-segment read"
NiceVerbosefStartedDecryptionWorker = "Routine: decryption worker started"
NiceVerbosefDeviceClosing = "Device closing"
NiceVerbosefPeerStarting = "Starting"
NiceVerbosefUAPIUpdatingPrivateKey = "UAPI: Updating private key"
NiceVerbosefPacketIPVersionUnknown = "Received packet with unknown IP version"
NiceVerbosefPacketReceiveFailed = "Failed to receive packet"
NiceErrorfAssumingDefaultMTU = "Trouble determining MTU, assuming default"
NiceVerbosefEventWorkerStarted = "Routine: event worker - started"
NiceVerbosefDecodeCookieReplyFailed = "Failed to decode cookie reply"
NiceVerbosefCookieResponseInvalid = "Could not decrypt invalid cookie response"
NiceVerbosefSendingHandshakeInitiation = "Sending handshake initiation"
NiceErrorfLoadMTUFailed = "Failed to load updated MTU of device"
NiceErrorfPacketDataSendFailed = "Failed to send data packets"
NiceVerbosefEventWorkerStopped = "Routine: event worker - stopped"
NiceVerbosefStoppedReceivingIncoming = "Routine: receive incoming started"
NiceVerbosefReceivedInvalidInitiation = "Received invalid initiation message"
NiceVerbosefSendCookieDenied = "Sending cookie response for denied handshake message"
NiceErrorfBindCloseFailed = "Bind close failed"
NiceErrorfInvalidPacketInHandshakeQueue = "Invalid packet ended up in the handshake queue"
NiceVerbosefRemovingAllKeys = "Removing all keys, since we haven't received a new one"
NiceVerbosefMTUUpdated = "MTU updated"
NiceVerbosefUAPIRemovingAllPeers = "UAPI: Removing all peers"
NiceVerbosefMessageUnknownType = "Received message with unknown type"
NiceVerbosefStoppedHandshakeWorker = "Routine: handshake worker stopped"
NiceVerbosefTUNReaderStarted = "Routine: TUN reader - started"
NiceVerbosefRetryingHandshakeNoResponse = "Retrying handshake because we stopped hearing back"
NiceErrorfInvalidOperation = "invalid UAPI operation"
NiceVerbosefUAPIAddingAllowedIP = "UAPI: Adding allowedip"
NiceVerbosefInvalidMAC1 = "Received packet with invalid mac1"
NiceVerbosefUAPIRemovingAllAllowedIPs = "UAPI: Removing all allowedips"
NiceVerbosefSendingKeepalivePacket = "Sending keepalive packet"
NiceVerbosefReceivingKeepalivePacket = "Receiving keepalive packet"
NiceErrorfCreateResponseMessageFailed = "Failed to create response message"
NiceVerbosefBindUpdated = "UDP bind has been updated"
NiceVerbosefUAPIUpdatingEndpoint = "UAPI: Updating endpoint"
NiceVerbosefStartedReceivingIncoming = "Routine: receive incoming stopped"
NiceErrorfCreateCookieReplyFailed = "Failed to create cookie reply"
NiceVerbosefInterfaceCloseIgnoreRequestedState = "Interface closed, ignored requested state"
NiceVerbosefStoppedEncryptionWorker = "Routine: encryption worker stopped"
NiceVerbosefSequentialReaderStopped = "Routine: sequential sender - stopped"
NiceVerbosefUDPGSODisabled = "disabled UDP GSO, NIC(s) may not support checksum offload"
NiceErrorfHandshakeSendFailed = "Failed to send handshake response"
NiceErrorfCreateInitiationMessageFailed = "Failed to create initiation message"
NiceErrorfDeriveKeypairFailed = "Failed to derive keypair"
NiceVerbosefInterfaceUpRequested = "Interface up requested"
NiceVerbosefInterfaceDownRequested = "Interface down requested"
NiceVerbosefUAPIUpdatingPersistentKeepalive = "UAPI: Updating persistent keepalive interval"
NiceVerbosefPacketIPVersionInvalid = "Packet with invalid IP version from"
NiceVerbosefReceivedInvalidResponse = "Received invalid response message"
NiceErrorfSendHandshakeInitiationFailed = "Failed to send handshake initiation"
NiceVerbosefPeerStopping = "Stopping"
NiceVerbosefHandshakeFlood = "ConsumeMessageInitiation: handshake flood"
NiceErrorfTUNWriteFailed = "Failed to write packets to TUN device"
NiceVerbosefInterfaceStateChanged = "Interface state changed"
NiceVerbosefDecryptionWorkerStopped = "Routine: decryption worker stopped"
NiceVerbosefUAPIRemovingPeer = "UAPI: Removing"
NiceVerbosefStartedHandshakeWorker = "Routine: handshake worker started"
NiceErrorfValue = "error"
NiceErrorfTunPacketReadFailed = "Failed to read packet from TUN device"
NiceErrorfUpdateBind = "Unable to update bind"
NiceVerbosefSequentialReceiverStopped = "Routine: sequential receiver - stopped"
NiceVerbosefIPv4PacketDisallowed = "IPv4 packet with disallowed source address from"
NiceVerbosefReceivingCookieResponse = "Receiving cookie response"
NiceVerbosefMTUTooLarge = "MTU too large, capped"
NiceVerbosefDeviceClosed = "Device closed"
NiceVerbosefHandshakeReplay = "ConsumeMessageInitiation: handshake replay"
NiceVerbosefUAPIUpdatingPresharedKey = "UAPI: Updating preshared key"
NiceVerbosefStartedEncryptionWorker = "Routine: encryption worker started"
NiceVerbosefSequentialReceiverStarted = "Routine: sequential receiver - started"
NiceVerbosefHandshakeDidNotComplete = "Handshake did not complete, giving up"
NiceVerbosefUAPICreated = "UAPI: Created"
NiceVerbosefIPv6PacketDisallowed = "IPv6 packet with disallowed source address from"
NiceVerbosefRetryingHandshake = "Handshake did not complete, retrying"
NiceErrorfNegativeMTU = "MTU not updated to negative value"
NiceErrorfInitiationMessageDecodeFailed = "Failed to decode initiation message"
NiceVerbosefUAPIUpdatingFWMark = "UAPI: Updating fwmark"
NiceVerbosefTUNReaderStopped = "Routine: TUN reader - stopped"
NiceVerbosefReceivedHandshakeResponse = "Received handshake response"
NiceVerbosefSendingHandshakeResponse = "Sending handshake response"
NiceVerbosefSequentialSenderStarted = "Routine: sequential sender - started"
NiceErrorfResponseMessageDecodeFailed = "Failed to decode response message"
NiceVerbosefUAPIUpdatingListenPort = "UAPI: Updating listen port"
NiceVerbosefReceivedHandshakeInitiation = "Received handshake initiation"
)
// Errorf formats. Used to verify uniqueness.
var _ = map[string]struct{}{
FormatErrorfAssumingDefaultMTU: {},
FormatErrorfLoadMTUFailed: {},
FormatErrorfPacketDataSendFailed: {},
FormatErrorfBindCloseFailed: {},
FormatErrorfInvalidPacketInHandshakeQueue: {},
FormatErrorfInvalidOperation: {},
FormatErrorfCreateResponseMessageFailed: {},
FormatErrorfCreateCookieReplyFailed: {},
FormatErrorfHandshakeSendFailed: {},
FormatErrorfCreateInitiationMessageFailed: {},
FormatErrorfDeriveKeypairFailed: {},
FormatErrorfSendHandshakeInitiationFailed: {},
FormatErrorfTUNWriteFailed: {},
FormatErrorfValue: {},
FormatErrorfTunPacketReadFailed: {},
FormatErrorfUpdateBind: {},
FormatErrorfNegativeMTU: {},
FormatErrorfInitiationMessageDecodeFailed: {},
FormatErrorfResponseMessageDecodeFailed: {},
}
// Verbosef formats. Used to verify uniqueness.
var _ = map[string]struct{}{
FormatVerbosefDroppedPacketsFromMultiSegmentRead: {},
FormatVerbosefStartedDecryptionWorker: {},
FormatVerbosefDeviceClosing: {},
FormatVerbosefPeerStarting: {},
FormatVerbosefUAPIUpdatingPrivateKey: {},
FormatVerbosefPacketIPVersionUnknown: {},
FormatVerbosefPacketReceiveFailed: {},
FormatVerbosefEventWorkerStarted: {},
FormatVerbosefDecodeCookieReplyFailed: {},
FormatVerbosefCookieResponseInvalid: {},
FormatVerbosefSendingHandshakeInitiation: {},
FormatVerbosefEventWorkerStopped: {},
FormatVerbosefStoppedReceivingIncoming: {},
FormatVerbosefReceivedInvalidInitiation: {},
FormatVerbosefSendCookieDenied: {},
FormatVerbosefRemovingAllKeys: {},
FormatVerbosefMTUUpdated: {},
FormatVerbosefUAPIRemovingAllPeers: {},
FormatVerbosefMessageUnknownType: {},
FormatVerbosefStoppedHandshakeWorker: {},
FormatVerbosefTUNReaderStarted: {},
FormatVerbosefRetryingHandshakeNoResponse: {},
FormatVerbosefUAPIAddingAllowedIP: {},
FormatVerbosefInvalidMAC1: {},
FormatVerbosefUAPIRemovingAllAllowedIPs: {},
FormatVerbosefSendingKeepalivePacket: {},
FormatVerbosefReceivingKeepalivePacket: {},
FormatVerbosefBindUpdated: {},
FormatVerbosefUAPIUpdatingEndpoint: {},
FormatVerbosefStartedReceivingIncoming: {},
FormatVerbosefInterfaceCloseIgnoreRequestedState: {},
FormatVerbosefStoppedEncryptionWorker: {},
FormatVerbosefSequentialReaderStopped: {},
FormatVerbosefUDPGSODisabled: {},
FormatVerbosefInterfaceUpRequested: {},
FormatVerbosefInterfaceDownRequested: {},
FormatVerbosefUAPIUpdatingPersistentKeepalive: {},
FormatVerbosefPacketIPVersionInvalid: {},
FormatVerbosefReceivedInvalidResponse: {},
FormatVerbosefPeerStopping: {},
FormatVerbosefHandshakeFlood: {},
FormatVerbosefInterfaceStateChanged: {},
FormatVerbosefDecryptionWorkerStopped: {},
FormatVerbosefUAPIRemovingPeer: {},
FormatVerbosefStartedHandshakeWorker: {},
FormatVerbosefSequentialReceiverStopped: {},
FormatVerbosefIPv4PacketDisallowed: {},
FormatVerbosefReceivingCookieResponse: {},
FormatVerbosefMTUTooLarge: {},
FormatVerbosefDeviceClosed: {},
FormatVerbosefHandshakeReplay: {},
FormatVerbosefUAPIUpdatingPresharedKey: {},
FormatVerbosefStartedEncryptionWorker: {},
FormatVerbosefSequentialReceiverStarted: {},
FormatVerbosefHandshakeDidNotComplete: {},
FormatVerbosefUAPICreated: {},
FormatVerbosefIPv6PacketDisallowed: {},
FormatVerbosefRetryingHandshake: {},
FormatVerbosefUAPIUpdatingFWMark: {},
FormatVerbosefTUNReaderStopped: {},
FormatVerbosefReceivedHandshakeResponse: {},
FormatVerbosefSendingHandshakeResponse: {},
FormatVerbosefSequentialSenderStarted: {},
FormatVerbosefUAPIUpdatingListenPort: {},
FormatVerbosefReceivedHandshakeInitiation: {},
}
// Event is a generic event emitted from the logger. Use a `switch v := v.(type) {` to filter values and gain access to arguments.
type Event interface {
Nice() string
Format() string
Args() []any
Slog(*slog.Logger)
IsErrorf() bool
}
var _ Event = (*EventDroppedPacketsFromMultiSegmentRead)(nil)
// EventDroppedPacketsFromMultiSegmentRead is an verbosef event recognized by the format string "Dropped some packets from multi-segment read: %v".
type EventDroppedPacketsFromMultiSegmentRead struct {
Err error
}
func (e *EventDroppedPacketsFromMultiSegmentRead) IsErrorf() bool { return false }
func (*EventDroppedPacketsFromMultiSegmentRead) Format() string {
return FormatVerbosefDroppedPacketsFromMultiSegmentRead
}
func (e *EventDroppedPacketsFromMultiSegmentRead) Args() []any { return []any{e.Err} }
func (*EventDroppedPacketsFromMultiSegmentRead) Nice() string {
return NiceVerbosefDroppedPacketsFromMultiSegmentRead
}
func (e *EventDroppedPacketsFromMultiSegmentRead) Slog(l *slog.Logger) {
l.Error(e.Nice(), "Err", e.Err)
}
var _ Event = (*EventStartedDecryptionWorker)(nil)
// EventStartedDecryptionWorker is an verbosef event recognized by the format string "Routine: decryption worker %d - started".
type EventStartedDecryptionWorker struct {
ID int
}
func (e *EventStartedDecryptionWorker) IsErrorf() bool { return false }
func (*EventStartedDecryptionWorker) Format() string { return FormatVerbosefStartedDecryptionWorker }
func (e *EventStartedDecryptionWorker) Args() []any { return []any{e.ID} }
func (*EventStartedDecryptionWorker) Nice() string { return NiceVerbosefStartedDecryptionWorker }
func (e *EventStartedDecryptionWorker) Slog(l *slog.Logger) { l.Debug(e.Nice(), "ID", e.ID) }
var _ Event = (*EventDeviceClosing)(nil)
// EventDeviceClosing is an verbosef event recognized by the format string "Device closing".
type EventDeviceClosing struct{}
func (e *EventDeviceClosing) IsErrorf() bool { return false }
func (*EventDeviceClosing) Format() string { return FormatVerbosefDeviceClosing }
func (e *EventDeviceClosing) Args() []any { return []any{} }
func (*EventDeviceClosing) Nice() string { return NiceVerbosefDeviceClosing }
func (e *EventDeviceClosing) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventPeerStarting)(nil)
// EventPeerStarting is an verbosef event recognized by the format string "%v - Starting".
type EventPeerStarting struct {
Peer *device.Peer
}
func (e *EventPeerStarting) IsErrorf() bool { return false }
func (*EventPeerStarting) Format() string { return FormatVerbosefPeerStarting }
func (e *EventPeerStarting) Args() []any { return []any{e.Peer} }
func (*EventPeerStarting) Nice() string { return NiceVerbosefPeerStarting }
func (e *EventPeerStarting) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventUAPIUpdatingPrivateKey)(nil)
// EventUAPIUpdatingPrivateKey is an verbosef event recognized by the format string "UAPI: Updating private key".
type EventUAPIUpdatingPrivateKey struct{}
func (e *EventUAPIUpdatingPrivateKey) IsErrorf() bool { return false }
func (*EventUAPIUpdatingPrivateKey) Format() string { return FormatVerbosefUAPIUpdatingPrivateKey }
func (e *EventUAPIUpdatingPrivateKey) Args() []any { return []any{} }
func (*EventUAPIUpdatingPrivateKey) Nice() string { return NiceVerbosefUAPIUpdatingPrivateKey }
func (e *EventUAPIUpdatingPrivateKey) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventPacketIPVersionUnknown)(nil)
// EventPacketIPVersionUnknown is an verbosef event recognized by the format string "Received packet with unknown IP version".
type EventPacketIPVersionUnknown struct{}
func (e *EventPacketIPVersionUnknown) IsErrorf() bool { return false }
func (*EventPacketIPVersionUnknown) Format() string { return FormatVerbosefPacketIPVersionUnknown }
func (e *EventPacketIPVersionUnknown) Args() []any { return []any{} }
func (*EventPacketIPVersionUnknown) Nice() string { return NiceVerbosefPacketIPVersionUnknown }
func (e *EventPacketIPVersionUnknown) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventPacketReceiveFailed)(nil)
// EventPacketReceiveFailed is an verbosef event recognized by the format string "Failed to receive %s packet: %v".
type EventPacketReceiveFailed struct {
RecvName string
Err error
}
func (e *EventPacketReceiveFailed) IsErrorf() bool { return false }
func (*EventPacketReceiveFailed) Format() string { return FormatVerbosefPacketReceiveFailed }
func (e *EventPacketReceiveFailed) Args() []any { return []any{e.RecvName, e.Err} }
func (*EventPacketReceiveFailed) Nice() string { return NiceVerbosefPacketReceiveFailed }
func (e *EventPacketReceiveFailed) Slog(l *slog.Logger) {
l.Error(e.Nice(), "RecvName", e.RecvName, "Err", e.Err)
}
var _ Event = (*EventAssumingDefaultMTU)(nil)
// EventAssumingDefaultMTU is an errorf event recognized by the format string "Trouble determining MTU, assuming default: %v".
type EventAssumingDefaultMTU struct {
Err error
}
func (e *EventAssumingDefaultMTU) IsErrorf() bool { return true }
func (*EventAssumingDefaultMTU) Format() string { return FormatErrorfAssumingDefaultMTU }
func (e *EventAssumingDefaultMTU) Args() []any { return []any{e.Err} }
func (*EventAssumingDefaultMTU) Nice() string { return NiceErrorfAssumingDefaultMTU }
func (e *EventAssumingDefaultMTU) Slog(l *slog.Logger) { l.Error(e.Nice(), "Err", e.Err) }
var _ Event = (*EventEventWorkerStarted)(nil)
// EventEventWorkerStarted is an verbosef event recognized by the format string "Routine: event worker - started".
type EventEventWorkerStarted struct{}
func (e *EventEventWorkerStarted) IsErrorf() bool { return false }
func (*EventEventWorkerStarted) Format() string { return FormatVerbosefEventWorkerStarted }
func (e *EventEventWorkerStarted) Args() []any { return []any{} }
func (*EventEventWorkerStarted) Nice() string { return NiceVerbosefEventWorkerStarted }
func (e *EventEventWorkerStarted) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventDecodeCookieReplyFailed)(nil)
// EventDecodeCookieReplyFailed is an verbosef event recognized by the format string "Failed to decode cookie reply".
type EventDecodeCookieReplyFailed struct{}
func (e *EventDecodeCookieReplyFailed) IsErrorf() bool { return false }
func (*EventDecodeCookieReplyFailed) Format() string { return FormatVerbosefDecodeCookieReplyFailed }
func (e *EventDecodeCookieReplyFailed) Args() []any { return []any{} }
func (*EventDecodeCookieReplyFailed) Nice() string { return NiceVerbosefDecodeCookieReplyFailed }
func (e *EventDecodeCookieReplyFailed) Slog(l *slog.Logger) { l.Warn(e.Nice()) }
var _ Event = (*EventCookieResponseInvalid)(nil)
// EventCookieResponseInvalid is an verbosef event recognized by the format string "Could not decrypt invalid cookie response".
type EventCookieResponseInvalid struct{}
func (e *EventCookieResponseInvalid) IsErrorf() bool { return false }
func (*EventCookieResponseInvalid) Format() string { return FormatVerbosefCookieResponseInvalid }
func (e *EventCookieResponseInvalid) Args() []any { return []any{} }
func (*EventCookieResponseInvalid) Nice() string { return NiceVerbosefCookieResponseInvalid }
func (e *EventCookieResponseInvalid) Slog(l *slog.Logger) { l.Warn(e.Nice()) }
var _ Event = (*EventSendingHandshakeInitiation)(nil)
// EventSendingHandshakeInitiation is an verbosef event recognized by the format string "%v - Sending handshake initiation".
type EventSendingHandshakeInitiation struct {
Peer *device.Peer
}
func (e *EventSendingHandshakeInitiation) IsErrorf() bool { return false }
func (*EventSendingHandshakeInitiation) Format() string {
return FormatVerbosefSendingHandshakeInitiation
}
func (e *EventSendingHandshakeInitiation) Args() []any { return []any{e.Peer} }
func (*EventSendingHandshakeInitiation) Nice() string { return NiceVerbosefSendingHandshakeInitiation }
func (e *EventSendingHandshakeInitiation) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventLoadMTUFailed)(nil)
// EventLoadMTUFailed is an errorf event recognized by the format string "Failed to load updated MTU of device: %v".
type EventLoadMTUFailed struct {
Err error
}
func (e *EventLoadMTUFailed) IsErrorf() bool { return true }
func (*EventLoadMTUFailed) Format() string { return FormatErrorfLoadMTUFailed }
func (e *EventLoadMTUFailed) Args() []any { return []any{e.Err} }
func (*EventLoadMTUFailed) Nice() string { return NiceErrorfLoadMTUFailed }
func (e *EventLoadMTUFailed) Slog(l *slog.Logger) { l.Error(e.Nice(), "Err", e.Err) }
var _ Event = (*EventPacketDataSendFailed)(nil)
// EventPacketDataSendFailed is an errorf event recognized by the format string "%v - Failed to send data packets: %v".
type EventPacketDataSendFailed struct {
Peer *device.Peer
Err error
}
func (e *EventPacketDataSendFailed) IsErrorf() bool { return true }
func (*EventPacketDataSendFailed) Format() string { return FormatErrorfPacketDataSendFailed }
func (e *EventPacketDataSendFailed) Args() []any { return []any{e.Peer, e.Err} }
func (*EventPacketDataSendFailed) Nice() string { return NiceErrorfPacketDataSendFailed }
func (e *EventPacketDataSendFailed) Slog(l *slog.Logger) {
l.Error(e.Nice(), "Peer", e.Peer, "Err", e.Err)
}
var _ Event = (*EventEventWorkerStopped)(nil)
// EventEventWorkerStopped is an verbosef event recognized by the format string "Routine: event worker - stopped".
type EventEventWorkerStopped struct{}
func (e *EventEventWorkerStopped) IsErrorf() bool { return false }
func (*EventEventWorkerStopped) Format() string { return FormatVerbosefEventWorkerStopped }
func (e *EventEventWorkerStopped) Args() []any { return []any{} }
func (*EventEventWorkerStopped) Nice() string { return NiceVerbosefEventWorkerStopped }
func (e *EventEventWorkerStopped) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventStoppedReceivingIncoming)(nil)
// EventStoppedReceivingIncoming is an verbosef event recognized by the format string "Routine: receive incoming %s - started".
type EventStoppedReceivingIncoming struct {
RecvName string
}
func (e *EventStoppedReceivingIncoming) IsErrorf() bool { return false }
func (*EventStoppedReceivingIncoming) Format() string { return FormatVerbosefStoppedReceivingIncoming }
func (e *EventStoppedReceivingIncoming) Args() []any { return []any{e.RecvName} }
func (*EventStoppedReceivingIncoming) Nice() string { return NiceVerbosefStoppedReceivingIncoming }
func (e *EventStoppedReceivingIncoming) Slog(l *slog.Logger) {
l.Debug(e.Nice(), "RecvName", e.RecvName)
}
var _ Event = (*EventReceivedInvalidInitiation)(nil)
// EventReceivedInvalidInitiation is an verbosef event recognized by the format string "Received invalid initiation message from %s".
type EventReceivedInvalidInitiation struct {
Destination string
}
func (e *EventReceivedInvalidInitiation) IsErrorf() bool { return false }
func (*EventReceivedInvalidInitiation) Format() string {
return FormatVerbosefReceivedInvalidInitiation
}
func (e *EventReceivedInvalidInitiation) Args() []any { return []any{e.Destination} }
func (*EventReceivedInvalidInitiation) Nice() string { return NiceVerbosefReceivedInvalidInitiation }
func (e *EventReceivedInvalidInitiation) Slog(l *slog.Logger) {
l.Warn(e.Nice(), "Destination", e.Destination)
}
var _ Event = (*EventSendCookieDenied)(nil)
// EventSendCookieDenied is an verbosef event recognized by the format string "Sending cookie response for denied handshake message for %v".
type EventSendCookieDenied struct {
Destination string
}
func (e *EventSendCookieDenied) IsErrorf() bool { return false }
func (*EventSendCookieDenied) Format() string { return FormatVerbosefSendCookieDenied }
func (e *EventSendCookieDenied) Args() []any { return []any{e.Destination} }
func (*EventSendCookieDenied) Nice() string { return NiceVerbosefSendCookieDenied }
func (e *EventSendCookieDenied) Slog(l *slog.Logger) { l.Warn(e.Nice(), "Destination", e.Destination) }
var _ Event = (*EventBindCloseFailed)(nil)
// EventBindCloseFailed is an errorf event recognized by the format string "Bind close failed: %v".
type EventBindCloseFailed struct {
Err error
}
func (e *EventBindCloseFailed) IsErrorf() bool { return true }
func (*EventBindCloseFailed) Format() string { return FormatErrorfBindCloseFailed }
func (e *EventBindCloseFailed) Args() []any { return []any{e.Err} }
func (*EventBindCloseFailed) Nice() string { return NiceErrorfBindCloseFailed }
func (e *EventBindCloseFailed) Slog(l *slog.Logger) { l.Error(e.Nice(), "Err", e.Err) }
var _ Event = (*EventInvalidPacketInHandshakeQueue)(nil)
// EventInvalidPacketInHandshakeQueue is an errorf event recognized by the format string "Invalid packet ended up in the handshake queue".
type EventInvalidPacketInHandshakeQueue struct{}
func (e *EventInvalidPacketInHandshakeQueue) IsErrorf() bool { return true }
func (*EventInvalidPacketInHandshakeQueue) Format() string {
return FormatErrorfInvalidPacketInHandshakeQueue
}
func (e *EventInvalidPacketInHandshakeQueue) Args() []any { return []any{} }
func (*EventInvalidPacketInHandshakeQueue) Nice() string {
return NiceErrorfInvalidPacketInHandshakeQueue
}
func (e *EventInvalidPacketInHandshakeQueue) Slog(l *slog.Logger) { l.Error(e.Nice()) }
var _ Event = (*EventRemovingAllKeys)(nil)
// EventRemovingAllKeys is an verbosef event recognized by the format string "%s - Removing all keys, since we haven't received a new one in %d seconds".
type EventRemovingAllKeys struct {
Peer *device.Peer
Timeout int
}
func (e *EventRemovingAllKeys) IsErrorf() bool { return false }
func (*EventRemovingAllKeys) Format() string { return FormatVerbosefRemovingAllKeys }
func (e *EventRemovingAllKeys) Args() []any { return []any{e.Peer, e.Timeout} }
func (*EventRemovingAllKeys) Nice() string { return NiceVerbosefRemovingAllKeys }
func (e *EventRemovingAllKeys) Slog(l *slog.Logger) {
l.Debug(e.Nice(), "Peer", e.Peer, "Timeout", e.Timeout)
}
var _ Event = (*EventMTUUpdated)(nil)
// EventMTUUpdated is an verbosef event recognized by the format string "MTU updated: %v".
type EventMTUUpdated struct {
MTU int
}
func (e *EventMTUUpdated) IsErrorf() bool { return false }
func (*EventMTUUpdated) Format() string { return FormatVerbosefMTUUpdated }
func (e *EventMTUUpdated) Args() []any { return []any{e.MTU} }
func (*EventMTUUpdated) Nice() string { return NiceVerbosefMTUUpdated }
func (e *EventMTUUpdated) Slog(l *slog.Logger) { l.Info(e.Nice(), "MTU", e.MTU) }
var _ Event = (*EventUAPIRemovingAllPeers)(nil)
// EventUAPIRemovingAllPeers is an verbosef event recognized by the format string "UAPI: Removing all peers".
type EventUAPIRemovingAllPeers struct{}
func (e *EventUAPIRemovingAllPeers) IsErrorf() bool { return false }
func (*EventUAPIRemovingAllPeers) Format() string { return FormatVerbosefUAPIRemovingAllPeers }
func (e *EventUAPIRemovingAllPeers) Args() []any { return []any{} }
func (*EventUAPIRemovingAllPeers) Nice() string { return NiceVerbosefUAPIRemovingAllPeers }
func (e *EventUAPIRemovingAllPeers) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventMessageUnknownType)(nil)
// EventMessageUnknownType is an verbosef event recognized by the format string "Received message with unknown type".
type EventMessageUnknownType struct{}
func (e *EventMessageUnknownType) IsErrorf() bool { return false }
func (*EventMessageUnknownType) Format() string { return FormatVerbosefMessageUnknownType }
func (e *EventMessageUnknownType) Args() []any { return []any{} }
func (*EventMessageUnknownType) Nice() string { return NiceVerbosefMessageUnknownType }
func (e *EventMessageUnknownType) Slog(l *slog.Logger) { l.Warn(e.Nice()) }
var _ Event = (*EventStoppedHandshakeWorker)(nil)
// EventStoppedHandshakeWorker is an verbosef event recognized by the format string "Routine: handshake worker %d - stopped".
type EventStoppedHandshakeWorker struct {
ID int
}
func (e *EventStoppedHandshakeWorker) IsErrorf() bool { return false }
func (*EventStoppedHandshakeWorker) Format() string { return FormatVerbosefStoppedHandshakeWorker }
func (e *EventStoppedHandshakeWorker) Args() []any { return []any{e.ID} }
func (*EventStoppedHandshakeWorker) Nice() string { return NiceVerbosefStoppedHandshakeWorker }
func (e *EventStoppedHandshakeWorker) Slog(l *slog.Logger) { l.Debug(e.Nice(), "ID", e.ID) }
var _ Event = (*EventTUNReaderStarted)(nil)
// EventTUNReaderStarted is an verbosef event recognized by the format string "Routine: TUN reader - started".
type EventTUNReaderStarted struct{}
func (e *EventTUNReaderStarted) IsErrorf() bool { return false }
func (*EventTUNReaderStarted) Format() string { return FormatVerbosefTUNReaderStarted }
func (e *EventTUNReaderStarted) Args() []any { return []any{} }
func (*EventTUNReaderStarted) Nice() string { return NiceVerbosefTUNReaderStarted }
func (e *EventTUNReaderStarted) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventRetryingHandshakeNoResponse)(nil)
// EventRetryingHandshakeNoResponse is an verbosef event recognized by the format string "%s - Retrying handshake because we stopped hearing back after %d seconds".
type EventRetryingHandshakeNoResponse struct {
Peer *device.Peer
Timeout int
}
func (e *EventRetryingHandshakeNoResponse) IsErrorf() bool { return false }
func (*EventRetryingHandshakeNoResponse) Format() string {
return FormatVerbosefRetryingHandshakeNoResponse
}
func (e *EventRetryingHandshakeNoResponse) Args() []any { return []any{e.Peer, e.Timeout} }
func (*EventRetryingHandshakeNoResponse) Nice() string {
return NiceVerbosefRetryingHandshakeNoResponse
}
func (e *EventRetryingHandshakeNoResponse) Slog(l *slog.Logger) {
l.Debug(e.Nice(), "Peer", e.Peer, "Timeout", e.Timeout)
}
var _ Event = (*EventInvalidOperation)(nil)
// EventInvalidOperation is an errorf event recognized by the format string "invalid UAPI operation: %v".
type EventInvalidOperation struct {
Op string
}
func (e *EventInvalidOperation) IsErrorf() bool { return true }
func (*EventInvalidOperation) Format() string { return FormatErrorfInvalidOperation }
func (e *EventInvalidOperation) Args() []any { return []any{e.Op} }
func (*EventInvalidOperation) Nice() string { return NiceErrorfInvalidOperation }
func (e *EventInvalidOperation) Slog(l *slog.Logger) { l.Error(e.Nice(), "Op", e.Op) }
var _ Event = (*EventUAPIAddingAllowedIP)(nil)
// EventUAPIAddingAllowedIP is an verbosef event recognized by the format string "%v - UAPI: Adding allowedip".
type EventUAPIAddingAllowedIP struct {
Peer *device.Peer
}
func (e *EventUAPIAddingAllowedIP) IsErrorf() bool { return false }
func (*EventUAPIAddingAllowedIP) Format() string { return FormatVerbosefUAPIAddingAllowedIP }
func (e *EventUAPIAddingAllowedIP) Args() []any { return []any{e.Peer} }
func (*EventUAPIAddingAllowedIP) Nice() string { return NiceVerbosefUAPIAddingAllowedIP }
func (e *EventUAPIAddingAllowedIP) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventInvalidMAC1)(nil)
// EventInvalidMAC1 is an verbosef event recognized by the format string "Received packet with invalid mac1".
type EventInvalidMAC1 struct{}
func (e *EventInvalidMAC1) IsErrorf() bool { return false }
func (*EventInvalidMAC1) Format() string { return FormatVerbosefInvalidMAC1 }
func (e *EventInvalidMAC1) Args() []any { return []any{} }
func (*EventInvalidMAC1) Nice() string { return NiceVerbosefInvalidMAC1 }
func (e *EventInvalidMAC1) Slog(l *slog.Logger) { l.Warn(e.Nice()) }
var _ Event = (*EventUAPIRemovingAllAllowedIPs)(nil)
// EventUAPIRemovingAllAllowedIPs is an verbosef event recognized by the format string "%v - UAPI: Removing all allowedips".
type EventUAPIRemovingAllAllowedIPs struct {
Peer *device.Peer
}
func (e *EventUAPIRemovingAllAllowedIPs) IsErrorf() bool { return false }
func (*EventUAPIRemovingAllAllowedIPs) Format() string {
return FormatVerbosefUAPIRemovingAllAllowedIPs
}
func (e *EventUAPIRemovingAllAllowedIPs) Args() []any { return []any{e.Peer} }
func (*EventUAPIRemovingAllAllowedIPs) Nice() string { return NiceVerbosefUAPIRemovingAllAllowedIPs }
func (e *EventUAPIRemovingAllAllowedIPs) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventSendingKeepalivePacket)(nil)
// EventSendingKeepalivePacket is an verbosef event recognized by the format string "%v - Sending keepalive packet".
type EventSendingKeepalivePacket struct {
Peer *device.Peer
}
func (e *EventSendingKeepalivePacket) IsErrorf() bool { return false }
func (*EventSendingKeepalivePacket) Format() string { return FormatVerbosefSendingKeepalivePacket }
func (e *EventSendingKeepalivePacket) Args() []any { return []any{e.Peer} }
func (*EventSendingKeepalivePacket) Nice() string { return NiceVerbosefSendingKeepalivePacket }
func (e *EventSendingKeepalivePacket) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventReceivingKeepalivePacket)(nil)
// EventReceivingKeepalivePacket is an verbosef event recognized by the format string "%v - Receiving keepalive packet".
type EventReceivingKeepalivePacket struct {
Peer *device.Peer
}
func (e *EventReceivingKeepalivePacket) IsErrorf() bool { return false }
func (*EventReceivingKeepalivePacket) Format() string { return FormatVerbosefReceivingKeepalivePacket }
func (e *EventReceivingKeepalivePacket) Args() []any { return []any{e.Peer} }
func (*EventReceivingKeepalivePacket) Nice() string { return NiceVerbosefReceivingKeepalivePacket }
func (e *EventReceivingKeepalivePacket) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventCreateResponseMessageFailed)(nil)
// EventCreateResponseMessageFailed is an errorf event recognized by the format string "%v - Failed to create response message: %v".
type EventCreateResponseMessageFailed struct {
Peer *device.Peer
Err error
}
func (e *EventCreateResponseMessageFailed) IsErrorf() bool { return true }
func (*EventCreateResponseMessageFailed) Format() string {
return FormatErrorfCreateResponseMessageFailed
}
func (e *EventCreateResponseMessageFailed) Args() []any { return []any{e.Peer, e.Err} }
func (*EventCreateResponseMessageFailed) Nice() string { return NiceErrorfCreateResponseMessageFailed }
func (e *EventCreateResponseMessageFailed) Slog(l *slog.Logger) {
l.Error(e.Nice(), "Peer", e.Peer, "Err", e.Err)
}
var _ Event = (*EventBindUpdated)(nil)
// EventBindUpdated is an verbosef event recognized by the format string "UDP bind has been updated".
type EventBindUpdated struct{}
func (e *EventBindUpdated) IsErrorf() bool { return false }
func (*EventBindUpdated) Format() string { return FormatVerbosefBindUpdated }
func (e *EventBindUpdated) Args() []any { return []any{} }
func (*EventBindUpdated) Nice() string { return NiceVerbosefBindUpdated }
func (e *EventBindUpdated) Slog(l *slog.Logger) { l.Info(e.Nice()) }
var _ Event = (*EventUAPIUpdatingEndpoint)(nil)
// EventUAPIUpdatingEndpoint is an verbosef event recognized by the format string "%v - UAPI: Updating endpoint".
type EventUAPIUpdatingEndpoint struct {
Peer *device.Peer
}
func (e *EventUAPIUpdatingEndpoint) IsErrorf() bool { return false }
func (*EventUAPIUpdatingEndpoint) Format() string { return FormatVerbosefUAPIUpdatingEndpoint }
func (e *EventUAPIUpdatingEndpoint) Args() []any { return []any{e.Peer} }
func (*EventUAPIUpdatingEndpoint) Nice() string { return NiceVerbosefUAPIUpdatingEndpoint }
func (e *EventUAPIUpdatingEndpoint) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventStartedReceivingIncoming)(nil)
// EventStartedReceivingIncoming is an verbosef event recognized by the format string "Routine: receive incoming %s - stopped".
type EventStartedReceivingIncoming struct {
RecvName string
}
func (e *EventStartedReceivingIncoming) IsErrorf() bool { return false }
func (*EventStartedReceivingIncoming) Format() string { return FormatVerbosefStartedReceivingIncoming }
func (e *EventStartedReceivingIncoming) Args() []any { return []any{e.RecvName} }
func (*EventStartedReceivingIncoming) Nice() string { return NiceVerbosefStartedReceivingIncoming }
func (e *EventStartedReceivingIncoming) Slog(l *slog.Logger) {
l.Debug(e.Nice(), "RecvName", e.RecvName)
}
var _ Event = (*EventCreateCookieReplyFailed)(nil)
// EventCreateCookieReplyFailed is an errorf event recognized by the format string "Failed to create cookie reply: %v".
type EventCreateCookieReplyFailed struct {
Err error
}
func (e *EventCreateCookieReplyFailed) IsErrorf() bool { return true }
func (*EventCreateCookieReplyFailed) Format() string { return FormatErrorfCreateCookieReplyFailed }
func (e *EventCreateCookieReplyFailed) Args() []any { return []any{e.Err} }
func (*EventCreateCookieReplyFailed) Nice() string { return NiceErrorfCreateCookieReplyFailed }
func (e *EventCreateCookieReplyFailed) Slog(l *slog.Logger) { l.Error(e.Nice(), "Err", e.Err) }
var _ Event = (*EventInterfaceCloseIgnoreRequestedState)(nil)
// EventInterfaceCloseIgnoreRequestedState is an verbosef event recognized by the format string "Interface closed, ignored requested state %s".
type EventInterfaceCloseIgnoreRequestedState struct {
Want fmt.Stringer
}
func (e *EventInterfaceCloseIgnoreRequestedState) IsErrorf() bool { return false }
func (*EventInterfaceCloseIgnoreRequestedState) Format() string {
return FormatVerbosefInterfaceCloseIgnoreRequestedState
}
func (e *EventInterfaceCloseIgnoreRequestedState) Args() []any { return []any{e.Want} }
func (*EventInterfaceCloseIgnoreRequestedState) Nice() string {
return NiceVerbosefInterfaceCloseIgnoreRequestedState
}
func (e *EventInterfaceCloseIgnoreRequestedState) Slog(l *slog.Logger) {
l.Warn(e.Nice(), "Want", e.Want)
}
var _ Event = (*EventStoppedEncryptionWorker)(nil)
// EventStoppedEncryptionWorker is an verbosef event recognized by the format string "Routine: encryption worker %d - stopped".
type EventStoppedEncryptionWorker struct {
ID int
}
func (e *EventStoppedEncryptionWorker) IsErrorf() bool { return false }
func (*EventStoppedEncryptionWorker) Format() string { return FormatVerbosefStoppedEncryptionWorker }
func (e *EventStoppedEncryptionWorker) Args() []any { return []any{e.ID} }
func (*EventStoppedEncryptionWorker) Nice() string { return NiceVerbosefStoppedEncryptionWorker }
func (e *EventStoppedEncryptionWorker) Slog(l *slog.Logger) { l.Debug(e.Nice(), "ID", e.ID) }
var _ Event = (*EventSequentialReaderStopped)(nil)
// EventSequentialReaderStopped is an verbosef event recognized by the format string "%v - Routine: sequential sender - stopped".
type EventSequentialReaderStopped struct {
Peer *device.Peer
}
func (e *EventSequentialReaderStopped) IsErrorf() bool { return false }
func (*EventSequentialReaderStopped) Format() string { return FormatVerbosefSequentialReaderStopped }
func (e *EventSequentialReaderStopped) Args() []any { return []any{e.Peer} }
func (*EventSequentialReaderStopped) Nice() string { return NiceVerbosefSequentialReaderStopped }
func (e *EventSequentialReaderStopped) Slog(l *slog.Logger) { l.Debug(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventUDPGSODisabled)(nil)
// EventUDPGSODisabled is an verbosef event recognized by the format string "disabled UDP GSO on %s, NIC(s) may not support checksum offload".
type EventUDPGSODisabled struct {
OnLAddr string
}
func (e *EventUDPGSODisabled) IsErrorf() bool { return false }
func (*EventUDPGSODisabled) Format() string { return FormatVerbosefUDPGSODisabled }
func (e *EventUDPGSODisabled) Args() []any { return []any{e.OnLAddr} }
func (*EventUDPGSODisabled) Nice() string { return NiceVerbosefUDPGSODisabled }
func (e *EventUDPGSODisabled) Slog(l *slog.Logger) { l.Warn(e.Nice(), "OnLAddr", e.OnLAddr) }
var _ Event = (*EventHandshakeSendFailed)(nil)
// EventHandshakeSendFailed is an errorf event recognized by the format string "%v - Failed to send handshake response: %v".
type EventHandshakeSendFailed struct {
Peer *device.Peer
Err error
}
func (e *EventHandshakeSendFailed) IsErrorf() bool { return true }
func (*EventHandshakeSendFailed) Format() string { return FormatErrorfHandshakeSendFailed }
func (e *EventHandshakeSendFailed) Args() []any { return []any{e.Peer, e.Err} }
func (*EventHandshakeSendFailed) Nice() string { return NiceErrorfHandshakeSendFailed }
func (e *EventHandshakeSendFailed) Slog(l *slog.Logger) {
l.Error(e.Nice(), "Peer", e.Peer, "Err", e.Err)
}
var _ Event = (*EventCreateInitiationMessageFailed)(nil)
// EventCreateInitiationMessageFailed is an errorf event recognized by the format string "%v - Failed to create initiation message: %v".
type EventCreateInitiationMessageFailed struct {
Peer *device.Peer
Err error
}
func (e *EventCreateInitiationMessageFailed) IsErrorf() bool { return true }
func (*EventCreateInitiationMessageFailed) Format() string {
return FormatErrorfCreateInitiationMessageFailed
}
func (e *EventCreateInitiationMessageFailed) Args() []any { return []any{e.Peer, e.Err} }
func (*EventCreateInitiationMessageFailed) Nice() string {
return NiceErrorfCreateInitiationMessageFailed
}
func (e *EventCreateInitiationMessageFailed) Slog(l *slog.Logger) {
l.Error(e.Nice(), "Peer", e.Peer, "Err", e.Err)
}
var _ Event = (*EventDeriveKeypairFailed)(nil)
// EventDeriveKeypairFailed is an errorf event recognized by the format string "%v - Failed to derive keypair: %v".
type EventDeriveKeypairFailed struct {
Peer *device.Peer
Err error
}
func (e *EventDeriveKeypairFailed) IsErrorf() bool { return true }
func (*EventDeriveKeypairFailed) Format() string { return FormatErrorfDeriveKeypairFailed }
func (e *EventDeriveKeypairFailed) Args() []any { return []any{e.Peer, e.Err} }
func (*EventDeriveKeypairFailed) Nice() string { return NiceErrorfDeriveKeypairFailed }
func (e *EventDeriveKeypairFailed) Slog(l *slog.Logger) {
l.Error(e.Nice(), "Peer", e.Peer, "Err", e.Err)
}
var _ Event = (*EventInterfaceUpRequested)(nil)
// EventInterfaceUpRequested is an verbosef event recognized by the format string "Interface up requested".
type EventInterfaceUpRequested struct{}
func (e *EventInterfaceUpRequested) IsErrorf() bool { return false }
func (*EventInterfaceUpRequested) Format() string { return FormatVerbosefInterfaceUpRequested }
func (e *EventInterfaceUpRequested) Args() []any { return []any{} }
func (*EventInterfaceUpRequested) Nice() string { return NiceVerbosefInterfaceUpRequested }
func (e *EventInterfaceUpRequested) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventInterfaceDownRequested)(nil)
// EventInterfaceDownRequested is an verbosef event recognized by the format string "Interface down requested".
type EventInterfaceDownRequested struct{}
func (e *EventInterfaceDownRequested) IsErrorf() bool { return false }
func (*EventInterfaceDownRequested) Format() string { return FormatVerbosefInterfaceDownRequested }
func (e *EventInterfaceDownRequested) Args() []any { return []any{} }
func (*EventInterfaceDownRequested) Nice() string { return NiceVerbosefInterfaceDownRequested }
func (e *EventInterfaceDownRequested) Slog(l *slog.Logger) { l.Debug(e.Nice()) }
var _ Event = (*EventUAPIUpdatingPersistentKeepalive)(nil)
// EventUAPIUpdatingPersistentKeepalive is an verbosef event recognized by the format string "%v - UAPI: Updating persistent keepalive interval".
type EventUAPIUpdatingPersistentKeepalive struct {
Peer *device.Peer
}
func (e *EventUAPIUpdatingPersistentKeepalive) IsErrorf() bool { return false }
func (*EventUAPIUpdatingPersistentKeepalive) Format() string {
return FormatVerbosefUAPIUpdatingPersistentKeepalive
}
func (e *EventUAPIUpdatingPersistentKeepalive) Args() []any { return []any{e.Peer} }
func (*EventUAPIUpdatingPersistentKeepalive) Nice() string {
return NiceVerbosefUAPIUpdatingPersistentKeepalive
}
func (e *EventUAPIUpdatingPersistentKeepalive) Slog(l *slog.Logger) {
l.Debug(e.Nice(), "Peer", e.Peer)
}
var _ Event = (*EventPacketIPVersionInvalid)(nil)
// EventPacketIPVersionInvalid is an verbosef event recognized by the format string "Packet with invalid IP version from %v".
type EventPacketIPVersionInvalid struct {
Peer *device.Peer
}
func (e *EventPacketIPVersionInvalid) IsErrorf() bool { return false }
func (*EventPacketIPVersionInvalid) Format() string { return FormatVerbosefPacketIPVersionInvalid }
func (e *EventPacketIPVersionInvalid) Args() []any { return []any{e.Peer} }
func (*EventPacketIPVersionInvalid) Nice() string { return NiceVerbosefPacketIPVersionInvalid }
func (e *EventPacketIPVersionInvalid) Slog(l *slog.Logger) { l.Warn(e.Nice(), "Peer", e.Peer) }
var _ Event = (*EventReceivedInvalidResponse)(nil)
// EventReceivedInvalidResponse is an verbosef event recognized by the format string "Received invalid response message from %s".
type EventReceivedInvalidResponse struct {
Destination string
}
func (e *EventReceivedInvalidResponse) IsErrorf() bool { return false }
func (*EventReceivedInvalidResponse) Format() string { return FormatVerbosefReceivedInvalidResponse }
func (e *EventReceivedInvalidResponse) Args() []any { return []any{e.Destination} }
func (*EventReceivedInvalidResponse) Nice() string { return NiceVerbosefReceivedInvalidResponse }
func (e *EventReceivedInvalidResponse) Slog(l *slog.Logger) {
l.Warn(e.Nice(), "Destination", e.Destination)
}
var _ Event = (*EventSendHandshakeInitiationFailed)(nil)
// EventSendHandshakeInitiationFailed is an errorf event recognized by the format string "%v - Failed to send handshake initiation: %v".
type EventSendHandshakeInitiationFailed struct {
Peer *device.Peer
Err error
}
func (e *EventSendHandshakeInitiationFailed) IsErrorf() bool { return true }
func (*EventSendHandshakeInitiationFailed) Format() string {
return FormatErrorfSendHandshakeInitiationFailed
}
func (e *EventSendHandshakeInitiationFailed) Args() []any { return []any{e.Peer, e.Err} }
func (*EventSendHandshakeInitiationFailed) Nice() string {
return NiceErrorfSendHandshakeInitiationFailed
}
func (e *EventSendHandshakeInitiationFailed) Slog(l *slog.Logger) {
l.Error(e.Nice(), "Peer", e.Peer, "Err", e.Err)
}