Documentation
¶
Overview ¶
Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func BpfGetMapInfoFromProgInfo(progFD int, numMaps uint32) ([]ebpf_maps.BpfMapInfo, []int, error)
- func MountBpfFS() error
- type BpfObjGet
- type BpfObjGetInfo
- type BpfProgAPIs
- type BpfProgAttr
- type BpfProgInfo
- type BpfProgram
- func (m *BpfProgram) GetBPFProgAssociatedMapsIDs(progFD int) ([]uint32, error)
- func (m *BpfProgram) GetProgFromPinPath(pinPath string) (BpfProgInfo, int, error)
- func (m *BpfProgram) LoadProg(progMetaData CreateEBPFProgInput) (int, error)
- func (m *BpfProgram) PinProg(progFD uint32, pinPath string) error
- func (m *BpfProgram) UnPinProg(pinPath string) error
- type CreateEBPFProgInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MountBpfFS ¶
func MountBpfFS() error
Types ¶
type BpfObjGet ¶
type BpfObjGet struct {
// contains filtered or unexported fields
}
* struct { anonymous struct used by BPF_OBJ_* commands * __aligned_u64 pathname; * __u32 bpf_fd; * __u32 file_flags; * };
func (*BpfObjGet) BpfGetObject ¶
type BpfObjGetInfo ¶
type BpfObjGetInfo struct {
// contains filtered or unexported fields
}
- struct { anonymous struct used by BPF_OBJ_GET_INFO_BY_FD
- __u32 bpf_fd;
- __u32 info_len;
- __aligned_u64 info;
- } info;
*
func (*BpfObjGetInfo) BpfGetProgramInfoForFD ¶
func (objattr *BpfObjGetInfo) BpfGetProgramInfoForFD() error
type BpfProgAPIs ¶
type BpfProgAttr ¶
type BpfProgAttr struct {
// contains filtered or unexported fields
}
func (*BpfProgAttr) BpfProgGetFDbyID ¶
func (attr *BpfProgAttr) BpfProgGetFDbyID() (int, error)
type BpfProgInfo ¶
type BpfProgInfo struct {
Type uint32
ID uint32
Tag [constdef.BPFTagSize]byte
JitedProgLen uint32
XlatedProgLen uint32
JitedProgInsns uint64
XlatedProgInsns uint64
LoadTime int64
CreatedByUID uint32
NrMapIDs uint32
MapIDs uint64
Name [constdef.BPFObjNameLen]byte
IfIndex uint32
GPLCompatible uint32 `strcut:"bitfield"`
Pad uint32 `strcut:"pad"`
NetnsDev uint64
NetnsIno uint64
NrJitedKsyms uint32
NrJitedFuncLens uint32
JitedKsyms uint64
JitedFuncLens uint64
BTFID uint32
FuncInfoRecSize uint32
FuncInfo uint64
NrFuncInfo uint32
NrLineInfo uint32
LineInfo uint64
JitedLineInfo uint64
NrJitedLineInfo uint32
LineInfoRecSize uint32
JitedLineInfoRecSize uint32
NrProgTags uint32
ProgTags uint64
RunTimeNS uint64
RunCnt uint64
}
func BpfGetAllProgramInfo ¶
func BpfGetAllProgramInfo() ([]BpfProgInfo, error)
func GetBPFprogInfo ¶
func GetBPFprogInfo(progFD int) (BpfProgInfo, error)
type BpfProgram ¶
type BpfProgram struct {
// return program name, prog FD and pinPath
ProgID int
ProgFD int
PinPath string
ProgType string
SubSystem string
SubProgType string
}
func (*BpfProgram) GetBPFProgAssociatedMapsIDs ¶
func (m *BpfProgram) GetBPFProgAssociatedMapsIDs(progFD int) ([]uint32, error)
func (*BpfProgram) GetProgFromPinPath ¶
func (m *BpfProgram) GetProgFromPinPath(pinPath string) (BpfProgInfo, int, error)
func (*BpfProgram) LoadProg ¶
func (m *BpfProgram) LoadProg(progMetaData CreateEBPFProgInput) (int, error)
func (*BpfProgram) UnPinProg ¶
func (m *BpfProgram) UnPinProg(pinPath string) error
Click to show internal directories.
Click to hide internal directories.