Skip to content

Commit c0954ae

Browse files
authored
socket_get_option/socket_set_option SO_ACCEPTFILTER constants
Co-authored-by: Sergey Panteleev <[email protected]> Closes GH-656.
1 parent ea8a344 commit c0954ae

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

reference/sockets/constants.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,39 @@
347347
</simpara>
348348
</listitem>
349349
</varlistentry>
350+
<varlistentry xml:id="constant.so-mark">
351+
<term>
352+
<constant>SO_MARK</constant>
353+
(<type>int</type>)
354+
</term>
355+
<listitem>
356+
<simpara>
357+
Available as of PHP 8.1.0
358+
</simpara>
359+
</listitem>
360+
</varlistentry>
361+
<varlistentry xml:id="constant.so-user-cookie">
362+
<term>
363+
<constant>SO_USER_COOKIE</constant>
364+
(<type>int</type>)
365+
</term>
366+
<listitem>
367+
<simpara>
368+
Available as of PHP 8.1.0
369+
</simpara>
370+
</listitem>
371+
</varlistentry>
372+
<varlistentry xml:id="constant.so-acceptfilter">
373+
<term>
374+
<constant>SO_ACCEPTFILTER</constant>
375+
(<type>string</type>)
376+
</term>
377+
<listitem>
378+
<simpara>
379+
Available as of PHP 8.1.0
380+
</simpara>
381+
</listitem>
382+
</varlistentry>
350383
<varlistentry xml:id="constant.sol-socket">
351384
<term>
352385
<constant>SOL_SOCKET</constant>

reference/sockets/functions/socket-get-option.xml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,37 @@
402402
<type>int</type> between -1 and 255.
403403
</entry>
404404
</row>
405+
<row>
406+
<entry><constant>SO_MARK</constant></entry>
407+
<entry>
408+
Sets an identifier on the socket for packet filtering
409+
purpose on Linux.
410+
</entry>
411+
<entry>
412+
<type>int</type>
413+
</entry>
414+
</row>
415+
<row>
416+
<entry><constant>SO_ACCEPTFILTER</constant></entry>
417+
<entry>
418+
Adds an accept filter on the listened socket (FreeBSD/NetBSD).
419+
An accept filter kernel module needs to be loaded beforehand
420+
on FreeBSD (e.g. accf_http).
421+
</entry>
422+
<entry>
423+
<type>string</type> name of the filter (length 15 max).
424+
</entry>
425+
</row>
426+
<row>
427+
<entry><constant>SO_USER_COOKIE</constant></entry>
428+
<entry>
429+
Sets an identifier on the socket for packet filtering
430+
purpose on FreeBSD.
431+
</entry>
432+
<entry>
433+
<type>int</type>
434+
</entry>
435+
</row>
405436
</tbody>
406437
</tgroup>
407438
</table>
@@ -414,7 +445,7 @@
414445
<refsect1 role="returnvalues">
415446
&reftitle.returnvalues;
416447
<para>
417-
Returns the value of the given option, or &false; on errors.
448+
Returns the value of the given option, &return.falseforfailure;.
418449
</para>
419450
</refsect1>
420451

0 commit comments

Comments
 (0)