From owner-freebsd-hackers Sun Oct 19 12:34:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA27734 for hackers-outgoing; Sun, 19 Oct 1997 12:34:39 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from cleopatra.ultra.net (cleopatra.ultra.net [199.232.56.35]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA27727 for ; Sun, 19 Oct 1997 12:34:33 -0700 (PDT) (envelope-from moncrg@ma.ultranet.com) Received: from moncrg (d8.dial-17.mbo.ma.ultra.net [146.115.100.168]) by cleopatra.ultra.net (8.8.5/ult1.05) with SMTP id PAA11843; Sun, 19 Oct 1997 15:34:19 -0400 (EDT) From: "Gregory D Moncreaff" To: "Hackers FreeBSD" , "Terry Lambert" Subject: Re: [Q] Is recvmsg for ancillary (control) data part of protocol or generic sockets? Date: Sun, 19 Oct 1997 14:32:34 -0400 Message-ID: <01bcdcbd$5e351cc0$a8647392@moncrg> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0103_01BCDC9B.D7237CC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 To: Gregory D Moncreaff Cc: 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--