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:----pTQznPIpj25MBcyfvU1BYWGBxC2iWVWY21ZFaxaXFZ9/i2jON8kv4AOcckcb/7yVjAbWO7jbcx62hrccO0ptpuc65J7g0rJXV8txsLPhzmjsggd0ly2dExT4+PsiA5q4d8SSp+yMT6PPVttASFDP+1sLHfN22Kzb4vchQwxDHbvwT0YrH3WpMcBVU75leLUDA6Yt38VKP4ipTcdIs0khdMq7/epWxg+w3rBbFL479joIshQaXF/I0lMTRMNhaUAY4OrXNUCBjqr/mH8tDgTisOw6w5kyZgKNCusW8IBZb4wk6Wt4XUEOUHG6cv6wBhiHKME9dSHARQoT1H631MytJHkov0GqFgpDukRJv1nlKss0gc+DTvzGbwrJxzWf8mNrJopmtYx1oFLImmPOhGO0A4VxVGQJy/NuJ7Riuhaha7q0yoxIagLf6e/rlZCxk434lEqFAoO8UMQSOhjDb9/ApOVIlu8T/s9rvbQ9QopkmRTU2MSEFko4FuIhW7SW5nL7NPWg39XdwtEJ9p+Za20qdWXOyy1a0TRfGz6E8DGNsxBJgT/I2/UuC0DXgOfHhtT3I0UCXi/TjUmMbSSg6+WR5ehMNeE7liFplyIk793D3jHQSGwClQ6nfCwVo8I37Cm8V1t4oqhgqsjiABujNoV6pIczdh9MLavSeekyF1a54T0=----ATTACHMENT:----NDcyNDk3Njk1NTMyMTY1NiA3MDQzODIwOTU3NzExNzE2IDg0MzMxOTk2ODcwNzk1NzA=