google / stenographer

Stenographer is a packet capture solution which aims to quickly spool all packets to disk, then provide simple, fast access to subsets of those packets. Discussion/announcements at stenographer@googlegroups.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build failes at 'blockfile'

miko-moshe opened this issue · comments

commented

github.com/google/stenographer/blockfile

blockfile/blockfile.go:93: pkt.tp_sec undefined (type *C.struct_tpacket3_hdr has no field or method tp_sec)
blockfile/blockfile.go:93: pkt.tp_nsec undefined (type *C.struct_tpacket3_hdr has no field or method tp_nsec)
blockfile/blockfile.go:94: pkt.tp_len undefined (type *C.struct_tpacket3_hdr has no field or method tp_len)
blockfile/blockfile.go:95: pkt.tp_snaplen undefined (type *C.struct_tpacket3_hdr has no field or method tp_snaplen)
blockfile/blockfile.go:98: pkt.tp_mac undefined (type *C.struct_tpacket3_hdr has no field or method tp_mac)
blockfile/blockfile.go:138: a.block.num_pkts undefined (type *C.struct_tpacket_hdr_v1 has no field or method num_pkts)
blockfile/blockfile.go:150: baseHdr.hdr undefined (type *C.struct_tpacket_block_desc has no field or method hdr)
blockfile/blockfile.go:157: a.block.offset_to_first_pkt undefined (type *C.struct_tpacket_hdr_v1 has no field or method offset_to_first_pkt)
blockfile/blockfile.go:158: a.pkt.tp_next_offset undefined (type *C.struct_tpacket3_hdr has no field or method tp_next_offset)
blockfile/blockfile.go:159: a.pkt.tp_next_offset undefined (type *C.struct_tpacket3_hdr has no field or method tp_next_offset)
blockfile/blockfile.go:159: too many errors

commented

The problem might be the kernel version I'm using (2.6.32).
if_packet.h does not have tpacket_v3 in it. As far as I can see, it was added at 3.2.
Can anyone confirm?

ACK, you need a kernel with tpacket_v3 to use stenographer.