Forum Discussion

Robert_47833's avatar
Robert_47833
Icon for Altostratus rankAltostratus
Jun 20, 2012

tcp::payload question

hi,dear irule

 

1:if I use tcp::collect 50 to collect first 50 bytes,then I wanna extract 21-22 bytes via tcp::payload

 

how to achieve this?

 

 

 

2:tcp::payload 2 means take first 2bytes from payload,right?

 

 

3:in the hi,

 

1:if I use tcp::collect 50 to collect first 50 bytes,then I wanna extract 21-22 bytes via tcp::payload

 

how to achieve this?

 

 

 

2:tcp::payload 2 means take first 2bytes from payload,right?

 

 

3:in the

 

 

TCP::payload []¶

 

 

Returns the accumulated TCP data content. If is specified, and more than bytes are available, only the first bytes of collected data are returned.

 

 

TCP::payload []
  • Returns the accumulated TCP data content. If is specified, and more than bytes are available, only the first bytes of collected data are returned.

 

 

 

 

 

 

what does "If is specified, and more than bytes are available, only the first bytes of collected data are returned If is specified, and more than bytes are available, only the first bytes of collected data are returned" mean?

 

 

 

 

 

 

 

 

  • Hi Robbie,

     

     

    Your post got a bit jumbled. Can you post it in clear text or use [ code ] [/ code ] blocks (without the spaces)?

     

     

    Also, I updated the TCP::payload page as some of the keywords were in angle brackets and weren't being rendered on the page. Hopefully the doc is a little clearer now.

     

    https://devcentral.f5.com/wiki/iRules.TCP__payload.ashx

     

     

    Thanks, Aaron
  • hi,dear irule

     

    1:if I use tcp::collect 50 to collect first 50 bytes,then I wanna extract 21-22 bytes via tcp::payload

     

    how to achieve this?

     

     

     

    2:tcp::payload 2 means take first 2bytes from payload,right?

     

     

    3:in the tcp::payload size

     

    Returns the accumulated TCP data content. If is specified, and more than bytes are available, only the first bytes of collected data are returned.

     

     

    what does "If is specified, and more than bytes are available, only the first bytes of collected data are returned If is specified, and more than bytes are available, only the first bytes of collected data are returned" mean?