Skip to content

Commit b0e7f95

Browse files
committed
additional constants
1 parent 76e40d1 commit b0e7f95

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

ext/sockets/sockets.stub.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,6 +2029,20 @@
20292029
*/
20302030
const ETH_FRAME_LEN = UNKNOWN;
20312031
#endif
2032+
#if defined(ETH_ALEN)
2033+
/**
2034+
* @var int
2035+
* @cvalue ETH_ALEN
2036+
*/
2037+
const ETH_ALEN = UNKNOWN;
2038+
#endif
2039+
#if defined(ETH_HLEN)
2040+
/**
2041+
* @var int
2042+
* @cvalue ETH_HLEN
2043+
*/
2044+
const ETH_HLEN = UNKNOWN;
2045+
#endif
20322046

20332047
#ifdef UDP_SEGMENT
20342048
/**

ext/sockets/sockets_arginfo.h

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/sockets/tests/socket_afpacket_error.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ if (PHP_INT_SIZE != 8) {
147147
var_dump(socket_sendto($s_s, $buf, strlen($buf), 0, "lo", 1));
148148
var_dump(socket_recvfrom($s_c, $rsp, strlen($buf), 0, $addr));
149149

150+
var_dump($rsp->headerSize == ETH_HLEN);
150151
var_dump($rsp->ethProtocol == ETH_P_IPV6);
151152
var_dump(filter_var($rsp->payload->srcAddr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== null);
152153

@@ -275,6 +276,7 @@ int(%d)
275276
int(%d)
276277
bool(true)
277278
bool(true)
279+
bool(true)
278280
int(%d)
279281
int(%d)
280282
bool(true)

0 commit comments

Comments
 (0)