Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ebpfCAT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
karaboDevices
ebpfCAT
Commits
9def990a
Commit
9def990a
authored
1 year ago
by
Martin Teichmann
Browse files
Options
Downloads
Patches
Plain Diff
add reference documentation for ebpf
parent
0fd11ca8
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ebpfcat/arraymap.py
+5
-0
5 additions, 0 deletions
ebpfcat/arraymap.py
ebpfcat/ebpf.py
+4
-0
4 additions, 0 deletions
ebpfcat/ebpf.py
ebpfcat/ebpf.rst
+12
-0
12 additions, 0 deletions
ebpfcat/ebpf.rst
ebpfcat/xdp.py
+3
-0
3 additions, 0 deletions
ebpfcat/xdp.py
with
24 additions
and
0 deletions
ebpfcat/arraymap.py
+
5
−
0
View file @
9def990a
...
@@ -15,6 +15,11 @@
...
@@ -15,6 +15,11 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
The ``arraymap`` module defines array maps, usually used for global
variables in EBPF programs
"""
__all__
=
[
"
ArrayMap
"
]
from
itertools
import
chain
from
itertools
import
chain
from
mmap
import
mmap
from
mmap
import
mmap
from
struct
import
pack_into
,
unpack_from
,
calcsize
from
struct
import
pack_into
,
unpack_from
,
calcsize
...
...
This diff is collapsed.
Click to expand it.
ebpfcat/ebpf.py
+
4
−
0
View file @
9def990a
...
@@ -15,6 +15,10 @@
...
@@ -15,6 +15,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
The ``ebpf`` module contains the core ebpf code generation
"""
__all__
=
[
"
EBPF
"
,
"
LocalVar
"
,
"
prandom
"
,
"
ktime
"
]
from
abc
import
ABC
,
abstractmethod
from
abc
import
ABC
,
abstractmethod
from
collections
import
namedtuple
from
collections
import
namedtuple
from
contextlib
import
contextmanager
,
ExitStack
from
contextlib
import
contextmanager
,
ExitStack
...
...
This diff is collapsed.
Click to expand it.
ebpfcat/ebpf.rst
+
12
−
0
View file @
9def990a
...
@@ -251,3 +251,15 @@ floor divisions ``//`` result in a standard integer. Some examples::
...
@@ -251,3 +251,15 @@ floor divisions ``//`` result in a standard integer. Some examples::
self.normal_var = self.fixed_var # automatically truncated
self.normal_var = self.fixed_var # automatically truncated
self.fixed_var = self.normal_var / 5 # keep decimals
self.fixed_var = self.normal_var / 5 # keep decimals
self.fixed_var = self.normal_var // 5 # floor division
self.fixed_var = self.normal_var // 5 # floor division
Reference Documentation
-----------------------
.. automodule:: ebpfcat.ebpf
:members:
.. automodule:: ebpfcat.xdp
:members:
.. automodule:: ebpfcat.arraymap
:members:
This diff is collapsed.
Click to expand it.
ebpfcat/xdp.py
+
3
−
0
View file @
9def990a
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
support for XDP programs
"""
"""
support for XDP programs
"""
__all__
=
[
"
XDPExitCode
"
,
"
XDPFlags
"
,
"
PacketVar
"
,
"
XDP
"
]
from
asyncio
import
DatagramProtocol
,
Future
,
get_event_loop
from
asyncio
import
DatagramProtocol
,
Future
,
get_event_loop
from
enum
import
Enum
from
enum
import
Enum
from
contextlib
import
asynccontextmanager
,
contextmanager
from
contextlib
import
asynccontextmanager
,
contextmanager
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment