Changeset 9d7d9e9


Ignore:
Timestamp:
04/29/06 11:42:49 (15 years ago)
Author:
Perry Lorier <perry@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
da22687
Parents:
2ba89b7
Message:
  • Clarify the documentation for trace_read_packet()
  • Force blocking mode in pcap
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    re4e95499 r9d7d9e9  
    162162                        AC_DEFINE(HAVE_PCAP_SENDPACKET,1,[pcap has pcap_sendpacket]),
    163163                        have_pcap_sendpacket=false)
     164
     165        AC_CHECK_LIB(pcap,pcap_setnonblock,
     166                        AC_DEFINE(HAVE_PCAP_SETNONBLOCK,1,[pcap has pcap_setnonblock]),
     167                        have_pcap_setnonblock=false)
    164168fi
    165169
  • lib/format_pcap.c

    r7af689a r9d7d9e9  
    223223                }
    224224        }
     225#ifdef HAVE_PCAP_SETNONBLOCK
     226        pcap_setnonblock(&INPUT.pcap,0,errbuf);
     227#endif
    225228        return 0; /* success */
    226229}
  • lib/libtrace.h

    r2ba89b7 r9d7d9e9  
    641641 * @param trace         the libtrace opaque pointer
    642642 * @param packet        the packet opaque pointer
    643  * @return 0 on EOF, negative value on error
    644  *
     643 * @return 0 on EOF, negative value on error, number of bytes read when
     644 * successful.
     645 *
     646 * @note the number of bytes read is usually (but not always) the same as
     647 * trace_get_framing_length()+trace_get_capture_length() depending on the
     648 * trace format.
    645649 * @note the trace must have been started with trace_start before calling
    646650 * this function
Note: See TracChangeset for help on using the changeset viewer.