On Jul 23, 2004, at 2:22 AM, J. Thomsen wrote:
So, since we already have som win32 specific stuff, then why not add this feature to winpcap ?
Because it can be supported on at least some other platforms as well, and shouldn't be WinPcap-specific, so it should be added to libpcap in general?
Could be something like pcap_toggle_loopback(on / off), wich sets the correct flag if pcap_toggle_loopback( off ) was called. By default this should offcause be "on", so that it behaves like it does currently.
I'd be inclined to call it "see sent" mode, along the lines of the BIOCGSEESENT/BIOCSSEESENT ioctls in some BSDs.
I also wouldn't call it "toggle" - a "toggle" call would take no arguments and set the current mode to the opposite of its current value. Instead, I'd have
int pcap_getseesent(pcap_t *p);
which returns 1 if "see sent" mode is on and 0 if it's off (and -1 if the call fails for whatever reason; "pcap_geterr(p)" would get the error string for the failure reason - yes, this differs from "pcap_getnonblock()", the "errbuf" argument to that was a mistake), and
int pcap_setseesent(pcap_t *p, int seesent);
which would attempt to set the value of the "see sent" flag to "seesent" (1 for on, 0 for off), and would return 0 on success and -1 on failure. (One failure reason would be "this platform doesn't support that mode so you can't turn it on".)
================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================
