Re: [linux-usb-devel] USB bridge cables in non-network mode
2003-06-12T17:21:01 Greg Brigley: Thanks, I wasn't aware that winpcap could send as well as receive. Very, very good point, I'd completely forgotten about that, libpcap is just the sniffer half. Its complement is libnet, and it seems to have Windows support as well. Somehow I forget that this sort of stuff requires two separate packages. In the general case, I don't think a great case could be made for using libpcap+libnet to implement networking tools for normal production use, rather than using the OS stack. But your case isn't the general one; you've got this simple cable with two endpoints and you want a single application to talk over it. In some abstract sense, using the OS's whole networking stack is arguably cleaner, but it's understandable that you don't want to force your users to have to configure networking. I think that using libpcap+libnet together with the standard network-interface low-level drivers is a cleaner solution than attempting to write and maintain a new custom USB protocol implementation. -Bennett pgp0.pgp Description: PGP signature
Re: [linux-usb-devel] USB bridge cables in non-network mode
2003-06-12T13:20:38 Greg Brigley: :) Yes. From an implementation perspective, using the network sounds simpler and more flexible. But going without it reduces the amount of configuration our users have to do, and the amount of support that we have to do. I just occurred to me, any possibility it might make sense to use a network protocol over the network bridge cable, and save the user from having to configure Windows networking by building your Windows-side app on the Window pcap library? Given you've got a pure point-to-point connection, with only two participants, one of which can always be the initiator, the full complexity of TCP is probably not necessary. Writing a simple UDP-based protocol with acknowlegements, checksums, sequence numbers, and retries should be fairly painless I'd think. Don't even worry about address negotiation, just hardwire in one address for the host side and another for the client; since you aren't going to be pointing the OS's network stack at this interface no need to worry about conflicts, no? -Bennett pgp0.pgp Description: PGP signature