lib

package
v3.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

README

Embedded WAF libraries

This directory contains Datadog's WAF static libraries taken from the releases of https://github.com/DataDog/libddwaf

Updating

From the root of the repository, run:

./_tools/libddwaf-updater/update.sh
Will upgrade from v1.14.0 to v1.15.0
... downloaded <repo-root>/Datadog/go-libddwaf/include/ddwaf.h
... downloaded <repo-root>/Datadog/go-libddwaf/lib/darwin-arm64/libddwaf.dylib
... downloaded <repo-root>/Datadog/go-libddwaf/lib/darwin-amd64/libddwaf.dylib
... downloaded <repo-root>/Datadog/go-libddwaf/lib/linux-arm64/libddwaf.so
... downloaded <repo-root>/Datadog/go-libddwaf/lib/linux-amd64/libddwaf.so
... downloaded <repo-root>/Datadog/go-libddwaf/lib/linux-armv7/libddwaf.so
... downloaded <repo-root>/Datadog/go-libddwaf/lib/linux-i386/libddwaf.so
All done! Don't forget to check in changes to include/ and lib/, check the libddwaf upgrade guide to update bindings!

Documentation

Overview

Package lib provides a built-in WAF library version for the relevant runtime platform.

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedWAFVersion string

Functions

func DumpEmbeddedWAF

func DumpEmbeddedWAF() (path string, closer func() error, err error)

DumpEmbeddedWAF for linux systems. It creates a memfd and writes the embedded WAF library to it. Then it returns the path the /proc/self/fd/<fd> path to the file. This trick makes us able to load the library without having to write it to disk. Hence, making go-libddwaf work on full read-only filesystems.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL