From owner-freebsd-questions Wed Aug 21 13: 0:32 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD85F37B400 for ; Wed, 21 Aug 2002 13:00:25 -0700 (PDT) Received: from mail2.hd.intel.com (hdfdns02.hd.intel.com [192.52.58.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1723343E8A for ; Wed, 21 Aug 2002 13:00:25 -0700 (PDT) (envelope-from pavan.balaji@intel.com) Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by mail2.hd.intel.com (8.11.6/8.11.6/d: solo.mc,v 1.42 2002/05/23 22:21:11 root Exp $) with SMTP id g7LJk1O06961 for ; Wed, 21 Aug 2002 19:46:01 GMT Received: from fmsmsx26.fm.intel.com ([132.233.42.26]) by fmsmsxvs041.fm.intel.com (NAVGW 2.5.2.11) with SMTP id M2002082112451719015 ; Wed, 21 Aug 2002 12:45:17 -0700 Received: by fmsmsx26.fm.intel.com with Internet Mail Service (5.5.2653.19) id ; Wed, 21 Aug 2002 12:45:59 -0700 Message-ID: <3D386AED1B47D411A94300508B11F18704AD69C0@fmsmsx116.fm.intel.com> From: "Balaji, Pavan" To: "'Gianmarco Giovannelli'" , questions@FreeBSD.ORG Subject: RE: Porting from win32 to UNIX: Sockets Date: Wed, 21 Aug 2002 12:45:56 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The error code for "wouldblock" is EWOULDBLOCK and that of "connreset" is ECONNRESET. See /usr/include/sys/errno.h for all the error codes. Pavan Balaji, Intel Corporation Email: pavan.balaji@intel.com "Only the Paranoid Survive" -- Andy Grove > -----Original Message----- > From: Gianmarco Giovannelli [mailto:gmarco@giovannelli.it] > Sent: Wednesday, August 21, 2002 1:44 PM > To: questions@FreeBSD.ORG > Subject: Porting from win32 to UNIX: Sockets > > > Hi a friend of mine involved in a porting project. > He has asking me something about socket and more I am not > able to answer :-) > > Thanks for your attention... > > --- begin --- > > [...] > that are familiar with "low-level-TCP/IP" coding. > plz help > > following problem: > I don't know how to get an errorcode in case of > socket-operation failed > (send/recv) > in windows it goes like this > > e.g > res = send(....); > if (res==SOCKET_ERROR) > { > err = WSAGetLastError(); > if (err==....) ...; > } > > but how to do this in linux/UNIX/BSD ? > what's the equivalent of WSAGetLastError ? > > furthermore I need to know the errorcodes of > "wouldblock" and "connreset" > > > --- end --- > > Best Regards, > Gianmarco Giovannelli , "Unix expert since yesterday" > http://www.gufi.org/~gmarco > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message