@@ -34,7 +34,7 @@ use super::l7_protocol_info::L7ProtocolInfo;
3434use super :: MetaPacket ;
3535
3636use crate :: common:: meta_packet:: { IcmpData , ProtocolData } ;
37- use crate :: config:: config:: { Iso8583ParseConfig , WebSphereMqParseConfig } ;
37+ use crate :: config:: config:: { Iso8583ParseConfig , NetSignParseConfig , WebSphereMqParseConfig } ;
3838use crate :: config:: handler:: LogParserConfig ;
3939use crate :: config:: OracleConfig ;
4040use crate :: flow_generator:: flow_map:: FlowMapCounter ;
@@ -103,6 +103,8 @@ macro_rules! impl_protocol_parser {
103103 #[ cfg( feature = "enterprise" ) ]
104104 "ISO-8583" =>Ok ( Self :: Iso8583 ( Default :: default ( ) ) ) ,
105105 #[ cfg( feature = "enterprise" ) ]
106+ "NetSign" |"netsign" |"net_sign" =>Ok ( Self :: NetSign ( Default :: default ( ) ) ) ,
107+ #[ cfg( feature = "enterprise" ) ]
106108 "WebSphereMQ" =>Ok ( Self :: WebSphereMq ( Default :: default ( ) ) ) ,
107109 $(
108110 stringify!( $proto) => Ok ( Self :: $proto( Default :: default ( ) ) ) ,
@@ -202,6 +204,7 @@ cfg_if::cfg_if! {
202204 Tars ( TarsLog ) ,
203205 Oracle ( crate :: flow_generator:: protocol_logs:: OracleLog ) ,
204206 Iso8583 ( crate :: flow_generator:: protocol_logs:: Iso8583Log ) ,
207+ NetSign ( crate :: flow_generator:: protocol_logs:: NetSignLog ) ,
205208 MQTT ( MqttLog ) ,
206209 AMQP ( AmqpLog ) ,
207210 NATS ( NatsLog ) ,
@@ -691,6 +694,7 @@ pub struct ParseParam<'a> {
691694 pub oracle_parse_conf : OracleConfig ,
692695 pub iso8583_parse_conf : Iso8583ParseConfig ,
693696 pub web_sphere_mq_parse_conf : WebSphereMqParseConfig ,
697+ pub net_sign_parse_conf : NetSignParseConfig ,
694698}
695699
696700impl < ' a > fmt:: Debug for ParseParam < ' a > {
@@ -723,6 +727,7 @@ impl<'a> fmt::Debug for ParseParam<'a> {
723727 . field ( "oracle_parse_conf" , & self . oracle_parse_conf )
724728 . field ( "iso8583_parse_conf" , & self . iso8583_parse_conf )
725729 . field ( "web_sphere_mq_parse_conf" , & self . web_sphere_mq_parse_conf )
730+ . field ( "net_sign_parse_conf" , & self . net_sign_parse_conf )
726731 . finish ( )
727732 }
728733}
@@ -796,6 +801,7 @@ impl<'a> ParseParam<'a> {
796801 oracle_parse_conf : OracleConfig :: default ( ) ,
797802 iso8583_parse_conf : Iso8583ParseConfig :: default ( ) ,
798803 web_sphere_mq_parse_conf : WebSphereMqParseConfig :: default ( ) ,
804+ net_sign_parse_conf : NetSignParseConfig :: default ( ) ,
799805 }
800806 }
801807}
@@ -841,6 +847,10 @@ impl<'a> ParseParam<'a> {
841847 self . web_sphere_mq_parse_conf = conf. clone ( ) ;
842848 }
843849
850+ pub fn set_net_sign_conf ( & mut self , conf : & NetSignParseConfig ) {
851+ self . net_sign_parse_conf = * conf;
852+ }
853+
844854 pub fn reversed ( & self ) -> Self {
845855 Self {
846856 ip_src : self . ip_dst ,
@@ -858,6 +868,7 @@ impl<'a> ParseParam<'a> {
858868 stats_counter : self . stats_counter . clone ( ) ,
859869 iso8583_parse_conf : self . iso8583_parse_conf . clone ( ) ,
860870 web_sphere_mq_parse_conf : self . web_sphere_mq_parse_conf . clone ( ) ,
871+ net_sign_parse_conf : self . net_sign_parse_conf ,
861872 ..* self
862873 }
863874 }
0 commit comments