<commit_before>local arp = require "proto.arp"
local arpThread = require "threads.arp"

local dependency = {}

function dependency.env(env)
	function env.arp(ip, fallback, timeout)
		return { "arp", ip, fallback, timeout or 5, arpThread.counter }
	end
end

local function macString(addr)
	if type(addr) == "number" then
		local mac = require("ffi").new("union mac_address")
		mac:set(addr)
		return mac:getString()
	elseif type(addr) == "cdata" then
		return addr:getString()
	end

	return addr
end

-- luacheck: globals ipString
function ipString(addr)
	if type(addr) == "number" then
		addr = ip4ToString(addr) -- luacheck: read globals ip4ToString
	elseif type(addr) == "cdata" then<commit_msg>Remove unnecessary reference to ARP thread.<commit_after>local arp = require "proto.arp"

local dependency = {}

function dependency.env(env)
	function env.arp(ip, fallback, timeout)
		return { "arp", ip, fallback, timeout or 5 }
	end
end

local function macString(addr)
	if type(addr) == "number" then
		local mac = require("ffi").new("union mac_address")
		mac:set(addr)
		return mac:getString()
	elseif type(addr) == "cdata" then
		return addr:getString()
	end

	return addr
end

-- luacheck: globals ipString
function ipString(addr)
	if type(addr) == "number" then
		addr = ip4ToString(addr) -- luacheck: read globals ip4ToString
	elseif type(addr) == "cdata" then
{'fraction_non_alphanumeric': 0.12380952380952381, 'fraction_numerical': 0.004395604395604396, 'mean_word_length': 4.8626609442060085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '337531', 'n_tokens_mistral': 469, 'n_tokens_neox': 456, 'n_words': 137}