On Mon, 18 Dec 2006 22:31:27 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote:

> The general trend in USB is to treat the direction as part of the
> endpoint's identification.  For instance, we say that a device can have up
> to 32 endpoints (16 IN and 16 OUT).  And ep1-out (0x01) is definitely
> _not_ the same endpoint as ep1-in (0x81) -- it's even legal to have them
> belong to two different interfaces.

OK...

Paolo, how about you add the attached to your tree and change the
libpcap too?

-- Pete

P.S. Sorry, I haven't looked at the class thing yet.

diff -urp -X dontdiff linux-2.6.20-rc1-mon9/Documentation/usb/usbmon.txt 
linux-2.6.20-rc1-mon/Documentation/usb/usbmon.txt
--- linux-2.6.20-rc1-mon9/Documentation/usb/usbmon.txt  2006-12-18 
17:57:30.000000000 -0800
+++ linux-2.6.20-rc1-mon/Documentation/usb/usbmon.txt   2006-12-18 
18:41:01.000000000 -0800
@@ -177,8 +177,8 @@ the following structure (its name is mad
 struct usbmon_packet {
        u64 id;                 /*  0: URB ID - from submission to callback */
        unsigned char type;     /*  8: Same as text; extensible. */
-       unsigned char xfer_type; /*    ISO, Intr, Control, Bulk; 0x80 IN */
-       unsigned char epnum;    /*     Endpoint number */
+       unsigned char xfer_type; /*    ISO (0), Intr, Control, Bulk (3) */
+       unsigned char epnum;    /*     Endpoint number and transfer direction */
        unsigned char devnum;   /*     Device address */
        u16 busnum;             /* 12: Bus number */
        char flag_setup;        /* 14: Same as text */
diff -urp -X dontdiff linux-2.6.20-rc1-mon9/drivers/usb/mon/mon_bin.c 
linux-2.6.20-rc1-mon/drivers/usb/mon/mon_bin.c
--- linux-2.6.20-rc1-mon9/drivers/usb/mon/mon_bin.c     2006-12-18 
17:57:30.000000000 -0800
+++ linux-2.6.20-rc1-mon/drivers/usb/mon/mon_bin.c      2006-12-18 
18:40:00.000000000 -0800
@@ -79,8 +79,8 @@
 struct mon_bin_hdr {
        u64 id;                 /* URB ID - from submission to callback */
        unsigned char type;     /* Same as in text API; extensible. */
-       unsigned char xfer_type;        /* ISO, Intr, Control, Bulk; 0x80 IN */
-       unsigned char epnum;    /* Endpoint number */
+       unsigned char xfer_type;        /* ISO, Intr, Control, Bulk */
+       unsigned char epnum;    /* Endpoint number and transfer direction */
        unsigned char devnum;   /* Device address */
        unsigned short busnum;  /* Bus number */
        char flag_setup;
@@ -436,9 +436,9 @@ static void mon_bin_event(struct mon_rea
         */
        memset(ep, 0, PKT_SIZE);
        ep->type = ev_type;
+       ep->xfer_type = usb_pipetype(urb->pipe);
        /* We use the fact that usb_pipein() returns 0x80 */
-       ep->xfer_type = usb_pipetype(urb->pipe) | usb_pipein(urb->pipe);
-       ep->epnum = usb_pipeendpoint(urb->pipe);
+       ep->epnum = usb_pipeendpoint(urb->pipe) | usb_pipein(urb->pipe);
        ep->devnum = usb_pipedevice(urb->pipe);
        ep->busnum = rp->r.m_bus->u_bus->busnum;
        ep->id = (unsigned long) urb;
@@ -496,9 +496,9 @@ static void mon_bin_error(void *data, st
 
        memset(ep, 0, PKT_SIZE);
        ep->type = 'E';
+       ep->xfer_type = usb_pipetype(urb->pipe);
        /* We use the fact that usb_pipein() returns 0x80 */
-       ep->xfer_type = usb_pipetype(urb->pipe) | usb_pipein(urb->pipe);
-       ep->epnum = usb_pipeendpoint(urb->pipe);
+       ep->epnum = usb_pipeendpoint(urb->pipe) | usb_pipein(urb->pipe);
        ep->devnum = usb_pipedevice(urb->pipe);
        ep->busnum = rp->r.m_bus->u_bus->busnum;
        ep->id = (unsigned long) urb;

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to