Exemple #1
0
 /// <summary>
 /// Extended pcap_open() method that is Npcap/Winpcap specific that
 /// provides extra flags and functionality
 /// See http://www.winpcap.org/docs/docs_40_2/html/group__wpcapfunc.html#g2b64c7b6490090d1d37088794f1f1791
 /// </summary>
 /// <param name="dev">
 /// A <see cref="string"/>
 /// </param>
 /// <param name="packetLen">
 /// A <see cref="int"/>
 /// </param>
 /// <param name="flags">
 /// A <see cref="int"/>
 /// </param>
 /// <param name="read_timeout">
 /// A <see cref="int"/>
 /// </param>
 /// <param name="rmtauth">
 /// A <see cref="IntPtr"/>
 /// </param>
 /// <param name="errbuf">
 /// A <see cref="StringBuilder"/>
 /// </param>
 /// <returns>
 /// A <see cref="IntPtr"/>
 /// </returns>
 internal static IntPtr /* pcap_t* */ pcap_open(string dev,
                                                int packetLen,
                                                int flags,
                                                int read_timeout,
                                                ref pcap_rmtauth rmtauth,
                                                StringBuilder errbuf)
 {
     return(UseWindows ?
            Windows.pcap_open(dev, packetLen, flags, read_timeout, ref rmtauth, errbuf) :
            Unix.pcap_open(dev, packetLen, flags, read_timeout, ref rmtauth, errbuf));
 }