Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101700 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74557 invoked from network); 26 Jan 2018 19:33:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jan 2018 19:33:53 -0000 Authentication-Results: pb1.pair.com header.from=samding@ca.ibm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=samding@ca.ibm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ca.ibm.com designates 148.163.158.5 as permitted sender) X-PHP-List-Original-Sender: samding@ca.ibm.com X-Host-Fingerprint: 148.163.158.5 mx0b-001b2d01.pphosted.com Received: from [148.163.158.5] ([148.163.158.5:40858] helo=mx0a-001b2d01.pphosted.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/06-35287-D928B6A5 for ; Fri, 26 Jan 2018 14:33:52 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w0QJV2K6003774 for ; Fri, 26 Jan 2018 14:33:47 -0500 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.90]) by mx0b-001b2d01.pphosted.com with ESMTP id 2fr6s3h1h1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 26 Jan 2018 14:33:46 -0500 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Fri, 26 Jan 2018 19:33:45 -0000 Received: from us1a3-smtp01.a3.dal06.isc4sb.com (10.106.154.95) by smtp.notes.na.collabserv.com (10.106.227.141) with smtp.notes.na.collabserv.com ESMTP; Fri, 26 Jan 2018 19:33:41 -0000 Received: from us1a3-mail101.a3.dal06.isc4sb.com ([10.146.21.220]) by us1a3-smtp01.a3.dal06.isc4sb.com with ESMTP id 2018012619334065-882843 ; Fri, 26 Jan 2018 19:33:40 +0000 MIME-Version: 1.0 In-Reply-To: To: Kalle Sommer Nielsen Cc: PHP internals , kalle.php@gmail.com Date: Fri, 26 Jan 2018 14:33:41 -0500 References: X-KeepSent: B603EAFE:D85D45E2-00258221:00699635; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP7 August 18, 2016 X-LLNOutbound: False X-Disclaimed: 5363 X-TNEFEvaluated: 1 Content-type: multipart/alternative; Boundary="0__=8FBB08B2DFFA10A58f9e8a93df938690918c8FBB08B2DFFA10A5" Content-Disposition: inline x-cbid: 18012619-9717-0000-0000-000005AE72E2 X-IBM-SpamModules-Scores: BY=0.259803; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.4332; ST=0; TS=0; UL=0; ISC=; MB=0.010837 X-IBM-SpamModules-Versions: BY=3.00008433; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000248; SDB=6.00980756; UDB=6.00497207; IPR=6.00760058; BA=6.00005797; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019231; XFM=3.00000015; UTC=2018-01-26 19:33:44 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2018-01-26 15:57:01 - 6.00007965 x-cbparentid: 18012619-9718-0000-0000-0000BA38980F Message-ID: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-26_10:,, signatures=0 X-Proofpoint-Spam-Reason: safe Subject: Re: [PHP-DEV] return values of socket_recvmsg From: samding@ca.ibm.com ("Sam Ding") --0__=8FBB08B2DFFA10A58f9e8a93df938690918c8FBB08B2DFFA10A5 Content-Transfer-Encoding: quoted-printable Content-type: text/plain; charset=US-ASCII The return data in PHP is "$data" which is an array with 4 elements, does it match to "zmsg" inside of c function "socket=5Frecvmsg"(/home/work/php/php/ext/sockets/sendrecvmsg.c:214)? Here zmsg is struct with: (gdb) ptype zmsg type =3D struct =5Fzval=5Fstruct { zend=5Fvalue value; union { struct {...} v; uint32=5Ft type=5Finfo; } u1; union { uint32=5Ft next; uint32=5Ft cache=5Fslot; uint32=5Ft lineno; uint32=5Ft num=5Fargs; uint32=5Ft fe=5Fpos; uint32=5Ft fe=5Fiter=5Fidx; uint32=5Ft access=5Fflags; uint32=5Ft property=5Fguard; uint32=5Ft extra; } u2; } * How do these two variables match between php and C? Thanks, Sam Sam Ding/Toronto/IBM wrote on 01/26/2018 09:36:00 AM: > From: Sam Ding/Toronto/IBM > To: Kalle Sommer Nielsen > Cc: PHP internals , kalle.php@gmail.com > Date: 01/26/2018 09:36 AM > Subject: Re: [PHP-DEV] return values of socket=5Frecvmsg > > Thank Kalle, > > I knew the implementaion of socket=5Frecvmsg(), but want to know the > return data structure. > The test on Big=5Fendian (s390x) got a little different return result > than on x86=5F64, try to dig out > where the problem is. > > Thanks, > > Sam > > > kalle.php@gmail.com wrote on 01/26/2018 01:58:23 AM: > > > From: Kalle Sommer Nielsen > > To: Sam Ding > > Cc: PHP internals > > Date: 01/26/2018 01:58 AM > > Subject: Re: [PHP-DEV] return values of socket=5Frecvmsg > > Sent by: kalle.php@gmail.com > > > > Hi Sam > > > > 2018-01-25 23:11 GMT+01:00 Sam Ding : > > > > > > The test case ext/sockets/tests/socket=5Frecvmsg.php has following output > > > on x86=5F64: > > > > > > =3D=3D=3D=3D=3D=3D=3D > > > ... > > > 1 Array > > > 2 ( > > > 3 [name] =3D> Array > > > 4 ( > > > 5 [family] =3D> 10 > > > 6 [addr] =3D> ::1 > > > 7 [port] =3D> 7001 > > > 8 [flowinfo] =3D> 0 > > > 9 [scope=5Fid] =3D> 0 > > > 10 ) > > > 11 > > > 12 [control] =3D> Array > > > 13 ( > > > 14 [0] =3D> Array > > > 15 ( > > > 16 [level] =3D> 41 > > > 17 [type] =3D> 50 > > > 18 [data] =3D> Array > > > 19 ( > > > 20 [addr] =3D> ::1 > > > 21 [ifindex] =3D> 1 > > > 22 ) > > > 23 ) > > > 24 ) > > > ... > > > =3D=3D=3D=3D=3D=3D=3D > > > This is output by c > > > function:"socket=5Frecvmsg"(/home/work/php/php/ext/sockets/ > sendrecvmsg.c:214), > > > > You can find the implementation of socket=5Frecvmsg() in the ext/sockets > > directory here: > > https://urldefense.proofpoint.com/v2/url? > > > u=3Dhttp-3A=5F=5Fgit.php.net=5F-3Fp-3Dphp-2Dsrc.git-3Ba-3Dblob-3Bf-3Dext=5F= sockets=5Fsendrecvmsg.c-3Bh-3D7b9c4e8ad357b73b514dc5feb8dc8d9ca215126b-3Bhb= -3DHEAD-23l210&d=3DDwIBaQ&c=3Djf=5FiaSHvJObTbx- > > siA1ZOg&r=3DCBZ1IFMUPf-s4Wt- > > > elABGKFWisr3DNfFfWYNaKkXXUE&m=3Df8KTE9WyceLmQxKXG77FBkDIVqCnJ54BBnXEQuSQCo4= &s=3DGOFChuk86IBBBORDL3I50gHrzmF4kTmYkq1qCeMufBQ&e=3D > > > > > > > > -- > > regards, > > > > Kalle Sommer Nielsen > > kalle@php.net > > --0__=8FBB08B2DFFA10A58f9e8a93df938690918c8FBB08B2DFFA10A5--