MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / ipToInt64

Method ipToInt64

internal/waf/rule.go:810–818  ·  view source on GitHub ↗
(ip net.IP)

Source from the content-addressed store, hash-verified

808}
809
810func (this *Rule) ipToInt64(ip net.IP) int64 {
811 if len(ip) == 0 {
812 return 0
813 }
814 if len(ip) == 16 {
815 return int64(binary.BigEndian.Uint32(ip[12:16]))
816 }
817 return int64(binary.BigEndian.Uint32(ip))
818}
819
820func (this *Rule) execFilter(value any) any {
821 var goNext bool

Callers 1

TestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected