All-optical label scraping employing optical logic gates in network nodes