MCPcopy
hub / github.com/cilium/ebpf / ProgramTypeForPlatform

Function ProgramTypeForPlatform

types.go:256–258  ·  view source on GitHub ↗

ProgramTypeForPlatform returns a platform specific program type. Use this if the library doesn't provide a constant yet.

(plat string, value uint32)

Source from the content-addressed store, hash-verified

254//
255// Use this if the library doesn't provide a constant yet.
256func ProgramTypeForPlatform(plat string, value uint32) (ProgramType, error) {
257 return platform.EncodeConstant[ProgramType](plat, value)
258}
259
260// AttachType of the eBPF program, needed to differentiate allowed context accesses in
261// some newer program types like CGroupSockAddr. Should be set to AttachNone if not required.

Callers 4

minimalProgramInfoFromFdFunction · 0.85
newProgramInfoFromFdFunction · 0.85
readProgramInfoFromProcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…