Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/boratanrikulu/gobee
/ functions
Functions
474 in github.com/boratanrikulu/gobee
⨍
Functions
474
◇
Types & classes
106
↓ 1 callers
Function
lookupKernelField
lookupKernelField finds the C-side field name for a Go field on a kernel struct. Reads the `bpf:"..."` struct tag if present; falls back to a snake-ca
internal/transpile/emit.go:1056
↓ 1 callers
Method
mapLookupCall
mapLookupCall returns (mapName, valType, true) if call is `<mapVar>.Lookup(...)` where mapVar is a package-level bpf.ArrayMap or bpf.HashMap.
internal/transpile/emit.go:1642
↓ 1 callers
Function
mapTypes
mapTypes resolves each parameter's C type to a Go type and computes the Go return type. Returns a skip reason if any parameter or the return type can'
tools/genhelpers/main.go:222
↓ 1 callers
Function
namedToC
(n *types.Named)
internal/transpile/types.go:106
↓ 1 callers
Function
parseHelpers
(src string)
tools/genhelpers/main.go:75
↓ 1 callers
Function
parseParams
parseParams splits a comma-separated C parameter list. Returns ok=false (with a reason) for variadic or otherwise unsupported shapes.
tools/genhelpers/main.go:132
↓ 1 callers
Method
perfEventArrayMethodCall
perfEventArrayMethodCall recognises (*bpf.PerfEventArray[T]).Output(ctx, val).
internal/transpile/emit.go:1321
↓ 1 callers
Function
posFor
posFor builds a token.Position from raw fields. Used by tests; kept here so it can also support a future "load sourcemap from disk" path.
internal/transpile/sourcemap.go:20
↓ 1 callers
Method
progArrayMethodCall
progArrayMethodCall recognises (*bpf.ProgArray).TailCall(ctx, key).
internal/transpile/emit.go:1288
↓ 1 callers
Method
queueLikeMethodCall
queueLikeMethodCall recognises Push/Pop/Peek on a *bpf.Queue[T] or *bpf.Stack[T] and returns the matching libbpf helper call.
internal/transpile/emit.go:1241
↓ 1 callers
Method
redirectMapCall
redirectMapCall handles Redirect(ctx, key, flags) on a DevMap, CpuMap, or XskMap. All three route to the single bpf_redirect_map helper; the userspace
internal/transpile/emit.go:1488
↓ 1 callers
Function
repoRootDir
(t *testing.T)
e2e/verifier_error_test.go:122
↓ 1 callers
Function
requiresVmlinuxParam
requiresVmlinuxParam reports whether a function parameter's type points to a bpf-package struct that needs vmlinux.h to compile.
internal/transpile/emit.go:294
↓ 1 callers
Method
ringbufMethodCall
ringbufMethodCall recognizes `<rb>.{Submit,Discard,Output}(event)` on a `*bpf.RingBuf[T]`. Returns the C call string for the supported methods.
internal/transpile/emit.go:1196
↓ 1 callers
Method
ringbufReserveCall
ringbufReserveCall returns (mapName, valType, true) if call is `<rb>.Reserve()` on a `*bpf.RingBuf[T]`.
internal/transpile/emit.go:1148
↓ 1 callers
Function
sanitizePackageName
sanitizePackageName turns an arbitrary directory name into a valid Go package identifier: lowercase alphanumerics, underscores collapse non-id runes,
internal/transpile/pipeline.go:137
↓ 1 callers
Function
sanitizeParamName
(name string)
tools/genhelpers/main.go:208
↓ 1 callers
Function
splitTopLevel
(s string, sep byte)
tools/genhelpers/main.go:163
↓ 1 callers
Method
storageGetCall
storageGetCall recognizes `<storage>.Get(obj)` for the comma-ok path (`v, ok := taskCtx.Get(task)`). Returns (mapName, valType, helperName) so the cal
internal/transpile/emit.go:1625
↓ 1 callers
Method
storageMethodCall
storageMethodCall handles TaskStorage / SkStorage / InodeStorage calls that aren't comma-ok Get (those are handled in writeAssignStmt). Covers GetOrCr
internal/transpile/emit.go:1572
↓ 1 callers
Function
testNameFor
(path string)
e2e/loader_test.go:100
↓ 1 callers
Function
translateOne
(inputFile string, opts RunOptions)
internal/transpile/pipeline.go:77
↓ 1 callers
Function
tryBuildMapDecl
tryBuildMapDecl examines a single var name from a ValueSpec. If the var's type is a known bpf-package map (ArrayMap, HashMap, RingBuf, …), it returns
internal/transpile/parse.go:174
↓ 1 callers
Function
uname
uname returns the kernel-side arch name used in /usr/include paths. runtime.GOARCH gives Go's name (amd64, arm64); the multiarch include dirs use Linu
e2e/verifier_error_test.go:112
↓ 1 callers
Function
usedPreludeHelpers
usedPreludeHelpers returns the names of bpf-package sugar functions (in deterministic order) used anywhere in the program that require a static C help
internal/transpile/emit.go:254
↓ 1 callers
Function
usesEndianHelpers
usesEndianHelpers reports whether any program or user-defined helper calls one of bpf.Ntohl / Htonl / Ntohs / Htons. When true, the emitter adds `#inc
internal/transpile/emit.go:200
↓ 1 callers
Function
usesKernelFieldAccess
usesKernelFieldAccess reports whether the emitted C needs the CO-RE header set (vmlinux.h + bpf_core_read.h). True when: - any //bpf:section function
internal/transpile/emit.go:152
↓ 1 callers
Method
writeAssignStmt
(as *ast.AssignStmt)
internal/transpile/emit.go:602
↓ 1 callers
Method
writeDeclStmt
(ds *ast.DeclStmt)
internal/transpile/emit.go:574
↓ 1 callers
Method
writeExprStmt
(es *ast.ExprStmt)
internal/transpile/emit.go:794
↓ 1 callers
Method
writeForStmt
(fs *ast.ForStmt)
internal/transpile/emit.go:804
↓ 1 callers
Method
writeHeader
(source string, withCoRE, withEndian bool)
internal/transpile/emit.go:123
↓ 1 callers
Method
writeHelper
writeHelper emits a user-defined Go helper as a C function with `static __always_inline` linkage so the BPF verifier inlines it into every caller (BPF
internal/transpile/emit.go:435
↓ 1 callers
Method
writeIfStmt
(is *ast.IfStmt)
internal/transpile/emit.go:719
↓ 1 callers
Method
writeLicense
()
internal/transpile/emit.go:310
↓ 1 callers
Method
writeMap
(m *MapDecl)
internal/transpile/emit.go:346
↓ 1 callers
Method
writeMapLookup
(as *ast.AssignStmt, call *ast.CallExpr, mapName string, valType types.Type)
internal/transpile/emit.go:655
↓ 1 callers
Method
writeProgram
(p *ProgramFunc)
internal/transpile/emit.go:493
↓ 1 callers
Method
writeRaw
writeRaw emits s verbatim, tracking newlines for the sourcemap. Used for static helper bodies pulled from the prelude.
internal/transpile/emit.go:96
↓ 1 callers
Method
writeReturnStmt
(rs *ast.ReturnStmt)
internal/transpile/emit.go:776
↓ 1 callers
Method
writeRingbufReserve
(as *ast.AssignStmt, mapName string, valType types.Type)
internal/transpile/emit.go:1172
↓ 1 callers
Method
writeStmt
(stmt ast.Stmt)
internal/transpile/emit.go:532
↓ 1 callers
Method
writeStorageGet
writeStorageGet emits the typed-pointer + ok-alias pair for a comma-ok storage Get, mirroring writeMapLookup. The kernel helper returns NULL when no e
internal/transpile/emit.go:690
↓ 1 callers
Method
writeUserType
(t *UserTypeDecl)
internal/transpile/emit.go:314
Function
AllowFileOpen
bpf:license GPL bpf:section lsm/file_open
testdata/examples/12_lsm_file_open.go:14
Function
Bad
bpf:section xdp
e2e/broken/bpf/src/broken.go:20
Function
Bind
keep the import even when no helper needs it Bind wraps the BPF helper `bpf_bind`. Bind the socket associated to *ctx* to the address pointed by *a
bpf/helpers_generated.go:55
Function
BprmOptsSet
BprmOptsSet wraps the BPF helper `bpf_bprm_opts_set`. Set or clear certain options on *bprm*: **BPF_F_BPRM_SECUREEXEC** Set the secureexec bit wh
bpf/helpers_generated.go:68
Function
CgrpStorageDelete
BtfFindByNameKind wraps the BPF helper `bpf_btf_find_by_name_kind`. Find BTF type with given name and kind in vmlinux BTF or in module's BTFs. Ret
bpf/helpers_generated.go:89
Function
CgrpStorageGet
CgrpStorageGet wraps the BPF helper `bpf_cgrp_storage_get`. Get a bpf_local_storage from the *cgroup*. Logically, it could be thought of as gettin
bpf/helpers_generated.go:122
Function
CheckMtu
CheckMtu wraps the BPF helper `bpf_check_mtu`. Check packet size against exceeding MTU of net device (based on *ifindex*). This helper will likely
bpf/helpers_generated.go:194
Function
CloneRedirect
CloneRedirect wraps the BPF helper `bpf_clone_redirect`. Clone and redirect the packet associated to *skb* to another net device of index *ifindex*
bpf/helpers_generated.go:225
Function
CopyFromUser
CopyFromUser wraps the BPF helper `bpf_copy_from_user`. Read *size* bytes from user space address *user_ptr* and store the data in *dst*. This is a
bpf/helpers_generated.go:235
Function
CopyFromUserTask
CopyFromUserTask wraps the BPF helper `bpf_copy_from_user_task`. Read *size* bytes from user space address *user_ptr* in *tsk*'s address space, and
bpf/helpers_generated.go:248
Function
CountByCpu
bpf:section xdp
testdata/examples/04_per_cpu_stats.go:16
Function
CountByPid
bpf:section xdp
testdata/examples/02_pidcount.go:17
Function
CountByPid
bpf:section tracepoint/syscalls/sys_enter_openat
testdata/examples/24_percpu_hash.go:16
Function
CountEgress
bpf:section cgroup_skb/egress
testdata/examples/11_cgroup_skb_egress.go:16
Function
CountEstablished
bpf:section sockops
testdata/examples/09_sockops.go:18
Function
CountOpens
bpf:section kprobe/__x64_sys_openat
testdata/examples/21_task_storage.go:20
Function
CountPackets
bpf:section xdp
example/helloworld/bpf/src/counter.go:12
Function
CountPackets
testdata/golden/helloworld.c:17
Function
CountPackets
bpf:section xdp
testdata/golden/helloworld.go:12
Function
CountPerCpu
bpf:section xdp
testdata/examples/15_percpu_array.go:16
Function
CountPerIface
bpf:section xdp
testdata/examples/13_xdp_per_iface.go:17
Function
CountPerPort
bpf:section xdp
testdata/examples/14_lru_hash.go:16
Function
CsumDiff
CsumDiff wraps the BPF helper `bpf_csum_diff`. Compute a checksum difference, from the raw buffer pointed by *from*, of length *from_size* (that mu
bpf/helpers_generated.go:280
Function
CsumLevel
CsumLevel wraps the BPF helper `bpf_csum_level`. Change the skbs checksum level by one layer up or down, or reset it entirely to none in order to h
bpf/helpers_generated.go:317
Function
CsumUpdate
CsumUpdate wraps the BPF helper `bpf_csum_update`. Add the checksum *csum* into *skb*\ **->csum** in case the driver has supplied a checksum for th
bpf/helpers_generated.go:332
Function
CurrentTaskUnderCgroup
CurrentTaskUnderCgroup wraps the BPF helper `bpf_current_task_under_cgroup`. Check whether the probe is being run is the context of a given subset
bpf/helpers_generated.go:347
Method
Delete
(key *K)
bpf/maps.go:25
Method
Delete
Delete removes the entry for task.
bpf/maps.go:216
Method
Delete
(sk unsafe.Pointer)
bpf/maps.go:225
Method
Delete
(inode unsafe.Pointer)
bpf/maps.go:233
Method
Discard
Discard drops a previously reserved event without publishing it. Use this on the error path to avoid leaking ring budget.
bpf/ringbuf.go:42
Function
Dispatch
bpf:section xdp
testdata/examples/19_prog_array.go:20
Function
DropBlocked
bpf:section xdp
testdata/examples/23_lpm_trie.go:21
Function
DynptrData
DPath wraps the BPF helper `bpf_d_path`. Return full path for given **struct path** object, which needs to be the kernel BTF *path* object. The pa
bpf/helpers_generated.go:380
Function
DynptrFromMem
DynptrFromMem wraps the BPF helper `bpf_dynptr_from_mem`. Get a dynptr to local memory *data*. *data* must be a ptr to a map value. The maximum *
bpf/helpers_generated.go:394
Function
DynptrRead
DynptrRead wraps the BPF helper `bpf_dynptr_read`. Read *len* bytes from *src* into *dst*, starting from *offset* into *src*. *flags* is currently
bpf/helpers_generated.go:409
Function
DynptrWrite
DynptrWrite wraps the BPF helper `bpf_dynptr_write`. Write *len* bytes from *src* into *dst*, starting from *offset* into *dst*. *flags* must be
bpf/helpers_generated.go:435
Method
Error
()
internal/transpile/validate.go:25
Function
FibLookup
FibLookup wraps the BPF helper `bpf_fib_lookup`. Do FIB lookup in kernel tables using parameters in *params*. If lookup is successful and result sh
bpf/helpers_generated.go:494
Function
Filter
bpf:section xdp
testdata/examples/34_blank_lookup.go:17
Function
FindVma
FindVma wraps the BPF helper `bpf_find_vma`. Find vma of *task* that contains *addr*, call *callback_fn* function with *task*, *vma*, and *callback
bpf/helpers_generated.go:517
Function
ForEachMapElem
ForEachMapElem wraps the BPF helper `bpf_for_each_map_elem`. For each element in **map**, call **callback_fn** function with **map**, **callback_ct
bpf/helpers_generated.go:550
Function
Forward
bpf:section xdp
testdata/examples/29_devmap.go:20
Method
Get
Get returns the entry for task or nil if no entry exists.
bpf/maps.go:209
Method
Get
(inode unsafe.Pointer)
bpf/maps.go:231
Function
GetAttachCookie
GetAttachCookie wraps the BPF helper `bpf_get_attach_cookie`. Get bpf_cookie value provided (optionally) during the program attachment. It might be
bpf/helpers_generated.go:570
Function
GetBranchSnapshot
GetBranchSnapshot wraps the BPF helper `bpf_get_branch_snapshot`. Get branch trace from hardware engines like Intel LBR. The hardware engine is sto
bpf/helpers_generated.go:593
Function
GetCgroupClassid
GetCgroupClassid wraps the BPF helper `bpf_get_cgroup_classid`. Retrieve the classid for the current task, i.e. for the net_cls cgroup to which *sk
bpf/helpers_generated.go:622
Function
GetCurrentAncestorCgroupId
GetCurrentAncestorCgroupId wraps the BPF helper `bpf_get_current_ancestor_cgroup_id`. Return id of cgroup v2 that is ancestor of the cgroup associat
bpf/helpers_generated.go:643
Function
GetCurrentCgroupId
GetCurrentCgroupId wraps the BPF helper `bpf_get_current_cgroup_id`. Get the current cgroup id based on the cgroup within which the current task is
bpf/helpers_generated.go:654
Function
GetCurrentComm
GetCurrentComm wraps the BPF helper `bpf_get_current_comm`. Copy the **comm** attribute of the current task into *buf* of *size_of_buf*. The **comm
bpf/helpers_generated.go:668
Function
GetCurrentGid
GetCurrentGid returns the calling task's effective GID (the upper 32 bits of bpf_get_current_uid_gid).
bpf/sugar.go:23
Function
GetCurrentTask
GetCurrentTask wraps the BPF helper `bpf_get_current_task`. Get the current task. Returns A pointer to the current task struct.
bpf/helpers_generated.go:689
Function
GetCurrentTid
GetCurrentTid returns the calling thread's ID (the lower 32 bits of bpf_get_current_pid_tgid). Equivalent to gettid(2).
bpf/sugar.go:15
Function
GetCurrentUidGid
GetCurrentUidGid wraps the BPF helper `bpf_get_current_uid_gid`. Get the current uid and gid. Returns A 64-bit integer containing the current GID
bpf/helpers_generated.go:710
Function
GetFuncArg
GetFuncArg wraps the BPF helper `bpf_get_func_arg`. Get **n**-th argument register (zero based) of the traced function (for tracing programs) retur
bpf/helpers_generated.go:721
← previous
next →
101–200 of 474, ranked by callers