build failes at 'blockfile'
miko-moshe opened this issue · 2 comments
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
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.