Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add comment to RegisterFiltered #58

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conntrack.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ func (nfct *Nfct) Register(ctx context.Context, t Table, group NetlinkGroup, fn
// If your function returns something different than 0, it will stop.
// ConnAttr of the same ConnAttrType will be linked by an OR operation.
// Otherwise, ConnAttr of different ConnAttrType will be connected by an AND operation for the filter.
// Note: When you add filters for IPv4 specific fields, it will automatically filter for IPv4-only events.
// The same rule applies for IPv6. However, if you apply a filter for both IPv4- and IPv6-specific fields,
// it will result in filtering out all events, meaning no event will match.
func (nfct *Nfct) RegisterFiltered(ctx context.Context, t Table, group NetlinkGroup, filter []ConnAttr, fn HookFunc) error {
return nfct.register(ctx, t, group, filter, fn)
}
Expand Down