udev: added 69-blackberry.rules for Fedora 12 systems
[barry.git] / src / convo.awk
blob005c4bee6ca85304fd224fd998072d2b639fc92f
2 # This script is useful for turning a UsbSnoop log file into something
3 # more readable. It assumes USB endpoints 0x05 and 0x82
6 BEGIN {
7 # 0 for down
8 # 1 for up
9 direction = 0;
11 # boolean
12 docopy = 0;
15 />>>/ {
16 direction = 0;
17 docopy = 0;
18 print $0;
21 /<<</ {
22 direction = 1;
23 docopy = 0;
24 print $0;
27 /endpoint 0x00000002/ {
28 # only copy data going to the output endpoint
29 if( direction == 0 ) {
30 docopy = 1;
31 printf "\nsep: 2\n";
35 /endpoint 0x00000005/ {
36 # only copy data going to the output endpoint
37 if( direction == 0 ) {
38 docopy = 1;
39 printf "\nsep: 5\n";
43 /endpoint 0x00000082/ {
44 # only copy data coming from the input endpoint
45 if( direction == 1 ) {
46 docopy = 1;
47 printf "rep: 82\n";
51 /^ [0-9AaBbCcDdEeFf]*: / {
52 if( docopy ) {
53 print $0;