MCPcopy Create free account
hub / github.com/google/nftables / String

Method String

alignedbuff/alignedbuff.go:144–156  ·  view source on GitHub ↗

String unmarshals a null terminated string

()

Source from the content-addressed store, hash-verified

142
143// String unmarshals a null terminated string
144func (a *AlignedBuff) String() (string, error) {
145 len := 0
146 for {
147 if a.data[a.pos+len] == 0x00 {
148 break
149 }
150 len++
151 }
152
153 v := binaryutil.String(a.data[a.pos : a.pos+len])
154 a.pos += len
155 return v, nil
156}
157
158// StringWithLength unmarshals a string of a given length (for non-null
159// terminated strings)

Callers 15

ruleFromMsgFunction · 0.80
setsFromMsgFunction · 0.80
ftsFromMsgFunction · 0.80
devsFromMsgFunction · 0.80
objFromMsgFunction · 0.80
nfdumpFunction · 0.80
linediffFunction · 0.80
tableFromMsgFunction · 0.80
chainFromMsgFunction · 0.80
genFromMsgFunction · 0.80
unmarshalMethod · 0.80
unmarshalMethod · 0.80

Calls 1

StringFunction · 0.92

Tested by 3

nfdumpFunction · 0.64
linediffFunction · 0.64