MCPcopy
hub / github.com/golang/net / LoadMemShift

Struct LoadMemShift

bpf/instructions.go:294–296  ·  view source on GitHub ↗

LoadMemShift multiplies the first 4 bits of the byte at packet[Off] by 4 and stores the result in register X. This instruction is mainly useful to load into X the length of an IPv4 packet header in a single instruction, rather than have to do the arithmetic on the header's first byte by hand.

Source from the content-addressed store, hash-verified

292// IPv4 packet header in a single instruction, rather than have to do
293// the arithmetic on the header's first byte by hand.
294type LoadMemShift struct {
295 Off uint32
296}
297
298// Assemble implements the Instruction Assemble method.
299func (a LoadMemShift) Assemble() (RawInstruction, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected