# [PATCH] Resend with modifications: inet_getaddrfam()

- Thread: https://externals.io/message/14312
- Original archive: https://news-web.php.net/php.internals/14312
- Started by nicobn@gmail.com on 2005-01-08T05:45:35+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14312 — nicobn@gmail.com — 2005-01-08T05:45:35+00:00

URL: https://externals.io/message/14312#14312

Hi,

This patch adds a function for getting the family of the address in
$Address. If $Address is not of any family, false is returned. I,
myself, need this function to verify that an ip provided by an user is
a real ip. Then, to use this address with, in exemple, `socket_create()`
and later bind it, I need to know the address family of the address so
it is very useful.

Please comment my patch and, if there are no objections, commit it ;-).

Thank you for your time,
Nic.

---

## #14314 — Derick Rethans — 2005-01-08T11:40:42+00:00

URL: https://externals.io/message/14312#14314 · In reply to: #14312

> Hi,
>
> This patch adds a function for getting the family of the address in
> $Address. If $Address is not of any family, false is returned. I,
> myself, need this function to verify that an ip provided by an user is
> a real ip. Then, to use this address with, in exemple, `socket_create()`
> and later bind it, I need to know the address family of the address so
> it is very useful.
>
> Please comment my patch and, if there are no objections, commit it ;-).

Please provide a link to your patch, the MLM only wants text/plain
attachments and it strips others.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #14315 — nicobn@gmail.com — 2005-01-08T17:39:30+00:00

URL: https://externals.io/message/14312#14315

http://www.lapsus-engineer.org/patches/php_inetgetaddrfam.diff

Thank you,
Nic.


> 
>
> > […]
>
> Please provide a link to your patch, the MLM only wants text/plain
> attachments and it strips others.
>
> Derick
>
> --
> Derick Rethans
> http://derickrethans.nl | http://ez.no | http://xdebug.org
