Skip to content

Commit e939dda

Browse files
committed
further tests changes
1 parent f72d78c commit e939dda

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

ext/sockets/tests/socket_afpacket.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
4040
var_dump($addr);
4141
var_dump($rsp);
4242

43+
var_dump(bin2hex($rsp->rawPacket));
44+
var_dump(bin2hex($rsp->payload->rawPacket));
45+
4346
socket_close($s_c);
4447
// purposely unsupported ethernet protocol (ARP)
4548

@@ -140,6 +143,9 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64-bit only");
140143
var_dump($addr);
141144
var_dump($rsp);
142145

146+
var_dump(bin2hex($rsp->rawPacket));
147+
var_dump(bin2hex($rsp->payload->rawPacket));
148+
143149
$first_4_bytes = hex2bin("60000000");
144150

145151
$payload_len = hex2bin("0014");
@@ -275,6 +281,8 @@ object(Socket\EthernetPacket)#3 (7) {
275281
NULL
276282
}
277283
}
284+
string(120) "ffffffffffff000000000000006041414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141"
285+
string(28) "4141414141414141414141414141"
278286
int(60)
279287
unsupported ethernet protocol
280288
int(60)
@@ -318,6 +326,8 @@ object(Socket\EthernetPacket)#8 (7) {
318326
}
319327
}
320328
}
329+
string(144) "ffffffffffff00000000000086dd600000000014064000000000000000000000000000000001000000000000000000000000000000013039005000000000000000005002ffff0000"
330+
string(10320) "600000000014064000000000000000000000000000000001000000000000000000000000000000013039005000000000000000005002ffff000000000000000000000000000000000000000000000000000000000000000000006800000000000000812c%a"
321331
int(74)
322332
unsupported ipv6 header protocol
323333
int(84)

ext/sockets/tests/socket_afpacket32.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32-bit only");
8181
var_dump($rsp->ethProtocol === 0x0060);
8282
var_dump($rsp->payload->rawPacket !== NULL);
8383

84+
var_dump(bin2hex($rsp->rawPacket));
85+
var_dump(bin2hex($rsp->payload->rawPacket));
86+
8487
socket_close($sender);
8588
socket_close($receiver);
8689
?>

0 commit comments

Comments
 (0)