punchnet-macos/Tun/Arp/ArpSnapshot.swift
2026-05-21 14:39:41 +08:00

25 lines
415 B
Swift

//
// ArpSnapshot.swift
// Tun
//
// Created by Codex on 2026/5/20.
//
import Foundation
final class ArpSnapshot: Snapshot {
private let entries: [UInt32: Data]
init(entries: [UInt32: Data]) {
self.entries = entries
}
func lookup(_ ip: UInt32) -> Data? {
return self.entries[ip]
}
static func empty() -> ArpSnapshot {
return ArpSnapshot(entries: [:])
}
}