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:----evSDP9TNUXofXBCKKYQZH7gICAQ1EkFE6oHipmVAnyGY1ZqMJftGYlL5xccmTSXfH0zhC1RS3q1yMUPzD56nY7iZDorww8EkliXvdIlOOVb7ILPRXmqs1MbyrQJCC90gYmHxm0d0nr9+DJ9gvidGRGOBLdkyRnDwhpJNpxlE/F+Yc2kD7XVD1lclpL0VC1MFtJe7cr0etMCaOqGtybFT22ruhlUnm9ejdvXT5Ld9yR48L2Qlg4sSg/UD2ANlgwF7ZcotHXaDKoVYEpdgYOPgqBlJABhHm1iuwKZfDWcWRlrUgISvyBy0pyI6U4aUsX2HoodRHjWABrptO6OgB5qzAJGN0+0idC+f2YVsMgwdVNuTOrLqD9p7CJh8McKwlbMUt+/VbjdAQ4qLU2iXvFIvxJn40GtZcVVFvJADDC0+a7V90fMCj4ZeoqzfgGjWHjI4QvX673HiIu/uKQJpIzflEWc7cxq5FqP3S2mmsyzrItZKTckYwZbaVDVcts+ZlKfJC0/tLawRNH+Dvd0w98VDNpULWWTWfX34CEV3uCBL5r1ynaqI2MfI1/LMPdNt83/fh8KlWE3U8ZP8vKrGCendVp3V8Y1jAALtCwlS/lB6GDFY7a731kMqh1emqeWhF1SQOtA4uYR99Uk++iPcW/HP95WYx+ZdWpZQkNguUw95abo=----ATTACHMENT:----NzQxMzQ2NTMwNzAzNzE2MyA2ODYyNTUyMDkyNzc0OTM3IDQ0OTU5ODQ0NzQzNDk1MDQ=