Generated by Cython 0.24

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: bpf.c

     001: #

     002: # Copyright 2016 iXsystems, Inc.

     003: # All rights reserved

     004: #

     005: # Redistribution and use in source and binary forms, with or without

     006: # modification, are permitted providing that the following conditions

     007: # are met:

     008: # 1. Redistributions of source code must retain the above copyright

     009: #    notice, this list of conditions and the following disclaimer.

     010: # 2. Redistributions in binary form must reproduce the above copyright

     011: #    notice, this list of conditions and the following disclaimer in the

     012: #    documentation and/or other materials provided with the distribution.

     013: #

     014: # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR

     015: # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

     016: # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

     017: # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY

     018: # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

     019: # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS

     020: # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

     021: # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,

     022: # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING

     023: # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

     024: # POSSIBILITY OF SUCH DAMAGE.

     025: #

     026: #####################################################################

     027:

    +028: import os

      __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +029: import enum

      __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     030: from posix.unistd cimport read, write

    +031: import select

      __pyx_t_1 = __Pyx_Import(__pyx_n_s_select, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_select, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     032: from posix.ioctl cimport ioctl

     033: from libc.errno cimport errno

     034: from libc.stdlib cimport malloc, realloc, free

     035: from libc.stdint cimport uintptr_t

     036: from libc.string cimport strncpy, memcpy

     037: cimport defs

     038:

     039:

    +040: class InstructionClass(enum.IntEnum):

      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_InstructionClass, __pyx_n_s_InstructionClass, (PyObject *) NULL, __pyx_n_s_bsd_bpf, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    /* … */
      __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InstructionClass, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_InstructionClass, __pyx_t_4) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +041:     LD = defs.BPF_LD

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_LD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LD, __pyx_t_4) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +042:     LDX = defs.BPF_LDX

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_LDX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LDX, __pyx_t_4) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +043:     ST = defs.BPF_ST

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_ST); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ST, __pyx_t_4) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +044:     STX = defs.BPF_STX

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_STX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_STX, __pyx_t_4) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +045:     ALU = defs.BPF_ALU

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_ALU); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ALU, __pyx_t_4) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +046:     JMP = defs.BPF_JMP

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_JMP); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_JMP, __pyx_t_4) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +047:     RET = defs.BPF_RET

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_RET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_RET, __pyx_t_4) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +048:     MISC = defs.BPF_MISC

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_MISC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MISC, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     049:

     050:

    +051: class OperandSize(enum.IntEnum):

      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OperandSize, __pyx_n_s_OperandSize, (PyObject *) NULL, __pyx_n_s_bsd_bpf, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    /* … */
      __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OperandSize, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_OperandSize, __pyx_t_4) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +052:     W = defs.BPF_W

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_W); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_W, __pyx_t_4) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +053:     H = defs.BPF_H

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_H); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_H, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +054:     B = defs.BPF_B

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_B); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_B, __pyx_t_4) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     055:

     056:

    +057: class OperandMode(enum.IntEnum):

      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_OperandMode, __pyx_n_s_OperandMode, (PyObject *) NULL, __pyx_n_s_bsd_bpf, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    /* … */
      __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_OperandMode, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_OperandMode, __pyx_t_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +058:     IMM = defs.BPF_IMM

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_IMM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_IMM, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +059:     ABS = defs.BPF_ABS

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_ABS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ABS, __pyx_t_4) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +060:     IND = defs.BPF_IND

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_IND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_IND, __pyx_t_4) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +061:     MEM = defs.BPF_MEM

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_MEM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MEM, __pyx_t_4) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +062:     LEN = defs.BPF_LEN

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_LEN); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LEN, __pyx_t_4) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +063:     MSH = defs.BPF_MSH

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_MSH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MSH, __pyx_t_4) < 0) __PYX_ERR(0, 63, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     064:

     065:

    +066: class Opcode(enum.IntEnum):

      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Opcode, __pyx_n_s_Opcode, (PyObject *) NULL, __pyx_n_s_bsd_bpf, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    /* … */
      __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Opcode, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Opcode, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +067:     ADD = defs.BPF_ADD

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_ADD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ADD, __pyx_t_4) < 0) __PYX_ERR(0, 67, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +068:     SUB = defs.BPF_SUB

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_SUB); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_SUB, __pyx_t_4) < 0) __PYX_ERR(0, 68, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +069:     MUL = defs.BPF_MUL

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_MUL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_MUL, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +070:     DIV = defs.BPF_DIV

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_DIV); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_DIV, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +071:     OR = defs.BPF_OR

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_OR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_OR, __pyx_t_4) < 0) __PYX_ERR(0, 71, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +072:     AND = defs.BPF_AND

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_AND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_AND, __pyx_t_4) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +073:     LSH = defs.BPF_LSH

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_LSH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_LSH, __pyx_t_4) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +074:     RSH = defs.BPF_RSH

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_RSH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_RSH, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +075:     NEG = defs.BPF_NEG

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_NEG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_NEG, __pyx_t_4) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +076:     JA = defs.BPF_JA

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_JA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_JA, __pyx_t_4) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +077:     JEQ = defs.BPF_JEQ

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_JEQ); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_JEQ, __pyx_t_4) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +078:     JGT = defs.BPF_JGT

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_JGT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_JGT, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +079:     JGE = defs.BPF_JGE

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_JGE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_JGE, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +080:     JSET = defs.BPF_JSET

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_JSET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_JSET, __pyx_t_4) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +081:     TAX = defs.BPF_TAX

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_TAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_TAX, __pyx_t_4) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +082:     TXA = defs.BPF_TXA

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_TXA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_TXA, __pyx_t_4) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     083:

     084:

    +085: class Source(enum.IntEnum):

      __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_enum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Source, __pyx_n_s_Source, (PyObject *) NULL, __pyx_n_s_bsd_bpf, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    /* … */
      __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Source, __pyx_t_1, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Source, __pyx_t_4) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +086:     K = defs.BPF_K

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_K); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_K, __pyx_t_4) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +087:     X = defs.BPF_X

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_X); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_X, __pyx_t_4) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +088:     A = defs.BPF_A

      __pyx_t_4 = __Pyx_PyInt_From_int(BPF_A); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_A, __pyx_t_4) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     089:

     090:

    +091: cdef class Statement(object):

    struct __pyx_obj_3bsd_3bpf_Statement {
      PyObject_HEAD
      struct bpf_insn insn;
    };

     092:     cdef defs.bpf_insn insn

     093:

    +094:     def __init__(self, code, k):

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_9Statement_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_3bsd_3bpf_9Statement_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_code = 0;
      PyObject *__pyx_v_k = 0;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code,&__pyx_n_s_k,0};
        PyObject* values[2] = {0,0};
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_code)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 94, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 94, __pyx_L3_error)
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        }
        __pyx_v_code = values[0];
        __pyx_v_k = values[1];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 94, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("bsd.bpf.Statement.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_3bsd_3bpf_9Statement___init__(((struct __pyx_obj_3bsd_3bpf_Statement *)__pyx_v_self), __pyx_v_code, __pyx_v_k);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_9Statement___init__(struct __pyx_obj_3bsd_3bpf_Statement *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_k) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__", 0);
    /* … */
      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("bsd.bpf.Statement.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +095:         self.insn.code = code

      __pyx_t_1 = __Pyx_PyInt_As_u_short(__pyx_v_code); if (unlikely((__pyx_t_1 == (u_short)-1) && PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L1_error)
      __pyx_v_self->insn.code = __pyx_t_1;

    +096:         self.insn.k = k

      __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_k); if (unlikely((__pyx_t_2 == (uint32_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 96, __pyx_L1_error)
      __pyx_v_self->insn.k = __pyx_t_2;

    +097:         self.insn.jf = 0

      __pyx_v_self->insn.jf = 0;

    +098:         self.insn.jt = 0

      __pyx_v_self->insn.jt = 0;

     099:

     100:

    +101: cdef class Jump(Statement):

    struct __pyx_obj_3bsd_3bpf_Jump {
      struct __pyx_obj_3bsd_3bpf_Statement __pyx_base;
    };

    +102:     def __init__(self, code, k, jt, jf):

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_4Jump_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_3bsd_3bpf_4Jump_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_code = 0;
      PyObject *__pyx_v_k = 0;
      PyObject *__pyx_v_jt = 0;
      PyObject *__pyx_v_jf = 0;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code,&__pyx_n_s_k,&__pyx_n_s_jt,&__pyx_n_s_jf,0};
        PyObject* values[4] = {0,0,0,0};
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_code)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 102, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jt)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 102, __pyx_L3_error)
            }
            case  3:
            if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_jf)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 102, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 102, __pyx_L3_error)
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
          values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        }
        __pyx_v_code = values[0];
        __pyx_v_k = values[1];
        __pyx_v_jt = values[2];
        __pyx_v_jf = values[3];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 102, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("bsd.bpf.Jump.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_3bsd_3bpf_4Jump___init__(((struct __pyx_obj_3bsd_3bpf_Jump *)__pyx_v_self), __pyx_v_code, __pyx_v_k, __pyx_v_jt, __pyx_v_jf);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_4Jump___init__(struct __pyx_obj_3bsd_3bpf_Jump *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_k, PyObject *__pyx_v_jt, PyObject *__pyx_v_jf) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__", 0);
    /* … */
      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("bsd.bpf.Jump.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +103:         super(Jump, self).__init__(code, k)

      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(((PyObject *)__pyx_ptype_3bsd_3bpf_Jump));
      __Pyx_GIVEREF(((PyObject *)__pyx_ptype_3bsd_3bpf_Jump));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_3bsd_3bpf_Jump));
      __Pyx_INCREF(((PyObject *)__pyx_v_self));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
      PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self));
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_3) {
        __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
      }
      __Pyx_INCREF(__pyx_v_code);
      __Pyx_GIVEREF(__pyx_v_code);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_code);
      __Pyx_INCREF(__pyx_v_k);
      __Pyx_GIVEREF(__pyx_v_k);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_k);
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +104:         self.insn.jt = jt

      __pyx_t_6 = __Pyx_PyInt_As_u_char(__pyx_v_jt); if (unlikely((__pyx_t_6 == (u_char)-1) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error)
      __pyx_v_self->__pyx_base.insn.jt = __pyx_t_6;

    +105:         self.insn.jf = jf

      __pyx_t_6 = __Pyx_PyInt_As_u_char(__pyx_v_jf); if (unlikely((__pyx_t_6 == (u_char)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L1_error)
      __pyx_v_self->__pyx_base.insn.jf = __pyx_t_6;

     106:

     107:

    +108: cdef class BPF(object):

    struct __pyx_obj_3bsd_3bpf_BPF {
      PyObject_HEAD
      PyObject *fd;
      char *buffer;
      int pipe_r;
      int pipe_w;
    };

    +109:     cdef public object fd

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_2fd_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_2fd_1__get__(PyObject *__pyx_v_self) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_2fd___get__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_2fd___get__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__", 0);
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->fd);
      __pyx_r = __pyx_v_self->fd;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_3BPF_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_3bsd_3bpf_3BPF_2fd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_2fd_2__set__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_3BPF_2fd_2__set__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__", 0);
      __Pyx_INCREF(__pyx_v_value);
      __Pyx_GIVEREF(__pyx_v_value);
      __Pyx_GOTREF(__pyx_v_self->fd);
      __Pyx_DECREF(__pyx_v_self->fd);
      __pyx_v_self->fd = __pyx_v_value;

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_3BPF_2fd_5__del__(PyObject *__pyx_v_self); /*proto*/
    static int __pyx_pw_3bsd_3bpf_3BPF_2fd_5__del__(PyObject *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_2fd_4__del__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_3BPF_2fd_4__del__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__del__", 0);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->fd);
      __Pyx_DECREF(__pyx_v_self->fd);
      __pyx_v_self->fd = Py_None;

      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     110:     cdef char *buffer

     111:     cdef int pipe_r

     112:     cdef int pipe_w

     113:

    +114:     def __init__(self):

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_3BPF_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_3bsd_3bpf_3BPF_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
        __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
      if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF___init__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_3BPF___init__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__", 0);
    /* … */
      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("bsd.bpf.BPF.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +115:         self.fd = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->fd);
      __Pyx_DECREF(__pyx_v_self->fd);
      __pyx_v_self->fd = Py_None;

    +116:         self.pipe_r, self.pipe_w = os.pipe()

      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pipe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_2) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        #if CYTHON_COMPILING_IN_CPYTHON
        Py_ssize_t size = Py_SIZE(sequence);
        #else
        Py_ssize_t size = PySequence_Size(sequence);
        #endif
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 116, __pyx_L1_error)
        }
        #if CYTHON_COMPILING_IN_CPYTHON
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
        index = 0; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
        __pyx_t_5 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L4_unpacking_done;
        __pyx_L3_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_5 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 116, __pyx_L1_error)
        __pyx_L4_unpacking_done:;
      }
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_self->pipe_r = __pyx_t_6;
      __pyx_v_self->pipe_w = __pyx_t_7;

     117:

    +118:     def __dealloc__(self):

    /* Python wrapper */
    static void __pyx_pw_3bsd_3bpf_3BPF_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
    static void __pyx_pw_3bsd_3bpf_3BPF_3__dealloc__(PyObject *__pyx_v_self) {
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
      __pyx_pf_3bsd_3bpf_3BPF_2__dealloc__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
    }

    static void __pyx_pf_3bsd_3bpf_3BPF_2__dealloc__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__dealloc__", 0);
    /* … */
      /* function exit code */
      __Pyx_RefNannyFinishContext();
    }

    +119:         free(self.buffer)

      free(__pyx_v_self->buffer);

     120:

    +121:     def __enter__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_5__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_5__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_4__enter__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_4__enter__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__enter__", 0);
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("bsd.bpf.BPF.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +122:         self.open()

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     123:

    +124:     def __exit__(self, exc_type, exc_val, exc_tb):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_7__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_7__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
      CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0;
      CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
      {
        static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_val,&__pyx_n_s_exc_tb,0};
        PyObject* values[3] = {0,0,0};
        if (unlikely(__pyx_kwds)) {
          Py_ssize_t kw_args;
          const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
          switch (pos_args) {
            case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
            case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
            case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          kw_args = PyDict_Size(__pyx_kwds);
          switch (pos_args) {
            case  0:
            if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_type)) != 0)) kw_args--;
            else goto __pyx_L5_argtuple_error;
            case  1:
            if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_val)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 124, __pyx_L3_error)
            }
            case  2:
            if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_tb)) != 0)) kw_args--;
            else {
              __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 124, __pyx_L3_error)
            }
          }
          if (unlikely(kw_args > 0)) {
            if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__exit__") < 0)) __PYX_ERR(0, 124, __pyx_L3_error)
          }
        } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
          values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
          values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        }
        __pyx_v_exc_type = values[0];
        __pyx_v_exc_val = values[1];
        __pyx_v_exc_tb = values[2];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 124, __pyx_L3_error)
      __pyx_L3_error:;
      __Pyx_AddTraceback("bsd.bpf.BPF.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_6__exit__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_val, __pyx_v_exc_tb);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_6__exit__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_val, CYTHON_UNUSED PyObject *__pyx_v_exc_tb) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__exit__", 0);
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("bsd.bpf.BPF.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +125:         self.close()

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     126:

    +127:     def __alloc_buffer(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_9__alloc_buffer(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_9__alloc_buffer(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__alloc_buffer (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_8__alloc_buffer(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_8__alloc_buffer(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__alloc_buffer", 0);
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("bsd.bpf.BPF.__alloc_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +128:         self.buffer = <char *>realloc(<void *>self.buffer, self.buffer_size)

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_self->buffer = ((char *)realloc(((void *)__pyx_v_self->buffer), __pyx_t_2));

     129:

     130:     property buffer_size:

    +131:         def __get__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_11buffer_size_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_11buffer_size_1__get__(PyObject *__pyx_v_self) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_11buffer_size___get__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_11buffer_size___get__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      int __pyx_v_value;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__", 0);
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("bsd.bpf.BPF.buffer_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     132:             cdef int value

     133:

    +134:             if ioctl(self.fd.fileno(), defs.BIOCGBLEN, &value) != 0:

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = ((ioctl(__pyx_t_4, BIOCGBLEN, (&__pyx_v_value)) != 0) != 0);
      if (__pyx_t_5) {
    /* … */
      }

    +135:                 raise OSError(errno, os.strerror(errno))

        __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (!__pyx_t_7) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
        __pyx_t_1 = 0;
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 135, __pyx_L1_error)

     136:

    +137:             return value

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     138:

    +139:         def __set__(self, buffer_size):

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_3BPF_11buffer_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_buffer_size); /*proto*/
    static int __pyx_pw_3bsd_3bpf_3BPF_11buffer_size_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_buffer_size) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_11buffer_size_2__set__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self), ((PyObject *)__pyx_v_buffer_size));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_3BPF_11buffer_size_2__set__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self, PyObject *__pyx_v_buffer_size) {
      int __pyx_v_value;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__", 0);
    /* … */
      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("bsd.bpf.BPF.buffer_size.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +140:             cdef int value = <int>buffer_size

      __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_buffer_size); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error)
      __pyx_v_value = ((int)__pyx_t_1);

     141:

    +142:             if ioctl(self.fd.fileno(), defs.BIOCSBLEN, &value) != 0:

      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = ((ioctl(__pyx_t_1, BIOCSBLEN, (&__pyx_v_value)) != 0) != 0);
      if (__pyx_t_5) {
    /* … */
      }

    +143:                 raise OSError(errno, os.strerror(errno))

        __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (!__pyx_t_7) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 143, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
        __pyx_t_2 = 0;
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 143, __pyx_L1_error)

     144:

    +145:             self.__alloc_buffer()

      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alloc_buffer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
        }
      }
      if (__pyx_t_2) {
        __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     146:

     147:     property interface:

    +148:         def __get__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_9interface_1__get__(PyObject *__pyx_v_self); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_9interface_1__get__(PyObject *__pyx_v_self) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_9interface___get__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_9interface___get__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      struct ifreq __pyx_v_ifr;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__get__", 0);
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("bsd.bpf.BPF.interface.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     149:             cdef defs.ifreq ifr

     150:

    +151:             if ioctl(self.fd.fileno(), defs.BIOCGETIF, <void *>&ifr) != 0:

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = ((ioctl(__pyx_t_4, BIOCGETIF, ((void *)(&__pyx_v_ifr))) != 0) != 0);
      if (__pyx_t_5) {
    /* … */
      }

    +152:                 raise OSError(errno, os.strerror(errno))

        __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (!__pyx_t_7) {
          __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_GOTREF(__pyx_t_2);
        } else {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
        __pyx_t_1 = 0;
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 152, __pyx_L1_error)

     153:

    +154:             return ifr.ifr_name.decode('ascii')

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __pyx_v_ifr.ifr_name;
      __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_9, 0, strlen(__pyx_t_9), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L0;

     155:

    +156:         def __set__(self, value):

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_3BPF_9interface_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
    static int __pyx_pw_3bsd_3bpf_3BPF_9interface_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_9interface_2__set__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self), ((PyObject *)__pyx_v_value));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_3BPF_9interface_2__set__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self, PyObject *__pyx_v_value) {
      struct ifreq __pyx_v_ifr;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__", 0);
    /* … */
      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("bsd.bpf.BPF.interface.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     157:             cdef defs.ifreq ifr

     158:

    +159:             strncpy(ifr.ifr_name, value.encode('ascii'), defs.IFNAMSIZ)

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L1_error)
      strncpy(__pyx_v_ifr.ifr_name, __pyx_t_3, IFNAMSIZ);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /* … */
      __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_tuple_);
      __Pyx_GIVEREF(__pyx_tuple_);

    +160:             if ioctl(self.fd.fileno(), defs.BIOCSETIF, <void *>&ifr) != 0:

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 160, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = ((ioctl(__pyx_t_5, BIOCSETIF, ((void *)(&__pyx_v_ifr))) != 0) != 0);
      if (__pyx_t_6) {
    /* … */
      }

    +161:                 raise OSError(errno, os.strerror(errno))

        __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
          }
        }
        if (!__pyx_t_8) {
          __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_1);
        } else {
          __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_1);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 161, __pyx_L1_error)

     162:

     163:     property immediate:

    +164:         def __set__(self, immediate):

    /* Python wrapper */
    static int __pyx_pw_3bsd_3bpf_3BPF_9immediate_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_immediate); /*proto*/
    static int __pyx_pw_3bsd_3bpf_3BPF_9immediate_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_immediate) {
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_9immediate___set__(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self), ((PyObject *)__pyx_v_immediate));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_3bsd_3bpf_3BPF_9immediate___set__(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self, PyObject *__pyx_v_immediate) {
      int __pyx_v_value;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__set__", 0);
    /* … */
      /* function exit code */
      __pyx_r = 0;
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("bsd.bpf.BPF.immediate.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +165:             cdef int value = <int>immediate

      __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_immediate); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
      __pyx_v_value = ((int)__pyx_t_1);

     166:

    +167:             if ioctl(self.fd.fileno(), defs.BIOCIMMEDIATE, &value) != 0:

      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = ((ioctl(__pyx_t_1, BIOCIMMEDIATE, (&__pyx_v_value)) != 0) != 0);
      if (__pyx_t_5) {
    /* … */
      }

    +168:                 raise OSError(errno, os.strerror(errno))

        __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_strerror); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
          }
        }
        if (!__pyx_t_7) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 168, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
          __Pyx_GIVEREF(__pyx_t_4);
          PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_4);
          __pyx_t_4 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
        __pyx_t_2 = 0;
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 168, __pyx_L1_error)

     169:

    +170:     def open(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_11open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_11open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("open (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_10open(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_10open(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("open", 0);
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("bsd.bpf.BPF.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +171:         self.fd = open('/dev/bpf', 'r+b', buffering=0)

      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_buffering, __pyx_int_0) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_tuple__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->fd);
      __Pyx_DECREF(__pyx_v_self->fd);
      __pyx_v_self->fd = __pyx_t_2;
      __pyx_t_2 = 0;

    +172:         self.__alloc_buffer()

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alloc_buffer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     173:

    +174:     def close(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_13close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("close (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_12close(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_12close(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("close", 0);
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("bsd.bpf.BPF.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +175:         os.write(self.pipe_w, b'E')

      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->pipe_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_5 = 1;
        }
      }
      __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
      __Pyx_INCREF(__pyx_n_b_E);
      __Pyx_GIVEREF(__pyx_n_b_E);
      PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_n_b_E);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +176:         self.fd.close()

      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_6) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     177:

    +178:     def apply_filter(self, instructions):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_15apply_filter(PyObject *__pyx_v_self, PyObject *__pyx_v_instructions); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_15apply_filter(PyObject *__pyx_v_self, PyObject *__pyx_v_instructions) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("apply_filter (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_14apply_filter(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self), ((PyObject *)__pyx_v_instructions));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_14apply_filter(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self, PyObject *__pyx_v_instructions) {
      struct bpf_program __pyx_v_prog;
      struct __pyx_obj_3bsd_3bpf_Statement *__pyx_v_stmt = 0;
      PyObject *__pyx_v_idx = NULL;
      PyObject *__pyx_v_i = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("apply_filter", 0);
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("bsd.bpf.BPF.apply_filter", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_stmt);
      __Pyx_XDECREF(__pyx_v_idx);
      __Pyx_XDECREF(__pyx_v_i);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    static PyObject *__pyx_gb_3bsd_3bpf_3BPF_18generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

     179:         cdef defs.bpf_program prog

     180:         cdef Statement stmt

     181:

    +182:         prog.bf_len = len(instructions)

      __pyx_t_1 = PyObject_Length(__pyx_v_instructions); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 182, __pyx_L1_error)
      __pyx_v_prog.bf_len = __pyx_t_1;

    +183:         prog.bf_insns = <defs.bpf_insn *>malloc(sizeof(defs.bpf_insn) * len(instructions))

      __pyx_t_1 = PyObject_Length(__pyx_v_instructions); if (unlikely(__pyx_t_1 == -1)) __PYX_ERR(0, 183, __pyx_L1_error)
      __pyx_v_prog.bf_insns = ((struct bpf_insn *)malloc(((sizeof(struct bpf_insn)) * __pyx_t_1)));

     184:

    +185:         for idx, i in enumerate(instructions):

      __Pyx_INCREF(__pyx_int_0);
      __pyx_t_2 = __pyx_int_0;
      if (likely(PyList_CheckExact(__pyx_v_instructions)) || PyTuple_CheckExact(__pyx_v_instructions)) {
        __pyx_t_3 = __pyx_v_instructions; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
        __pyx_t_4 = NULL;
      } else {
        __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_instructions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_4)) {
          if (likely(PyList_CheckExact(__pyx_t_3))) {
            if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 185, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          } else {
            if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
            #if CYTHON_COMPILING_IN_CPYTHON
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 185, __pyx_L1_error)
            #else
            __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_4(__pyx_t_3);
          if (unlikely(!__pyx_t_5)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 185, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_2);
        __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2);
        __pyx_t_2 = __pyx_t_5;
        __pyx_t_5 = 0;
    /* … */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +186:             stmt = <Statement>i

        __pyx_t_5 = __pyx_v_i;
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_stmt, ((struct __pyx_obj_3bsd_3bpf_Statement *)__pyx_t_5));
        __pyx_t_5 = 0;

    +187:             memcpy(&prog.bf_insns[idx], &stmt.insn, sizeof(defs.bpf_insn))

        __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 187, __pyx_L1_error)
        memcpy((&(__pyx_v_prog.bf_insns[__pyx_t_6])), (&__pyx_v_stmt->insn), (sizeof(struct bpf_insn)));

     188:

    +189:         if ioctl(self.fd.fileno(), defs.BIOCSETF, &prog) != 0:

      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = ((ioctl(__pyx_t_7, BIOCSETF, (&__pyx_v_prog)) != 0) != 0);
      if (__pyx_t_8) {
    /* … */
      }

    +190:             raise OSError(errno, os.strerror(errno))

        __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strerror); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = NULL;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
          }
        }
        if (!__pyx_t_10) {
          __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_3);
        } else {
          __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 190, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
          __Pyx_GIVEREF(__pyx_t_5);
          PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5);
          __pyx_t_5 = 0;
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_2);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
        __pyx_t_2 = 0;
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 190, __pyx_L1_error)

     191:

    +192:     def read(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_17read(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_17read(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("read (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_16read(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_16read(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self) {
      struct __pyx_obj_3bsd_3bpf___pyx_scope_struct__read *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("read", 0);
      __pyx_cur_scope = (struct __pyx_obj_3bsd_3bpf___pyx_scope_struct__read *)__pyx_tp_new_3bsd_3bpf___pyx_scope_struct__read(__pyx_ptype_3bsd_3bpf___pyx_scope_struct__read, __pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_cur_scope);
      __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
      __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
      {
        __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3bsd_3bpf_3BPF_18generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_read, __pyx_n_s_BPF_read); if (unlikely(!gen)) __PYX_ERR(0, 192, __pyx_L1_error)
        __Pyx_DECREF(__pyx_cur_scope);
        __Pyx_RefNannyFinishContext();
        return (PyObject *) gen;
      }

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("bsd.bpf.BPF.read", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_gb_3bsd_3bpf_3BPF_18generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
    {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("None", 0);
      __pyx_L3_first_run:;
      if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 192, __pyx_L1_error)
    /* … */
      /* function exit code */
      PyErr_SetNone(PyExc_StopIteration);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("read", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
      __pyx_generator->resume_label = -1;
      __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     193:         cdef char *ptr

     194:         cdef defs.bpf_xhdr *hdr

     195:         cdef int fd

     196:         cdef int ret

     197:         cdef int bufsize

     198:

    +199:         fd = self.fd.fileno()

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_cur_scope->__pyx_v_fd = __pyx_t_4;

    +200:         bufsize = self.buffer_size

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_buffer_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 200, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_cur_scope->__pyx_v_bufsize = __pyx_t_4;

     201:

    +202:         while True:

      while (1) {

    +203:             ptr = self.buffer

        __pyx_t_5 = __pyx_cur_scope->__pyx_v_self->buffer;
        __pyx_cur_scope->__pyx_v_ptr = __pyx_t_5;

     204:

    +205:             r, w, x = select.select([fd, self.pipe_r], [], [fd])

        __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_select); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_select); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->pipe_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_2);
        PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_6);
        PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_6);
        __pyx_t_2 = 0;
        __pyx_t_6 = 0;
        __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_fd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_2);
        PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_9 = 0;
        if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_9 = 1;
          }
        }
        __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (__pyx_t_2) {
          __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __pyx_t_2 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_8);
        __pyx_t_7 = 0;
        __pyx_t_6 = 0;
        __pyx_t_8 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
          PyObject* sequence = __pyx_t_1;
          #if CYTHON_COMPILING_IN_CPYTHON
          Py_ssize_t size = Py_SIZE(sequence);
          #else
          Py_ssize_t size = PySequence_Size(sequence);
          #endif
          if (unlikely(size != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(0, 205, __pyx_L1_error)
          }
          #if CYTHON_COMPILING_IN_CPYTHON
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
            __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1);
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
          } else {
            __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
            __pyx_t_10 = PyList_GET_ITEM(sequence, 1);
            __pyx_t_8 = PyList_GET_ITEM(sequence, 2);
          }
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_8);
          #else
          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 205, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 205, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 205, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
          index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_3);
          index = 1; __pyx_t_10 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_10);
          index = 2; __pyx_t_8 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 3) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L7_unpacking_done;
          __pyx_L6_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(0, 205, __pyx_L1_error)
          __pyx_L7_unpacking_done:;
        }
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_r);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_r, __pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_w);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_w, __pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_8);
        __pyx_t_8 = 0;

     206:

    +207:             if fd in r:

        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_fd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_cur_scope->__pyx_v_r, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_13 = (__pyx_t_12 != 0);
        if (__pyx_t_13) {
    /* … */
        }

    +208:                 with nogil:

          {
              #ifdef WITH_THREAD
              PyThreadState *_save;
              Py_UNBLOCK_THREADS
              #endif
              /*try:*/ {
    /* … */
              /*finally:*/ {
                /*normal exit:*/{
                  #ifdef WITH_THREAD
                  Py_BLOCK_THREADS
                  #endif
                  goto __pyx_L13;
                }
                __pyx_L13:;
              }
          }

    +209:                     ret = read(fd, self.buffer, bufsize)

                __pyx_cur_scope->__pyx_v_ret = read(__pyx_cur_scope->__pyx_v_fd, __pyx_cur_scope->__pyx_v_self->buffer, __pyx_cur_scope->__pyx_v_bufsize);
              }

     210:

    +211:                 if ret < 0:

          __pyx_t_13 = ((__pyx_cur_scope->__pyx_v_ret < 0) != 0);
          if (__pyx_t_13) {
    /* … */
          }

    +212:                     raise OSError(errno, os.strerror(errno))

            __pyx_t_1 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_strerror); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_10 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 212, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_6 = NULL;
            if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_6)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
              }
            }
            if (!__pyx_t_6) {
              __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_GOTREF(__pyx_t_8);
            } else {
              __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
              __Pyx_GIVEREF(__pyx_t_10);
              PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10);
              __pyx_t_10 = 0;
              __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_1);
            PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_8);
            PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8);
            __pyx_t_1 = 0;
            __pyx_t_8 = 0;
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_OSError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 212, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_Raise(__pyx_t_8, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __PYX_ERR(0, 212, __pyx_L1_error)

     213:

    +214:                 if ret == 0:

          __pyx_t_13 = ((__pyx_cur_scope->__pyx_v_ret == 0) != 0);
          if (__pyx_t_13) {
    /* … */
          }

    +215:                     return

            __Pyx_XDECREF(__pyx_r);
            __pyx_r = NULL;
            goto __pyx_L0;

     216:

    +217:                 while <uintptr_t>ptr < (<uintptr_t>self.buffer + ret):

          while (1) {
            __pyx_t_13 = ((((uintptr_t)__pyx_cur_scope->__pyx_v_ptr) < (((uintptr_t)__pyx_cur_scope->__pyx_v_self->buffer) + __pyx_cur_scope->__pyx_v_ret)) != 0);
            if (!__pyx_t_13) break;

    +218:                     hdr = <defs.bpf_xhdr *>ptr

            __pyx_cur_scope->__pyx_v_hdr = ((struct bpf_xhdr *)__pyx_cur_scope->__pyx_v_ptr);

    +219:                     yield <bytes>ptr[hdr.bh_hdrlen:hdr.bh_hdrlen+hdr.bh_caplen]

            __pyx_t_8 = __Pyx_PyBytes_FromStringAndSize(__pyx_cur_scope->__pyx_v_ptr + __pyx_cur_scope->__pyx_v_hdr->bh_hdrlen, (__pyx_cur_scope->__pyx_v_hdr->bh_hdrlen + __pyx_cur_scope->__pyx_v_hdr->bh_caplen) - __pyx_cur_scope->__pyx_v_hdr->bh_hdrlen); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 219, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_INCREF(((PyObject*)__pyx_t_8));
            __pyx_r = __pyx_t_8;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XGIVEREF(__pyx_r);
            __Pyx_RefNannyFinishContext();
            /* return from generator, yielding value */
            __pyx_generator->resume_label = 1;
            return __pyx_r;
            __pyx_L18_resume_from_yield:;
            if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 219, __pyx_L1_error)

     220:

    +221:                     ptr += defs.BPF_WORDALIGN(hdr.bh_hdrlen+hdr.bh_caplen)

            __pyx_cur_scope->__pyx_v_ptr = (__pyx_cur_scope->__pyx_v_ptr + BPF_WORDALIGN((__pyx_cur_scope->__pyx_v_hdr->bh_hdrlen + __pyx_cur_scope->__pyx_v_hdr->bh_caplen)));
          }

     222:

    +223:             if self.pipe_r in r or fd in x:

        __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->pipe_r); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_cur_scope->__pyx_v_r, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_14 = (__pyx_t_12 != 0);
        if (!__pyx_t_14) {
        } else {
          __pyx_t_13 = __pyx_t_14;
          goto __pyx_L20_bool_binop_done;
        }
        __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_fd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_14 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_cur_scope->__pyx_v_x, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 223, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_12 = (__pyx_t_14 != 0);
        __pyx_t_13 = __pyx_t_12;
        __pyx_L20_bool_binop_done:;
        if (__pyx_t_13) {
    /* … */
        }
      }

    +224:                 os.close(self.pipe_r)

          __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->pipe_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_7 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
            }
          }
          if (!__pyx_t_7) {
            __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_GOTREF(__pyx_t_8);
          } else {
            __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 224, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
            __Pyx_GIVEREF(__pyx_t_3);
            PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_3);
            __pyx_t_3 = 0;
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 224, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    +225:                 os.close(self.pipe_w)

          __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_close); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 225, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->pipe_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = NULL;
          if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
            }
          }
          if (!__pyx_t_3) {
            __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 225, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_GOTREF(__pyx_t_8);
          } else {
            __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
            __Pyx_GIVEREF(__pyx_t_1);
            PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
            __pyx_t_1 = 0;
            __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 225, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    +226:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = NULL;
          goto __pyx_L0;

     227:

    +228:     def write(self, data):

    /* Python wrapper */
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_20write(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
    static PyObject *__pyx_pw_3bsd_3bpf_3BPF_20write(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("write (wrapper)", 0);
      __pyx_r = __pyx_pf_3bsd_3bpf_3BPF_19write(((struct __pyx_obj_3bsd_3bpf_BPF *)__pyx_v_self), ((PyObject *)__pyx_v_data));

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_3bsd_3bpf_3BPF_19write(struct __pyx_obj_3bsd_3bpf_BPF *__pyx_v_self, PyObject *__pyx_v_data) {
      PyObject *__pyx_r = NULL;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("write", 0);
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("bsd.bpf.BPF.write", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +229:         os.write(self.fd.fileno(), data)

      __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->fd, __pyx_n_s_fileno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_6 = 1;
        }
      }
      __pyx_t_5 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__pyx_t_4) {
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_t_2);
      __Pyx_INCREF(__pyx_v_data);
      __Pyx_GIVEREF(__pyx_v_data);
      PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_v_data);
      __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;