using CoreAgent.Domain.Models.Protocol; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace CoreAgent.Infrastructure.Services.ProtocolLogHandlers { public abstract class ProtocolParesHandleLogs { #region Regex public readonly Regex _regExpPhy = new Regex(@"^([a-f0-9\-]+)\s+([a-f0-9\-]+)\s+([\d\.\-]+) (\w+): (.+)"); public readonly Regex _regExpInfo1 = new Regex(@"^([\w\-]+): (.+)"); public readonly Regex _regExpInfo2 = new Regex(@"^([\w]+) (.+)"); public readonly Regex _regExpParams1 = new Regex(@"\s+"); public readonly Regex _regExpParams2 = new Regex(@"=|:"); public readonly Regex _regExpIP = new Regex(@"^(len=\d+)\s+(\S+)\s+(.*)"); public readonly Regex _regExpIPsec = new Regex(@"^len=(\d+)\s+(.*)"); public readonly Regex _regExpIKEV2 = new Regex(@"^(\S+)\s+(.*)"); public readonly Regex _regExpSDULen = new Regex(@"SDU_len=(\d+)"); public readonly Regex _regExpSIP = new Regex(@"^([:\.\[\]\da-f]+)\s+(\S+) (.+)"); public readonly Regex _regExpMediaReq = new Regex(@"^(\S+) (.+)"); public readonly Regex _regExpSignalRecord = new Regex(@"Link:\s([\w\d]+)@(\d+)"); public readonly Regex _regExpCellID = new Regex(@"^([a-f0-9\-]+) (.+)"); public readonly Regex _regExpRRC_UE_ID = new Regex(@"Changing UE_ID to 0x(\d+)"); public readonly Regex _regExpRRC_TMSI = new Regex(@"(5G|m)-TMSI '([\dA-F]+)'H"); public readonly Regex _regExpRRC_NEW_ID = new Regex(@"newUE-Identity (['\dA-FH]+)"); public readonly Regex _regExpRRC_CRNTI = new Regex(@"c-RNTI '([\dA-F]+)'H"); public readonly Regex _regExpNAS_TMSI = new Regex(@"m-TMSI = 0x([\da-f]+)"); public readonly Regex _regExpNAS_5GTMSI = new Regex(@"5G-TMSI = 0x([\da-f]+)"); public readonly Regex _regExpRRC_BC = new Regex(@"(EUTRA|MRDC|NR|NRDC) band combinations"); public readonly Regex _regExpPDCCH = new Regex(@"^\s*(.+)=(\d+)$"); public readonly Regex _regExpS1NGAP = new Regex(@"^([\da-f\-]+)\s+([\da-f\-]+) (([^\s]+) .+)"); public readonly Regex _regExpECPRI = new Regex(@"len=(\d+)"); public readonly Regex _regExpHexDump = new Regex(@"^[\da-f]+:(\s+[\da-f]{2}){1,16}\s+.{1,16}$"); #endregion public abstract Task GetTryParesLogDataHandle(ProtocolLog model); } }