Hi!

I need some direction writing a perl script and would
apprecitiate
any help I could get.

Okay, this is what I need to do...

I've a text file that has kept a log of information. 
Here is some
actual data from the file.


--






- - - - - - - - - - - - - - - - - - - - Frame 1 - - -
- - - - - - - - - - - - - - - - -

Scaned Delta Time: 0.000.000
 Delta Time: 0.000000 ms
 time_stamp_hi: d; time_stamp_lo: 693a40.

 00 00 0c 07 ac 05 00 e0 0c c8 86 67 08 00 45 80
 00 26 f7 ed 00 00 40 11 e0 d0 0a 96 48 d6 0a 96
 43 87 ea 60 ea 64 00 12 db 2a 12 12 39 67 0d 10
 ff ff 55 c7

    THE UDP PACKET  ...
     MAC_HDR: Pkt SIZE =  56, MAC DES = 00000c07ac05,
MAC SRC = 00e00cc88667, Type/Len = 0800.
     IP_HDR:  45800026f7ed00004011, IP DES = 0a964387,
IP SRC = 0a9648d6
     UDP_HDR:  UDP SRC = ea60, UDP DES = ea64, UDP LEN
= 0012
     IOS CRC: 55c7
     FORWARD LINK PACKET:
     IOS_HDR-FCH/DCCH: Msg Type = 12, SHO = 1, FSN =
2, FPC:GR = 0x39, RPC:OLT = 0x67,
                        Frm CONT = 0d, FIM = 10.


     Mux PDU 1: RLP FRAME length: 2
     RLP FRAME: ff ff 

     DECODED RLP RATE: 3.
     BAD CTRL FRAME FCS!
     ** DECODED RLP FRAME TYPE: DISCARD.

- - - - - - - - - - - - - - - - - - - - Frame 2 - - -
- - - - - - - - - - - - - - - - -

Scaned Delta Time: 0.000.053
 Delta Time: 0.053000 ms
 time_stamp_hi: d; time_stamp_lo: 6949c7.

 00 e0 0c c8 e6 e0 00 04 de 1a f4 00 08 00 45 80
 00 26 f7 ed 00 00 3f 11 e1 d0 0a 96 48 d6 0a 96
 43 87 ea 60 ea 64 00 12 db 2a 12 12 39 67 0d 10
 ff ff 55 c7

    THE UDP PACKET  ...
     MAC_HDR: Pkt SIZE =  56, MAC DES = 00e00cc8e6e0,
MAC SRC = 0004de1af400, Type/Len = 0800.
     IP_HDR:  45800026f7ed00003f11, IP DES = 0a964387,
IP SRC = 0a9648d6
     UDP_HDR:  UDP SRC = ea60, UDP DES = ea64, UDP LEN
= 0012
     IOS CRC: 55c7
     FORWARD LINK PACKET:
     IOS_HDR-FCH/DCCH: Msg Type = 12, SHO = 1, FSN =
2, FPC:GR = 0x39, RPC:OLT = 0x67,
                        Frm CONT = 0d, FIM = 10.


     Mux PDU 1: RLP FRAME length: 2
     RLP FRAME: ff ff 

     DECODED RLP RATE: 3.
     BAD CTRL FRAME FCS!
     ** DECODED RLP FRAME TYPE: DISCARD.

- - - - - - - - - - - - - - - - - - - - Frame 3 - - -
- - - - - - - - - - - - - - - - -

Scaned Delta Time: 0.019.940
 Delta Time: 19.940000 ms
 time_stamp_hi: d; time_stamp_lo: 801b93.

 00 00 0c 07 ac 05 00 e0 0c c8 86 67 08 00 45 80
 00 26 f7 ee 00 00 40 11 e0 cf 0a 96 48 d6 0a 96
 43 87 ea 60 ea 64 00 12 43 4a 12 13 39 67 0d 10
 ff ff ed a6

    THE UDP PACKET  ...
     MAC_HDR: Pkt SIZE =  56, MAC DES = 00000c07ac05,
MAC SRC = 00e00cc88667, Type/Len = 0800.
     IP_HDR:  45800026f7ee00004011, IP DES = 0a964387,
IP SRC = 0a9648d6
     UDP_HDR:  UDP SRC = ea60, UDP DES = ea64, UDP LEN
= 0012
     IOS CRC: eda6
     FORWARD LINK PACKET:
     IOS_HDR-FCH/DCCH: Msg Type = 12, SHO = 1, FSN =
3, FPC:GR = 0x39, RPC:OLT = 0x67,
                        Frm CONT = 0d, FIM = 10.


     Mux PDU 1: RLP FRAME length: 2
     RLP FRAME: ff ff 

     DECODED RLP RATE: 3.
     BAD CTRL FRAME FCS!
     ** DECODED RLP FRAME TYPE: DISCARD.

- - - - - - - - - - - - - - - - - - - - Frame 4 - - -
- - - - - - - - - - - - - - - - -

Scaned Delta Time: 0.000.019
 Delta Time: 0.019000 ms
 time_stamp_hi: d; time_stamp_lo: 802124.

 00 e0 0c c8 e6 e0 00 04 de 1a f4 00 08 00 45 80
 00 26 f7 ee 00 00 3f 11 e1 cf 0a 96 48 d6 0a 96
 43 87 ea 60 ea 64 00 12 43 4a 12 13 39 67 0d 10
 ff ff ed a6

    THE UDP PACKET  ...
     MAC_HDR: Pkt SIZE =  56, MAC DES = 00e00cc8e6e0,
MAC SRC = 0004de1af400, Type/Len = 0800.
     IP_HDR:  45800026f7ee00003f11, IP DES = 0a964387,
IP SRC = 0a9648d6
     UDP_HDR:  UDP SRC = ea60, UDP DES = ea64, UDP LEN
= 0012
     IOS CRC: eda6
     FORWARD LINK PACKET:
     IOS_HDR-FCH/DCCH: Msg Type = 12, SHO = 1, FSN =
3, FPC:GR = 0x39, RPC:OLT = 0x67,
                        Frm CONT = 0d, FIM = 10.


     Mux PDU 1: RLP FRAME length: 2
     RLP FRAME: ff ff 

     DECODED RLP RATE: 3.
     BAD CTRL FRAME FCS!
     ** DECODED RLP FRAME TYPE: DISCARD.

--






Okay the file contains an undertimmed amount of frames
and what I need to do
is record the following for each frame:

1) frame number
2) what kind of link packet
3) what kind of  '** decoded rlp frame type:'

I have to do this for all the frames in the file and
would like to output 
the data in a new text file in the following format or
a similar one.

--






Frame           Link Packet              ** Decoded
RLD FRAME Type
------          --------------          
---------------------------
  1                Forward                       
Discard

  2                Forward                       
Discard

  3                Forward                       
Discard






--

Well I hope you get the jest of what needs to be done.
 I know some
PERL but not that a lot.  And before I continue, let
me say that
not every frame in the file has the same format (ie.
some are missing
UDP_HDR and IOS CRC, for example) and there is an
undertimmed amount
of frames too.

Okay here are my ideas to code the script.  

1) Open the file
2) Have regulart expressions that search for the
needed info. My
   question is how what type of varibale should i
store each 
   record?  I'm confused.

Well that's all I can think of and would like your
suggestions.


Thanks a lot!!!!!!
Tom



__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to