Date: Sun, 19 Oct 1997 14:32:34 -0400 From: "Gregory D Moncreaff" <moncrg@ma.ultranet.com> To: "Hackers FreeBSD" <hackers@freebsd.org>, "Terry Lambert" <tlambert@primenet.com> Subject: Re: [Q] Is recvmsg for ancillary (control) data part of protocol or generic sockets? Message-ID: <01bcdcbd$5e351cc0$a8647392@moncrg>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_0103_01BCDC9B.D7237CC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit -----Original Message----- From: Terry Lambert <tlambert@primenet.com> To: Gregory D Moncreaff <moncrg@ma.ultranet.com> Cc: hackers@FreeBSD.ORG <hackers@FreeBSD.ORG> Date: Friday, October 17, 1997 4:00 PM Subject: Re: [Q] Is recvmsg for ancillary (control) data part of protocol or generic sockets? >> was looking at design and implementation 4.4 and >> there was a PRU_RECV, PRU_RECVOOB but no >> PRU_RECVCTL. >> >> just wondering how the control data gets from the >> protocol to the user.... > >man recvmsg. > >The control and data parts are retrieved simultaneously. > > > Terry Lambert > terry@lambert.org >--- >Any opinions in this posting are my own and not those of my present >or previous employers. > I eventually found the code in kern/uipc_socket.c:soreceive() There seems to be a problem with connection oriented protocols getting disconnect data since soreceive checks PR_CONNREQUIRED and aborts before checking to see if control data is present. Is this by accident or design? PR_CONNREQUIRED is only supposed to gate send according to sys/protosw.h... if (m == 0 || (( ..... ..... if ((so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING)) == 0 && (so->so_proto->pr_flags & PR_CONNREQUIRED)) { error = ENOTCONN; goto release; ..... while (m && m->m_type == MT_CONTROL && error == 0) { if (flags & MSG_PEEK) { if (controlp) *controlp = m_copy(m, 0, m->m_len); m = m->m_next; ..... release: sbunlock(&so->so_rcv); splx(s); return (error); ===================================================================== Gregory D. Moncreaff Phone 1-508-490-2048 Raytheon Electronic Systems Fax 1-508-490-2086 Gregory_D_Moncreaff@res.raytheon.com Home moncrg@ma.ultranet.com --------------------------------------------------------------------- ------=_NextPart_000_0103_01BCDC9B.D7237CC0 Content-Type: text/x-vcard; name="Gregory Donald Moncreaff.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Gregory Donald Moncreaff.vcf" BEGIN:VCARD N:Moncreaff;Gregory;Donald FN:Gregory Donald Moncreaff EMAIL;PREF;INTERNET:moncrg@ma.ultranet.com END:VCARD ------=_NextPart_000_0103_01BCDC9B.D7237CC0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01bcdcbd$5e351cc0$a8647392>