You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current API design makes the use of go-conntrack fairly hard to use, without deeper knowledge of conntrack. E.g. the returned ConnAttrs are from type []byte with variable size instead of proper Go types. So the returned values for AttrOrigIPv4Src could be an net.IP instead of []byte.
So in the future it could look something like:
type IPTuple struct {
Src net.IP
Dst net.IP
...
}
type Con struct {
Origin *IPTuple
Reply *IPTuple
ID *uint32
...
}
As not all attributes, which are possible, are provided every time, the returned Con struct contains pointers.These pointers can be nil, if the given attribute is not provided.
The text was updated successfully, but these errors were encountered:
The current API design makes the use of go-conntrack fairly hard to use, without deeper knowledge of conntrack. E.g. the returned
ConnAttr
s are from type[]byte
with variable size instead of proper Go types. So the returned values forAttrOrigIPv4Src
could be annet.IP
instead of[]byte
.So in the future it could look something like:
As not all attributes, which are possible, are provided every time, the returned
Con
struct contains pointers.These pointers can benil
, if the given attribute is not provided.The text was updated successfully, but these errors were encountered: