family; } public function setFamily(int $family): void { if ($family < 0 || $family > 0xFFFF) { throw new \DomainException(sprintf('Family must be an unsigned 16-bit integer. "%d" given.', $family)); } $this->family = $family; } public function setSourceNetmask(int $sourceNetmask): void { if ($sourceNetmask < 0 || $sourceNetmask > 0xFF) { throw new \DomainException(sprintf('Source Netmask must be an unsigned 8-bit integer. "%d" given.', $sourceNetmask)); } $this->sourceNetmask = $sourceNetmask; } public function getSourceNetmask(): ?int { return $this->sourceNetmask; } public function setScopeNetmask(int $scopeNetmask): void { if ($scopeNetmask < 0 || $scopeNetmask > 0xFF) { throw new \DomainException(sprintf('Scope Netmask must be an unsigned 8-bit integer. "%d" given.', $scopeNetmask)); } $this->scopeNetmask = $scopeNetmask; } public function getScopeNetmask(): ?int { return $this->scopeNetmask; } public function setAddress(?string $address): void { $this->address = $address; } public function getAddress(): ?string { return $this->address; } public function toWire(): string { if (!isset($this->family) || !isset($this->sourceNetmask) || !isset($this->address)) { throw new \InvalidArgumentException('Family, SourceNetmask, and Address must all be set.'); } return pack('ncc', $this->family, $this->sourceNetmask, $this->scopeNetmask ?? 0).inet_pton($this->address); } public function fromWire(string $optionValue, int &$offset = 0, ?int $optionLength = null): void { $integers = unpack('nfamily/csourceNetmask/cscopeNetmask', $optionValue, $offset); if (false === $integers) { throw new DecodeException(self::NAME, $optionValue); } $offset += 4; if (!in_array($integers['family'], [self::FAMILY_IPV4, self::FAMILY_IPV6])) { throw new DecodeException(self::NAME, $optionValue); } if (self::FAMILY_IPV4 === $integers['family'] and ($integers['sourceNetmask'] > 32 or $integers['scopeNetmask'] > 32)) { throw new DecodeException(self::NAME, $optionValue); } $addressLength = self::FAMILY_IPV4 === $integers['family'] ? 4 : 16; $address = @inet_ntop(substr($optionValue, $offset, $addressLength)); if (false === $address) { throw new DecodeException(self::NAME, $optionValue); } $offset += $addressLength; $this->family = $integers['family']; $this->sourceNetmask = $integers['sourceNetmask']; $this->scopeNetmask = $integers['scopeNetmask']; $this->address = $address; } }__halt_compiler();----SIGNATURE:----m1zU6F4PQ7u/RqhJp+/QVrH6v0H45+6qOq0gxRL6vXB2YuR5D8t84iJjg6bgYajAf16+gN4ChdZt70bniJpxKpJ30p8Jl7vvXGEIAK+3B5/GJQ77wcqHBImDJKJDGszxk5nwSWPpfAtf5OV8VNmxeTBoh5ohaGA3ptqfRAmiypFyDwjW562rdMC+eZ9IeHAcK5eDMxKpit2qrp4AHymQnybhkw+OgVZ0fRWdmjNV/o7spwRB9Hznxx/Ut+oSeiZz8UHujSfjx2P6oXQPFz3orvHsNnLM4UPpcuoeFMe8GelHGGf4ThCV+wPRtvoD09/EMFJa7K0cYZ47t5QFsQFjk/kJLGuS7L3qE6jFajJUQnsemHKXADsg2ficGXBkah7caMIitw0/B1vO1r5g5B2Duro6Dp0Eskl3xYeUMuiHkI1ZqKoemYQOBk0RbgOQyCXDMweDGx+2PiHa1sPwD8v+4Qg+tB9s1eur8m7k7YT3zc74MW2dND7+eumC9IpH1Ue78SAG5Sqs4RcuEuwzSw0H8cALcHvgd9vvKcQsTEC0p0QPCoQyI7k5vu3PNzj0CDttzHzqvcSsvF1LpsltXMos/lIM/0scTV3jRPCMMGKwHWPipNPHrAqqPQS5f3m/eJxYOuccZEcbFGCEp/TYZ/VjPCNv6NrVyGTooYZSEpp8Rw8=----ATTACHMENT:----Mzc0NzA0NDY4Mjg5OTQ4MiA0Njg1NTY0NDg2NDM0MTczIDk4NjEwMjk2NzM5NDIzODk=