Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/google/nftables
/ functions
Functions
499 in github.com/google/nftables
⨍
Functions
499
◇
Types & classes
131
↓ 2 callers
Function
GetUint32
(udata []byte, typ Type)
userdata/userdata.go:92
↓ 2 callers
Function
Int32
(b []byte)
binaryutil/binaryutil.go:115
↓ 2 callers
Method
ListChain
ListChain returns a single chain configured in the specified table
chain.go:197
↓ 2 callers
Method
ListTablesOfFamily
ListTablesOfFamily returns currently configured tables for the specified table family in the kernel. It lists all tables if family is TableFamilyUnspe
table.go:141
↓ 2 callers
Function
Marshal
Marshal a Match or Target Info type into its binary representation.
xt/info.go:19
↓ 2 callers
Function
MustConcatSetType
MustConcatSetType does the same as ConcatSetType, but panics instead of an error. It simplifies safe initialization of global variables.
set.go:199
↓ 2 callers
Function
NetFirstAndLastIP
NetFirstAndLastIP takes the beginning address of an entire network in CIDR notation (e.g. 192.168.1.0/24) and returns the first and last IP addresses
util.go:56
↓ 2 callers
Function
NewMonitor
NewMonitor returns a Monitor with options to be started. Note that NewMonitor only prepares a Monitor. To install the monitor, call [Conn.AddMonitor]
monitor.go:178
↓ 2 callers
Function
PutInt32
For dealing with types not supported by the encoding/binary interface
binaryutil/binaryutil.go:109
↓ 2 callers
Method
PutInt32
PutInt32 marshals an int32 in native endianess and alignment.
alignedbuff/alignedbuff.go:239
↓ 2 callers
Function
PutString
(s string)
binaryutil/binaryutil.go:119
↓ 2 callers
Method
PutString
PutString marshals a string.
alignedbuff/alignedbuff.go:246
↓ 2 callers
Function
Unmarshal
Unmarshal Info binary payload into its corresponding dedicated type as indicated by the name argument. In several cases, unmarshalling depends on the
xt/info.go:27
↓ 2 callers
Method
addTable
(t *Table, flag netlink.HeaderFlags)
table.go:69
↓ 2 callers
Function
bool32
(ab *alignedbuff.AlignedBuff)
xt/util.go:11
↓ 2 callers
Method
dialNetlink
()
conn.go:299
↓ 2 callers
Function
elementsFromMsg
(fam byte, msg netlink.Message)
set.go:845
↓ 2 callers
Function
exprFromName
(name string)
expr/expr.go:147
↓ 2 callers
Function
flushNFTRuleset
()
integration/nft_test.go:249
↓ 2 callers
Function
listNFTRuleset
()
integration/nft_test.go:240
↓ 2 callers
Method
listTablesOfNameAndFamily
(name string, family TableFamily)
table.go:145
↓ 2 callers
Method
marshalAB
(fam TableFamily, rev uint32, ab *alignedbuff.AlignedBuff)
xt/target_dnat.go:49
↓ 2 callers
Function
nestedAttr
(data []byte, attrType uint16)
expr/range.go:122
↓ 2 callers
Method
netlinkConnUnderLock
netlinkConnUnderLock works like netlinkConn but must be called while holding the Conn.mu lock.
conn.go:138
↓ 2 callers
Function
nfdump
nfdump returns a hexdump of 4 bytes per line (like nft --debug=all), allowing users to make sense of large byte literals more easily.
internal/nftest/nftest.go:106
↓ 2 callers
Function
objFromMsg
(msg netlink.Message, returnLegacyType bool)
obj.go:230
↓ 2 callers
Function
putBool32
(ab *alignedbuff.AlignedBuff, b bool)
xt/util.go:22
↓ 2 callers
Function
ruleFromMsg
(fam TableFamily, msg netlink.Message)
rule.go:230
↓ 2 callers
Method
setInterfaceExprs
(exprs []interface{})
expr/dynset.go:148
↓ 2 callers
Function
tableFromMsg
(msg netlink.Message)
table.go:187
↓ 2 callers
Method
unmarshal
(ad *netlink.AttributeDecoder)
quota.go:31
↓ 2 callers
Method
unmarshalAB
(fam TableFamily, rev uint32, ab *alignedbuff.AlignedBuff)
xt/target_dnat.go:67
↓ 1 callers
Method
Conn
Conn opens an nftables connection that records netlink messages into the Recorder.
internal/nftest/nftest.go:23
↓ 1 callers
Method
Decode
(b []byte)
util.go:40
↓ 1 callers
Method
DelChain
DelChain deletes the specified Chain. See also https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains#Deleting_chains
chain.go:156
↓ 1 callers
Method
DelFlowtable
(f *Flowtable)
flowtable.go:156
↓ 1 callers
Method
DelRule
DelRule deletes the specified Rule, rule's handle cannot be 0
rule.go:204
↓ 1 callers
Method
DelSet
DelSet deletes a specific set, along with all elements it contains.
set.go:684
↓ 1 callers
Method
DelTable
DelTable deletes a specific table, along with all chains/rules it contains.
table.go:53
↓ 1 callers
Function
Diff
Diff returns the first difference between the specified netlink messages and the expected netlink message payloads.
internal/nftest/nftest.go:58
↓ 1 callers
Function
FlowtableHookRef
(h FlowtableHook)
flowtable.go:73
↓ 1 callers
Method
FlushChain
FlushChain removes all rules within the specified Chain. See also https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains#Flushing_chain
chain.go:175
↓ 1 callers
Method
FlushSet
FlushSet deletes all data points from an nftables set.
set.go:724
↓ 1 callers
Method
FlushTable
FlushTable removes all rules in all chains within the specified Table. See also https://wiki.nftables.org/wiki-nftables/index.php/Configuring_tables#F
table.go:100
↓ 1 callers
Method
GetRule
GetRule returns the rules in the specified table and chain. Deprecated: use GetRules instead.
rule.go:61
↓ 1 callers
Method
GetSetByName
GetSetByName returns the set in the specified table if matching name is found.
set.go:925
↓ 1 callers
Method
Int32
Int32 unmarshals an int32 in native endianess and alignment. It returns ErrEOF when trying to read beyond the payload.
alignedbuff/alignedbuff.go:134
↓ 1 callers
Method
ListChains
ListChains returns currently configured chains in the kernel
chain.go:192
↓ 1 callers
Method
ListChainsOfTableFamily
ListChainsOfTableFamily returns currently configured chains for the specified family in the kernel. It lists all chains ins all tables if family is Ta
chain.go:236
↓ 1 callers
Function
MarshalExprData
(fam byte, e Any)
expr/expr.go:73
↓ 1 callers
Function
MatchRulesetBytes
MatchRulesetBytes is a test helper that ensures the fillRuleset modifications correspond to the provided want netlink message payloads
internal/nftest/nftest.go:81
↓ 1 callers
Function
NewRecorder
NewRecorder returns a ready-to-use Recorder.
internal/nftest/nftest.go:52
↓ 1 callers
Method
PutUint16
PutUint16 marshals an uint16 in native endianess and alignment.
alignedbuff/alignedbuff.go:210
↓ 1 callers
Method
PutUint32
PutUint32 marshals an uint32 in native endianess and alignment.
alignedbuff/alignedbuff.go:225
↓ 1 callers
Method
PutUint64
PutUint64 marshals an uint64 in native endianess and alignment.
alignedbuff/alignedbuff.go:232
↓ 1 callers
Method
ReplaceRule
(r *Rule)
rule.go:183
↓ 1 callers
Method
Requests
Requests returns the recorded netlink messages (typically nftables requests).
internal/nftest/nftest.go:47
↓ 1 callers
Method
ResetNamedObjects
ResetNamedObjects reset all the Obj that belongs to the given table This function always return NamedObj types
obj.go:226
↓ 1 callers
Method
SetDeleteElements
SetDeleteElements deletes data points from an nftables set.
set.go:701
↓ 1 callers
Method
StringWithLength
StringWithLength unmarshals a string of a given length (for non-null terminated strings)
alignedbuff/alignedbuff.go:160
↓ 1 callers
Method
Uint16
Uint16 unmarshals an uint16 in native endianess and alignment. It returns ErrEOF when trying to read beyond the payload.
alignedbuff/alignedbuff.go:90
↓ 1 callers
Method
Uint32
Uint32 unmarshals an uint32 in native endianess and alignment. It returns ErrEOF when trying to read beyond the payload.
alignedbuff/alignedbuff.go:112
↓ 1 callers
Method
Uint64
Uint64 unmarshals an uint64 in native endianess and alignment. It returns ErrEOF when trying to read beyond the payload.
alignedbuff/alignedbuff.go:123
↓ 1 callers
Function
WithSockOptions
WithSockOptions sets the specified socket options when creating a new netlink connection.
conn.go:111
↓ 1 callers
Function
applyNFTRuleset
(scriptPath string)
integration/nft_test.go:231
↓ 1 callers
Function
batch
(messages []netlink.Message)
conn.go:349
↓ 1 callers
Method
data
()
obj.go:67
↓ 1 callers
Method
decode
(fam byte)
set.go:296
↓ 1 callers
Function
devsFromMsg
(b []byte)
flowtable.go:289
↓ 1 callers
Function
exprsBytesFromName
exprsBytesFromName parses raw expressions bytes based on provided expr name
expr/expr.go:84
↓ 1 callers
Function
exprsFromBytes
exprsFromBytes parses nested raw expressions bytes to construct nftables expressions
expr/expr.go:99
↓ 1 callers
Method
family
()
obj.go:86
↓ 1 callers
Function
ftsFromMsg
(msg netlink.Message)
flowtable.go:228
↓ 1 callers
Function
ftsHookFromMsg
(b []byte)
flowtable.go:260
↓ 1 callers
Function
genFromMsg
(msg netlink.Message)
gen.go:18
↓ 1 callers
Method
getFlowtables
(t *Table)
flowtable.go:193
↓ 1 callers
Function
hookFromMsg
(b []byte)
chain.go:307
↓ 1 callers
Function
ifname
(n string)
integration/nft_test.go:33
↓ 1 callers
Function
limitTime
(value uint64)
expr/limit.go:48
↓ 1 callers
Function
linediff
linediff returns a side-by-side diff of two nfdump() return values, flagging lines which are not equal with an exclamation point prefix.
internal/nftest/nftest.go:125
↓ 1 callers
Method
marshalAB
(fam TableFamily, rev uint32, ab *alignedbuff.AlignedBuff)
xt/target_masquerade_ip.go:56
↓ 1 callers
Method
marshalData
(fam byte)
expr/tproxy.go:53
↓ 1 callers
Method
marshalData
(fam byte)
expr/fib.go:50
↓ 1 callers
Method
marshalData
(fam byte)
expr/redirect.go:43
↓ 1 callers
Method
marshalData
(fam byte)
expr/numgen.go:46
↓ 1 callers
Method
marshalData
(fam byte)
expr/nat.go:71
↓ 1 callers
Method
marshalData
(fam byte)
expr/immediate.go:42
↓ 1 callers
Method
marshalData
(fam byte)
expr/ct.go:131
↓ 1 callers
Method
marshalData
(fam byte)
expr/ct.go:212
↓ 1 callers
Method
marshalData
(fam byte)
expr/ct.go:280
↓ 1 callers
Method
marshalData
(fam byte)
expr/ct.go:339
↓ 1 callers
Method
marshalData
(fam byte)
expr/payload.go:72
↓ 1 callers
Method
marshalData
(fam byte)
expr/bitwise.go:44
↓ 1 callers
Method
marshalData
(fam byte)
expr/match.go:31
↓ 1 callers
Method
marshalData
(fam byte)
expr/hash.go:54
↓ 1 callers
Method
marshalData
(fam byte)
expr/target.go:34
↓ 1 callers
Method
marshalData
(fam byte)
expr/reject.go:41
↓ 1 callers
Method
marshalData
(fam byte)
expr/quota.go:44
↓ 1 callers
Method
marshalData
(fam byte)
expr/range.go:45
↓ 1 callers
Method
marshalData
(fam byte)
expr/counter.go:42
← previous
next →
101–200 of 499, ranked by callers