| 1 | package Linux::SocketFilter; | ||||||||||
| 2 | # This module was generated automatically by ExtUtils::H2PM from lib/Linux/SocketFilter_const.pm.PL | ||||||||||
| 3 | |||||||||||
| 4 | 5 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 5 | push @EXPORT_OK, 'SO_ATTACH_FILTER', 'SO_DETACH_FILTER', 'pack_sock_filter', 'unpack_sock_filter', 'BPF_LD', 'BPF_LDX', 'BPF_ST', 'BPF_STX', 'BPF_ALU', 'BPF_JMP', 'BPF_RET', 'BPF_MISC', 'BPF_W', 'BPF_H', 'BPF_B', 'BPF_IMM', 'BPF_ABS', 'BPF_IND', 'BPF_MEM', 'BPF_LEN', 'BPF_MSH', 'BPF_ADD', 'BPF_SUB', 'BPF_MUL', 'BPF_DIV', 'BPF_OR', 'BPF_AND', 'BPF_LSH', 'BPF_RSH', 'BPF_NEG', 'BPF_JA', 'BPF_JEQ', 'BPF_JGT', 'BPF_JGE', 'BPF_JSET', 'BPF_K', 'BPF_X', 'BPF_A', 'BPF_TAX', 'BPF_TXA', 'SKF_AD_OFF', 'SKF_AD_PROTOCOL', 'SKF_AD_PKTTYPE', 'SKF_AD_IFINDEX', 'SKF_NET_OFF', 'SKF_LL_OFF'; | |||||||||
| 6 | 5 | ▶ | use constant SO_ATTACH_FILTER => 26; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 5 | ▶ | use constant SO_DETACH_FILTER => 27; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | sub pack_sock_filter | ||||||||||
| 10 | 30 | ▶ | { | ||||||||
|
Subroutine
pack_sock_filter: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 11 | 30 | ▶ | @_ == 4 or croak "usage: pack_sock_filter(code, jt, jf, k)"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | 30 | my @v = @_; | |||||||||
| 13 | 30 | pack "S C C L ", @v; | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | sub unpack_sock_filter | ||||||||||
| 17 | 24 | ▶ | { | ||||||||
|
Subroutine
unpack_sock_filter: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 18 | 24 | ▶ | length $_[0] == 8 or croak "unpack_sock_filter: expected 8 bytes, got " . length $_[0]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 24 | my @v = unpack "S C C L ", $_[0]; | |||||||||
| 20 | 24 | @v; | |||||||||
| 21 | } | ||||||||||
| 22 | 5 | ▶ | use constant BPF_LD => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 5 | ▶ | use constant BPF_LDX => 1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 5 | ▶ | use constant BPF_ST => 2; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | 5 | ▶ | use constant BPF_STX => 3; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 26 | 5 | ▶ | use constant BPF_ALU => 4; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | 5 | ▶ | use constant BPF_JMP => 5; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 28 | 5 | ▶ | use constant BPF_RET => 6; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 29 | 5 | ▶ | use constant BPF_MISC => 7; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 30 | 5 | ▶ | use constant BPF_W => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 31 | 5 | ▶ | use constant BPF_H => 8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 32 | 5 | ▶ | use constant BPF_B => 16; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 33 | 5 | ▶ | use constant BPF_IMM => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 34 | 5 | ▶ | use constant BPF_ABS => 32; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 35 | 5 | ▶ | use constant BPF_IND => 64; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 36 | 5 | ▶ | use constant BPF_MEM => 96; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 37 | 5 | ▶ | use constant BPF_LEN => 128; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 38 | 5 | ▶ | use constant BPF_MSH => 160; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 39 | 5 | ▶ | use constant BPF_ADD => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 40 | 5 | ▶ | use constant BPF_SUB => 16; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 41 | 5 | ▶ | use constant BPF_MUL => 32; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 42 | 5 | ▶ | use constant BPF_DIV => 48; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 43 | 5 | ▶ | use constant BPF_OR => 64; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 44 | 5 | ▶ | use constant BPF_AND => 80; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 45 | 5 | ▶ | use constant BPF_LSH => 96; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 46 | 5 | ▶ | use constant BPF_RSH => 112; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 47 | 5 | ▶ | use constant BPF_NEG => 128; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 48 | 5 | ▶ | use constant BPF_JA => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 49 | 5 | ▶ | use constant BPF_JEQ => 16; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 50 | 5 | ▶ | use constant BPF_JGT => 32; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 51 | 5 | ▶ | use constant BPF_JGE => 48; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 52 | 5 | ▶ | use constant BPF_JSET => 64; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 53 | 5 | ▶ | use constant BPF_K => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 54 | 5 | ▶ | use constant BPF_X => 8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 55 | 5 | ▶ | use constant BPF_A => 16; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 56 | 5 | ▶ | use constant BPF_TAX => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 57 | 5 | ▶ | use constant BPF_TXA => 128; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 58 | 5 | ▶ | use constant SKF_AD_OFF => -4096; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 59 | 5 | ▶ | use constant SKF_AD_PROTOCOL => 0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 60 | 5 | ▶ | use constant SKF_AD_PKTTYPE => 4; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 61 | 5 | ▶ | use constant SKF_AD_IFINDEX => 8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 62 | 5 | ▶ | use constant SKF_NET_OFF => -1048576; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 63 | 5 | ▶ | use constant SKF_LL_OFF => -2097152; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 64 | |||||||||||
| 65 | 5 | 1; | |||||||||