Documentation ¶
Index ¶
- Constants
- type WafConfig
- type WafConfigLimits
- type WafConfigObfuscator
- type WafContext
- type WafDl
- func (waf *WafDl) WafContextDestroy(context WafContext)
- func (waf *WafDl) WafContextInit(handle WafHandle) WafContext
- func (waf *WafDl) WafDestroy(handle WafHandle)
- func (waf *WafDl) WafGetVersion() string
- func (waf *WafDl) WafInit(obj *WafObject, config *WafConfig, info *WafObject) WafHandle
- func (waf *WafDl) WafKnownAddresses(handle WafHandle) []string
- func (waf *WafDl) WafObjectFree(obj *WafObject)
- func (waf *WafDl) WafResultFree(result *WafResult)
- func (waf *WafDl) WafRun(context WafContext, persistentData, ephemeralData *WafObject, ...) WafReturnCode
- func (waf *WafDl) WafUpdate(handle WafHandle, ruleset *WafObject, info *WafObject) WafHandle
- type WafHandle
- type WafObject
- type WafObjectType
- type WafResult
- type WafReturnCode
Constants ¶
View Source
const ( WafMaxStringLength = 4096 WafMaxContainerDepth = 20 WafMaxContainerSize = 256 WafRunTimeout = 5000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WafConfig ¶
type WafConfig struct { Limits WafConfigLimits Obfuscator WafConfigObfuscator FreeFn uintptr }
type WafConfigLimits ¶
type WafConfigObfuscator ¶
type WafContext ¶
type WafContext uintptr
wafContext is a forward declaration in ddwaf.h header We basically don't need to modify it, only to give it to the waf
type WafDl ¶
type WafDl struct{}
func (*WafDl) WafContextDestroy ¶
func (waf *WafDl) WafContextDestroy(context WafContext)
func (*WafDl) WafContextInit ¶
func (waf *WafDl) WafContextInit(handle WafHandle) WafContext
func (*WafDl) WafDestroy ¶
func (*WafDl) WafGetVersion ¶
func (*WafDl) WafKnownAddresses ¶
func (*WafDl) WafObjectFree ¶
func (*WafDl) WafResultFree ¶
func (*WafDl) WafRun ¶
func (waf *WafDl) WafRun(context WafContext, persistentData, ephemeralData *WafObject, result *WafResult, timeout uint64) WafReturnCode
type WafHandle ¶
type WafHandle uintptr
wafHandle is a forward declaration in ddwaf.h header We basically don't need to modify it, only to give it to the waf
type WafObject ¶
type WafObject struct { ParameterName uintptr ParameterNameLength uint64 Value uintptr NbEntries uint64 Type WafObjectType // contains filtered or unexported fields }
func (*WafObject) IsInvalid ¶
isInvalid determines whether this WAF Object has the invalid type (which is the 0-value).
func (*WafObject) IsUnusable ¶
IsUnusable returns true if the wafObject has no impact on the WAF execution But we still need this kind of objects to forward map keys in case the value of the map is invalid
type WafObjectType ¶
type WafObjectType uint32
wafObjectType is an enum in C which has the size of DWORD. But DWORD is 4 bytes in amd64 and arm64 so uint32 it is.
const ( WafIntType WafObjectType = 1 << iota WafUintType WafStringType WafArrayType WafMapType WafBoolType WafFloatType WafNilType )
const WafInvalidType WafObjectType = 0
type WafReturnCode ¶
type WafReturnCode int32
const ( WafErrInternal WafReturnCode = iota - 3 WafErrInvalidObject WafErrInvalidArgument WafOK WafMatch )
Click to show internal directories.
Click to hide internal directories.