Skip to content

Commit 4e87e56

Browse files
devnexennikic
authored andcommitted
Adding bunch of FreeBSD socket options flags specifics.
SO_USER_COOKIE primarly to be traced via dtrace instrumentation. If SO_USER_COOKIE is available, the rest is so the former is two years old while the rest is from around 2008.
1 parent 120137c commit 4e87e56

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

UPGRADING

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,14 @@ PHP 7.4 UPGRADE NOTES
256256
. MB_ONIGURUMA_VERSION specifies the version of the oniguruma library against
257257
which mbregex has been built.
258258

259+
- Socket:
260+
. Added FreeBSD-specific socket options:
261+
. SO_LABEL
262+
. SO_PEERLABEL
263+
. SO_LISTENQLIMIT
264+
. SO_LISTENQLEN
265+
. SO_USER_COOKIE
266+
259267
- Tidy:
260268
. TIDY_TAG_ARTICLE
261269
. TIDY_TAG_ASIDE

ext/sockets/sockets.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,13 @@ static PHP_MINIT_FUNCTION(sockets)
781781
REGISTER_LONG_CONSTANT("SO_ERROR", SO_ERROR, CONST_CS | CONST_PERSISTENT);
782782
#ifdef SO_BINDTODEVICE
783783
REGISTER_LONG_CONSTANT("SO_BINDTODEVICE", SO_BINDTODEVICE, CONST_CS | CONST_PERSISTENT);
784+
#endif
785+
#ifdef SO_USER_COOKIE
786+
REGISTER_LONG_CONSTANT("SO_LABEL", SO_LABEL, CONST_CS | CONST_PERSISTENT);
787+
REGISTER_LONG_CONSTANT("SO_PEERLABEL", SO_PEERLABEL, CONST_CS | CONST_PERSISTENT);
788+
REGISTER_LONG_CONSTANT("SO_LISTENQLIMIT", SO_LISTENQLIMIT, CONST_CS | CONST_PERSISTENT);
789+
REGISTER_LONG_CONSTANT("SO_LISTENQLEN", SO_LISTENQLEN, CONST_CS | CONST_PERSISTENT);
790+
REGISTER_LONG_CONSTANT("SO_USER_COOKIE", SO_USER_COOKIE, CONST_CS | CONST_PERSISTENT);
784791
#endif
785792
REGISTER_LONG_CONSTANT("SOL_SOCKET", SOL_SOCKET, CONST_CS | CONST_PERSISTENT);
786793
REGISTER_LONG_CONSTANT("SOMAXCONN", SOMAXCONN, CONST_CS | CONST_PERSISTENT);

0 commit comments

Comments
 (0)