Teledyne LeCroy Conquest User Manual - Users Manual User Manual
Page 244

Appendix A
234
Sample2: LCP (PPP)
[ProductName = SBAE]
ProtocolName = "LCP"
ProtocolTransferRequirement
{
USBControlTransfer
{
ControlType = Class
}
}
ProtocolTransferDefinition
{
ProtocolCommand = USBControlTransfer
}
End
[Decoding]
{
/*
The script of other protocols goes here.
*/
Repeat (not EOD)
{
Data1 = GetData(CURPOS, 16);
/* 0xc021 is the LCP code in PPP Protocol. */
If (ValueOf(Data1) = 0x21 ) Then
{
ProtocolHeader = AddField(CURPOS, 16," ProtocolHeader", "The
protocol is LCP", "LCP");
Code = AddField(CURPOS, 8, "LCP Code", "LCP Code","LCP Code");
Id = AddField(CURPOS, 8,"Id LCP", "Id LCP", "Id LCP" );
Length = AddField(CURPOS, 16,"Length", "Length", "Length");
Repeat (CURPOS - StartOf(ProtocolHeader)) < ValueOf(Length)
{
Type = AddField(CURPOS, 8, "Type", "Type", "Type");
TypeLength=AddField(CURPOS,8,"TypeLength","TypeLength",
"TypeLength");
If (ValueOf(Type) = 0x26 ) Then
{
Repeat CURPOS - StartOf(Type) < ValueOf(Length)
{
LengthElision=AddField(CURPOS,8,"LengthElision",
"LengthElision","LengthElision");
Elision = AddField(CURPOS,ValueOf(LengthElision),
"Elision","Elision", "Elision");
}
}
Else If (ValueOf(Type) = 0x28 ) Then
{
Internationalization = AddField(CURPOS,
16,"Internationalization",
"Internationalization",
"Internt");