google / gopacket

Provides packet processing capabilities for Go
BSD 3-Clause "New" or "Revised" License
6.34k stars 1.13k forks source link

winpcap does not export pcap_statustostr, called by func statusError(status C.int) error #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install windows7 and winpcap 4.1.2 (latest dev branch as of today)
2. go build gopacket/pcap/example/pcapdump

What is the expected output? What do you see instead?

Expected: a pcapdump binary.
Received: link error: [snip]/pcap.go:309: undefined reference to 
`pcap_statustostr'
Note that the actual file line in the go file is 451.

What version of the product are you using? On what operating system?

windows7, winpcap 4.1.2, head of gopacket.

Please provide any additional information below.

WinPCAP currently doesn't export the pcap_statustostr() function:
http://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html
Looks like the closest would be the older pcap_strerror().

Original issue reported on code.google.com by barc...@google.com on 1 May 2014 at 7:44

GoogleCodeExporter commented 9 years ago

Original comment by gconnell@google.com on 27 May 2014 at 4:41

GoogleCodeExporter commented 9 years ago
Fixed in 
https://code.google.com/p/gopacket/source/diff?spec=svn27f687237cc0529ac621309ce
411beee5337d7ab&r=27f687237cc0529ac621309ce411beee5337d7ab&format=side&path=/pca
p/pcap.go

Original comment by gsconn...@gmail.com on 30 May 2014 at 5:21