|
2#
楼主 |
发表于 2009-12-1 17:31:34
|
只看该作者
Suppose that data.ws contains the following buffer, buf1:
"\x00\x01\x85\x80\x00\x01\x00\x01\x00\x00\x00\x00\x07"
"Mercury"
"\x02"
"co"
"\x02"
"il"
"\x00\x00\x01\x00\x01\xc0"
Suppose that the value of Param1 in the parameter list is "\x01", a string indicating the group name.
lrs_save_searched_string ("socket0", "buf1", "correlation", "LB/BIN=\\x00{Param1}", "RB/BIN=\\x02", 2, 3, -1);
The above function saves the string appearing at offset 3 from the second occurrence of \x00\x01 into a parameter called "correlation.".
After this call, the "correlation" parameter will contain:
\x00\x00\x00\x07Mercury
The left boundary is "\x00\x01" which appears 5 times in the buffer. The second ordinal is:
"\x00\x01\x85\x80\x00\x01".
Offset 3 from this boundary is:
"\x00\x01\x85\x80\x00\x01\x00\x01\x00". |
|