コード例 #1
0
 internal static int pcap_findalldevs_ex(string /*char **/ source,
                                         ref pcap_rmtauth /*pcap_rmtauth **/ auth,
                                         ref IntPtr /*pcap_if_t ** */ alldevs,
                                         StringBuilder /*char * */ errbuf)
 {
     return(UseWindows ? Windows.pcap_findalldevs_ex(source, ref auth, ref alldevs, errbuf)
         : Unix.pcap_findalldevs_ex(source, ref auth, ref alldevs, errbuf));
 }
コード例 #2
0
 internal extern static PcapHandle /* pcap_t* */ pcap_open(
     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(PcapStringMarshaler))] string dev,
     int packetLen,
     int flags,
     int read_timeout,
     ref pcap_rmtauth rmtauth,
     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(PcapStringMarshaler))] StringBuilder errbuf
     );
コード例 #3
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));
 }
コード例 #4
0
 internal extern static IntPtr /* pcap_t* */ pcap_open(string dev,
                                                       int packetLen,
                                                       int flags,
                                                       int read_timeout,
                                                       ref pcap_rmtauth rmtauth,
                                                       StringBuilder errbuf);
コード例 #5
0
 internal extern static int pcap_findalldevs_ex(string /*char **/ source,
                                                ref pcap_rmtauth /*pcap_rmtauth **/ auth,
                                                ref IntPtr /*pcap_if_t ** */ alldevs,
                                                StringBuilder /*char * */ errbuf);
コード例 #6
0
 internal extern static int pcap_findalldevs_ex(
     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(PcapStringMarshaler))] string /*char **/ source,
     ref pcap_rmtauth /*pcap_rmtauth **/ auth,
     ref IntPtr /*pcap_if_t ** */ alldevs,
     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(PcapStringMarshaler))] StringBuilder /*char * */ errbuf
     );