title: calling pcap_loop from Swift 3
body: <p>I was trying this code from <a href="https://github.com/dfrencham/swiftPCap" rel="nofollow noreferrer">https://github.com/dfrencham/swiftPCap</a></p>
  
  <pre><code>  pcap_loop(pcapSession, numberOfPackets,
          {
              (args: UnsafeMutablePointer&lt;u_char&gt;,
               pkthdr:UnsafePointer&lt;pcap_pkthdr&gt;,
               packet: UnsafePointer&lt;u_char&gt;) -&gt;Void in
                      // lets handle the result using a call to a singleton 
                      // we can keep state this way, and not have to
                      // tool around by passing pointers to UnsafePointers
                      // and dereferencing later
                      let pa = PacketAnalyser.sharedInstance
                      pa.Process()
          },
          nil)
  </code></pre>
  
  <p>Now it is Swift 3, I cannot compile with the following errors
  cannot convert value of type '(UnsafeMutablePointer, UnsafePointer, UnsafePointer) -> Void' to expected argument type 'pcap_handler!'</p>
  
  <p>Not really sure how to proceed, pretty much a newbie at referencing  C code from Swift. I have read the documentation, but not having much luck.</p>
  
  <p>Thanks</p>