@@ -3708,6 +3708,38 @@ static void readExtendedQueueDepth(SFSample *sample)
3708
3708
sf_log_next32 (sample , "queue_depth_bytes" );
3709
3709
}
3710
3710
3711
+ /*_________________----------------------------__________________
3712
+ _________________ readExtendedHardwareTrap __________________
3713
+ -----------------____________________________------------------
3714
+ */
3715
+
3716
+ static void readExtendedHardwareTrap (SFSample * sample )
3717
+ {
3718
+ sf_logf (sample , "extendedType" , "hw_trap" );
3719
+ char groupName [SFL_MAX_HW_TRAP_LEN + 1 ];
3720
+ char trapName [SFL_MAX_HW_TRAP_LEN + 1 ];
3721
+ if (getString (sample , groupName , SFL_MAX_HW_TRAP_LEN ) > 0 ) {
3722
+ sf_logf (sample , "hw_trap_group" , groupName );
3723
+ }
3724
+ if (getString (sample , trapName , SFL_MAX_HW_TRAP_LEN ) > 0 ) {
3725
+ sf_logf (sample , "hw_trap_name" , trapName );
3726
+ }
3727
+ }
3728
+
3729
+ /*_________________----------------------------__________________
3730
+ _________________ readExtendedLinuxReason __________________
3731
+ -----------------____________________________------------------
3732
+ */
3733
+
3734
+ static void readExtendedLinuxReason (SFSample * sample )
3735
+ {
3736
+ sf_logf (sample , "extendedType" , "linux_reason" );
3737
+ char reason [SFL_MAX_LINUX_REASON_LEN + 1 ];
3738
+ if (getString (sample , reason , SFL_MAX_LINUX_REASON_LEN ) > 0 ) {
3739
+ sf_logf (sample , "linux_drop_reason" , reason );
3740
+ }
3741
+ }
3742
+
3711
3743
/*_________________---------------------------__________________
3712
3744
_________________ readFlowSample_v2v4 __________________
3713
3745
-----------------___________________________------------------
@@ -4089,6 +4121,8 @@ static void readDiscardSample(SFSample *sample)
4089
4121
case SFLFLOW_HEADER : readFlowSample_header (sample ); break ;
4090
4122
case SFLFLOW_EX_FUNCTION : readExtendedFunction (sample ); break ;
4091
4123
case SFLFLOW_EX_EGRESS_Q : readExtendedEgressQueue (sample ); break ;
4124
+ case SFLFLOW_EX_HW_TRAP : readExtendedHardwareTrap (sample ); break ;
4125
+ case SFLFLOW_EX_LINUX_REASON : readExtendedLinuxReason (sample ); break ;
4092
4126
default : skipTLVRecord (sample , tag , length , "discard_sample_element" ); break ;
4093
4127
}
4094
4128
lengthCheck (sample , "discard_sample_element" , start , length );
0 commit comments