From owner-freebsd-questions@FreeBSD.ORG Thu Jun 22 13:54:11 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 A741F16A47A for ; Thu, 22 Jun 2006 13:54:11 +0000 (UTC) (envelope-from valerio.daelli@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id C60794465C for ; Thu, 22 Jun 2006 13:54:10 +0000 (GMT) (envelope-from valerio.daelli@gmail.com) Received: by nf-out-0910.google.com with SMTP id x30so258641nfb for ; Thu, 22 Jun 2006 06:54:09 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=P4ChEtG87eZijGE05oIPHmZE83OvbFXBAVVsksiDFFX90IBkmdiSNTZ5KLAGysmaIJMKs4bwi5oVyGvp26bd/gtfWCkekO+Bf/qnuHV6y/EuhkZARAcHnUjO7C61B38je3ymWJeKzdMMs6ucur84LRPZH6uvp1WaPoXQONtsp0E= Received: by 10.49.91.12 with SMTP id t12mr1434219nfl; Thu, 22 Jun 2006 06:54:08 -0700 (PDT) Received: by 10.49.33.13 with HTTP; Thu, 22 Jun 2006 06:54:08 -0700 (PDT) Message-ID: <27dbfc8c0606220654y65fd76ectf3191dc7b935465@mail.gmail.com> Date: Thu, 22 Jun 2006 15:54:08 +0200 From: "Valerio daelli" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Error in man page of sendmsg? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2006 13:54:11 -0000 Hi working with InterMapper (a network tool) on FreeBSD 5.4 I got a sendmsg -1 errno 22 Invalid argument I looked in man sendmsg in the errors but I found no EINVAL in the errors. So I looked at the kernel sources and I found ---------------------------------------------------------------------------------------------------------- static int sendit(td, s, mp, flags) register struct thread *td; int s; register struct msghdr *mp; int flags; { struct mbuf *control; struct sockaddr *to; int error; if (mp->msg_name != NULL) { error = getsockaddr(&to, mp->msg_name, mp->msg_namelen); if (error) { to = NULL; goto bad; } mp->msg_name = to; } else { to = NULL; } if (mp->msg_control) { if (mp->msg_controllen < sizeof(struct cmsghdr) #ifdef COMPAT_OLDSOCK && mp->msg_flags != MSG_COMPAT #endif ) { error = EINVAL; ---------------------------------------------------------------------------------------------------------- that error is set to EINVAL so the man page should report EINVAL as possible error in this funcion. Bye Valerio Daelli