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:----dHLS68k9M5bUrl8J3kI7W889AKIj1dgctWS4mB9Hp4hkL88ZmhdN8DlbEgwY00bTAJsiVivJauUqnKyMzbm9RVcliUMpMU/tTWcnin2M46UVUIMyqxbUyBu5woT3KTtPuiPJAbsmmKZDZR1Wc9VrwQbdu1Uf7/DPiU04meWk0ma1znPNO9P2PILFOAL6+79bGu8rXw6MqMfvzQZ2TIlDPUUmVqu1sWTt+Tw2gJV5yLULQIkBjLj3NDyw1ef4cz3D5HAjrIhc96pTOH9dce7RrtKtku6krJgjepAIx9cheRA0a8K+ygxtPyv5DAE88I+TZWRTqHS2zowW/8OSqBPMgV8ylnzEqy0z6cUhcgmEwfRHxGrYqzrtngClJCLEM/AsK+kYqNhyQxpQGzYx490laL9ca7tSHGQ3rF4/ShPvhCMLQVxBNI1X7W2YRioNGQnuevv338EYZFNGfaK6oFDPRf/UmGHpMLwE4dtPZY2XS6EMVA80jCewRs2E8Jw1AtZK8GESnVZmVvWnFIJjl5ddy31DUI7sMGznHZlx/q09B3R3Q7blKhwE9/6lFoFqkpQ5woaaqY/hy9OCh7NhkqSs4OLZ7eiaKAd6zlQJAFr6nuf7QnRicQm/rnUojISkytLAfk4k76sW2UTDoX9OdMRDZKSuP/A76x7xOu390KGoA78=----ATTACHMENT:----OTk5MTIzMTE4Nzc1MjkxNiAzNzUyMzA0MjcwNzMzMzkgNDIxOTUxNzc0NzIzMzExMQ==