as the usbmon.txt provided a perl script to receive the input.
Do you talking about the following function(from usbmon.txt)

class ParsedLine {
       int data_len;           /* Available length of data */
       byte data[];

       void parseData(StringTokenizer st) {
What is String Tokenizer st. ? Is this from /sys/kernel/debug/usbmon/*t file?
               int availwords = st.countTokens();
               data = new byte[availwords * 4];
               data_len = 0;
               while (st.hasMoreTokens()) {
                       String data_str = st.nextToken();
                       int len = data_str.length() / 2;
                       int i;
                       int b;  // byte is signed, apparently?! XXX
                       for (i = 0; i < len; i++) {
                               // data[data_len] = Byte.parseByte(
                               //     data_str.substring(i*2, i*2 + 2),
                               //     16);
                               b = Integer.parseInt(
                                    data_str.substring(i*2, i*2 + 2),
                                    16);
                               if (b >= 128)
                                       b *= -1;
                               data[data_len] = (byte) b;
                               data_len++;
                       }
               }
       }
}
Could you please provide more description for this function? Viz what are inputs and outputs.

....receive the input....which if the USB is the network hardware...then the incoming data is TCP/IP....ARP and all sorts of that structures....correct?

I did not get exactly what this mean? do please elaborate  it.

Thanks & Regards,
Ravikumar

Peter Teoh wrote:

On Jan 28, 2008 1:45 PM, ravikumar <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    But i'm unable to undserstand the documentation for parsing data.
    I need only two things data length and flow.


May be I am wrong....but I think u don't have to understand the documentation, as the usbmon.txt provided a perl script to receive the input....which if the USB is the network hardware...then the incoming data is TCP/IP....ARP and all sorts of that structures....correct?

Reply via email to