def METHOD_NAME(self):
    s = socket.socket(socket.AF_PACKET, self.socket_type, socket.htons(dpkt.ethernet.ETH_TYPE_IP))
    s.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE,
                 struct.pack('%ds' % (len(self.ifname) + 1), bytes(self.ifname, 'utf-8')))
    self.socket = s
    self.set_socket(s)