MCPcopy Create free account

hub / github.com/google/nftables / functions

Functions499 in github.com/google/nftables

↓ 146 callersMethodPutUint32
(v uint32)
binaryutil/binaryutil.go:28
↓ 123 callersMethodUint32
(b []byte)
binaryutil/binaryutil.go:31
↓ 121 callersMethodFlushRuleset
FlushRuleset flushes the entire ruleset. See also https://wiki.nftables.org/wiki-nftables/index.php/Operations_at_ruleset_level
conn.go:287
↓ 113 callersMethodFlush
Flush sends all buffered commands in a single batch to nftables.
conn.go:243
↓ 87 callersMethodAddTable
AddTable adds the specified Table, just like `nft add table ...`. See also https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables
table.go:88
↓ 80 callersFunctionnfdump
nfdump returns a hexdump of 4 bytes per line (like nft --debug=all), allowing users to make sense of large byte literals more easily.
nftables_test.go:43
↓ 70 callersMethodAddRule
(r *Rule)
rule.go:187
↓ 70 callersMethodPutUint16
(v uint16)
binaryutil/binaryutil.go:27
↓ 61 callersMethodAddChain
AddChain adds the specified Chain. See also https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains#Adding_base_chains
chain.go:110
↓ 52 callersFunctionCleanupSystemConn
(t *testing.T, newNS netns.NsHandle)
internal/nftest/system_conn.go:36
↓ 52 callersFunctionOpenSystemConn
OpenSystemConn returns a netlink connection that tests against the running kernel in a separate network namespace. nftest.CleanupSystemConn() must be
internal/nftest/system_conn.go:15
↓ 49 callersFunctionNew
New returns a netlink connection for querying and modifying nftables. Some aspects of the new netlink connection can be configured using the options W
conn.go:62
↓ 44 callersFunctionWithTestDial
WithTestDial sets the specified nltest.Func when creating a new netlink connection.
conn.go:103
↓ 42 callersMethodUint16
(b []byte)
binaryutil/binaryutil.go:30
↓ 40 callersFunctionlinediff
linediff returns a side-by-side diff of two nfdump() return values, flagging lines which are not equal with an exclamation point prefix.
nftables_test.go:62
↓ 37 callersMethodmarshalAttr
(attrs []netlink.Attribute)
conn.go:331
↓ 30 callersFunctionextraHeader
(family uint8, resID uint16)
util.go:25
↓ 28 callersMethodGetRules
GetRules returns the rules in the specified table and chain.
rule.go:66
↓ 27 callersMethodAddObj
AddObj adds the specified Obj. See also https://wiki.nftables.org/wiki-nftables/index.php/Stateful_objects
obj.go:109
↓ 26 callersMethodUint64
(b []byte)
binaryutil/binaryutil.go:32
↓ 25 callersMethodAddSet
AddSet adds the specified Set.
set.go:493
↓ 24 callersMethodPutUint64
(v uint64)
binaryutil/binaryutil.go:29
↓ 24 callersMethodString
String unmarshals a null terminated string
alignedbuff/alignedbuff.go:144
↓ 24 callersMethodUint8
Uint8 unmarshals an uint8 in native endianess and alignment. It returns ErrEOF when trying to read beyond the payload.
alignedbuff/alignedbuff.go:79
↓ 21 callersFunctionChainPriorityRef
ChainPriorityRef returns a pointer to a ChainPriority value.
chain.go:72
↓ 18 callersFunctionNewWithData
NewWithData returns a new AlignedBuff for unmarshalling the passed data in native endianess.
alignedbuff/alignedbuff.go:46
↓ 17 callersFunctionNew
New returns a new AlignedBuff for marshalling aligned data in native endianess.
alignedbuff/alignedbuff.go:40
↓ 15 callersMethodPutUint8
PutUint8 marshals an uint8 in native endianess and alignment.
alignedbuff/alignedbuff.go:204
↓ 12 callersMethodData
Data returns the properly padded info payload data written before by calling the various Uint8, Uint16, ... marshalling functions.
alignedbuff/alignedbuff.go:52
↓ 11 callersMethodGetObject
GetObject gets the specified Object This function returns the same concrete type as passed, e.g. QuotaObj, CounterObj or NamedObj. Prefer using the mo
obj.go:180
↓ 10 callersMethodmarshal
(fam byte)
expr/expr.go:220
↓ 10 callersMethodnetlinkConn
netlinkConn returns a netlink connection together with a netlinkCloser that later must be called by the caller when it doesn't need the returned netli
conn.go:130
↓ 10 callersMethodunmarshal
(fam TableFamily, rev uint32, data []byte)
xt/info.go:15
↓ 9 callersMethodGetObj
GetObj is a legacy method that return all Obj that belongs to the same table as the given one This function returns the same concrete type as passed,
obj.go:163
↓ 9 callersMethodmarshal
(fam TableFamily, rev uint32)
xt/info.go:14
↓ 8 callersMethodSetAddElements
SetAddElements applies data points to an nftables set.
set.go:374
↓ 7 callersFunctionChainHookRef
ChainHookRef returns a pointer to a ChainHookRef value.
chain.go:44
↓ 7 callersMethodGetSetElements
GetSetElements returns the elements in the specified set.
set.go:970
↓ 7 callersMethodGetSets
GetSets returns the sets in the specified table.
set.go:881
↓ 7 callersMethodalignWrite
alignWrite aligns the (write) position if necessary and suitable according to the specified alignment mask. It doubles as final payload padding helpma
alignedbuff/alignedbuff.go:283
↓ 7 callersFunctioniPv46
(ab *alignedbuff.AlignedBuff, fam TableFamily)
xt/util.go:30
↓ 7 callersFunctionputIPv46
(ab *alignedbuff.AlignedBuff, fam TableFamily, ip net.IP)
xt/util.go:50
↓ 7 callersFunctionreceiveAckAware
(nlconn *netlink.Conn, sentMsgFlags netlink.HeaderFlags)
conn.go:149
↓ 7 callersMethodtable
()
obj.go:65
↓ 6 callersMethodAddFlowtable
(f *Flowtable)
flowtable.go:109
↓ 6 callersMethodalignCheckedRead
alignCheckedRead aligns the (read) position if necessary and suitable according to the specified alignment mask. alignCheckedRead returns an error if
alignedbuff/alignedbuff.go:272
↓ 5 callersMethodClose
()
monitor.go:319
↓ 5 callersMethodPutUint16BE
PutUint16BE marshals an uint16 in "network" (=big endian) endianess and native uint16 alignment.
alignedbuff/alignedbuff.go:218
↓ 5 callersMethodUint16BE
Uint16BE unmarshals an uint16 in "network" (=big endian) endianess and native uint16 alignment. It returns ErrEOF when trying to read beyond the paylo
alignedbuff/alignedbuff.go:101
↓ 5 callersFunctiongenSetKeyType
(types ...uint32)
set_test.go:15
↓ 5 callersMethodgetObjWithLegacyType
(o Obj, t *Table, msgType uint16, returnLegacyObjType bool)
obj.go:328
↓ 5 callersMethodnewRule
AddRule adds the specified Rule
rule.go:110
↓ 4 callersFunctionAppendString
(udata []byte, typ Type, str string)
userdata/userdata.go:101
↓ 4 callersFunctionAppendUint32
(udata []byte, typ Type, num uint32)
userdata/userdata.go:86
↓ 4 callersFunctionConcatSetType
ConcatSetType constructs a new SetDatatype which consists of a concatenation of the passed types. It returns ErrTooManyTypes, if nftMagic would overfl
set.go:210
↓ 4 callersMethodGetObjects
GetObjects get all the Obj that belongs to the given table This function will always return legacy QuotaObj/CounterObj types for backwards compatibili
obj.go:193
↓ 4 callersMethodListFlowtables
(t *Table)
flowtable.go:174
↓ 4 callersMethodPutBytesAligned32
PutBytesAligned32 marshals the given bytes starting with the native alignment for uint32 data types. It additionaly adds padding to reach the specifie
alignedbuff/alignedbuff.go:192
↓ 4 callersMethodPutUint
PutUint marshals an uint in native endianess and alignment for the C "unsigned int" type. Please note that on 64bit platforms, the size and alignment
alignedbuff/alignedbuff.go:255
↓ 4 callersMethodResetObject
ResetObject reset the given Obj This function returns the same concrete type as passed, e.g. QuotaObj, CounterObj or NamedObj. Prefer using the more g
obj.go:207
↓ 4 callersMethodUint
Uint unmarshals an uint in native endianess and alignment for the C "unsigned int" type. It returns ErrEOF when trying to read beyond the payload. Ple
alignedbuff/alignedbuff.go:170
↓ 4 callersFunctionWithNetNSFd
WithNetNSFd sets the network namespace to create a new netlink connection to: the fd must reference a network namespace.
conn.go:95
↓ 4 callersFunctiongetCompatPolicy
(exprs []expr.Any)
compat_policy.go:56
↓ 4 callersMethodgetObj
(o Obj, t *Table, msgType uint16)
obj.go:324
↓ 4 callersFunctioniPv46Mask
(ab *alignedbuff.AlignedBuff, fam TableFamily)
xt/util.go:45
↓ 4 callersFunctionifname
(n string)
nftables_test.go:81
↓ 4 callersFunctionputIPv46Mask
(ab *alignedbuff.AlignedBuff, fam TableFamily, mask net.IPMask)
xt/util.go:62
↓ 4 callersMethodsetErr
(err error)
conn.go:324
↓ 4 callersFunctionsetsFromMsg
(msg netlink.Message)
set.go:745
↓ 4 callersMethodunmarshal
(fam byte, data []byte)
expr/expr.go:222
↓ 3 callersMethodAddGenerationalMonitor
(monitor *Monitor)
monitor.go:354
↓ 3 callersFunctionAsLasting
AsLasting creates the new netlink connection as a lasting connection that is reused across multiple netlink operations, instead of opening and closing
conn.go:84
↓ 3 callersMethodBytesAligned32
BytesAligned32 unmarshals the given amount of bytes starting with the native alignment for uint32 data types. It returns ErrEOF when trying to read be
alignedbuff/alignedbuff.go:65
↓ 3 callersMethodDeleteObject
DeleteObject deletes the specified Obj
obj.go:138
↓ 3 callersFunctionFlowtablePriorityRef
(p FlowtablePriority)
flowtable.go:85
↓ 3 callersMethodGetNamedObjects
GetNamedObjects get all the Obj that belongs to the given table This function always return NamedObj types
obj.go:199
↓ 3 callersFunctionGetString
(udata []byte, typ Type)
userdata/userdata.go:106
↓ 3 callersMethodInsertRule
(r *Rule)
rule.go:195
↓ 3 callersMethodListTable
ListTable returns table found for the specified name. Searches for the table under IPv4 family. As per nft man page: "When no address family is specif
table.go:118
↓ 3 callersMethodListTableOfFamily
ListTableOfFamily returns table found for the specified name and table family
table.go:123
↓ 3 callersMethodListTables
ListTables returns currently configured tables in the kernel
table.go:135
↓ 3 callersFunctionMarshal
Marshal serializes the specified expression into a byte slice.
expr/expr.go:69
↓ 3 callersFunctionString
(b []byte)
binaryutil/binaryutil.go:123
↓ 3 callersFunctionUnmarshal
Unmarshal fills an expression from the specified byte slice.
expr/expr.go:78
↓ 3 callersFunctionchainFromMsg
(msg netlink.Message)
chain.go:269
↓ 3 callersFunctiondecodeElement
(d []byte)
set.go:352
↓ 3 callersMethodfamily
()
obj.go:66
↓ 3 callersMethodmakeElemList
(vals []SetElement, id uint32)
set.go:396
↓ 3 callersMethodmarshalAB
(fam TableFamily, rev uint32, ab *alignedbuff.AlignedBuff)
xt/match_conntrack.go:189
↓ 3 callersMethodname
()
obj.go:68
↓ 3 callersMethodobjType
()
obj.go:69
↓ 3 callersFunctionparseSetDatatype
(magic uint32)
set.go:820
↓ 3 callersMethodunmarshalAB
(fam TableFamily, rev uint32, ab *alignedbuff.AlignedBuff)
xt/match_conntrack.go:206
↓ 3 callersMethoduseLegacyObjType
(o Obj)
obj.go:383
↓ 2 callersFunctionAppend
(udata []byte, typ Type, data []byte)
userdata/userdata.go:55
↓ 2 callersMethodCloseLasting
CloseLasting closes the lasting netlink connection that has been opened using AsLasting option when creating this connection. If either no lasting net
conn.go:226
↓ 2 callersFunctionConcatSetTypeElements
ConcatSetTypeElements uses the ConcatSetType name to calculate and return a list of base types which were used to construct the concatenated type
set.go:234
↓ 2 callersFunctionGet
(udata []byte, styp Type)
userdata/userdata.go:62
↓ 2 callersMethodGetNFTMagic
GetNFTMagic returns a custom datatype based on user's parameters
set.go:62
↓ 2 callersMethodGetObjReset
GetObjReset is a legacy method that reset all Obj that belongs the same table as the given one This function returns the same concrete type as passed,
obj.go:172
next →1–100 of 499, ranked by callers