mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-04 03:56:17 +00:00
set bpf filter for pcap (#865)
* set bpf filter for pcap * implement pod updating mechanism * Update tap/source/netns_packet_source.go * Update tap/source/netns_packet_source.go * minor pr fixes Co-authored-by: Nimrod Gilboa Markevich <59927337+nimrod-up9@users.noreply.github.com>
This commit is contained in:
@@ -98,6 +98,14 @@ func newTcpPacketSource(name, filename string, interfaceName string,
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (source *tcpPacketSource) String() string {
|
||||
return source.name
|
||||
}
|
||||
|
||||
func (source *tcpPacketSource) setBPFFilter(expr string) (err error) {
|
||||
return source.handle.SetBPFFilter(expr)
|
||||
}
|
||||
|
||||
func (source *tcpPacketSource) close() {
|
||||
if source.handle != nil {
|
||||
source.handle.Close()
|
||||
|
Reference in New Issue
Block a user