From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 27 18:42:43 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08DFE16A417 for ; Tue, 27 Nov 2007 18:42:43 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id B3FFD13C4CC for ; Tue, 27 Nov 2007 18:42:42 +0000 (UTC) (envelope-from thierry.herbelot@laposte.net) Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30]) by postfix1-g20.free.fr (Postfix) with ESMTP id 71A4B1ED6510 for ; Tue, 27 Nov 2007 19:17:16 +0100 (CET) Received: from smtp4-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp4-g19.free.fr (Postfix) with ESMTP id 4AB303EA133 for ; Tue, 27 Nov 2007 19:17:14 +0100 (CET) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp4-g19.free.fr (Postfix) with ESMTP id BC93A3EA0ED for ; Tue, 27 Nov 2007 19:17:13 +0100 (CET) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by mail.herbelot.nom (8.14.0/8.14.0) with ESMTP id lARIHBqx027519; Tue, 27 Nov 2007 19:17:11 +0100 (CET) From: Thierry Herbelot To: freebsd-hackers@freebsd.org Date: Tue, 27 Nov 2007 19:17:03 +0100 User-Agent: KMail/1.9.7 References: <360166.14926.qm@web45613.mail.sp1.yahoo.com> In-Reply-To: <360166.14926.qm@web45613.mail.sp1.yahoo.com> X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200711271917.05085.thierry.herbelot@laposte.net> Cc: sourav das Subject: Re: how to write a raw socket server using UDP X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2007 18:42:43 -0000 Le Tuesday 27 November 2007, sourav das a écrit : > hello all, > > i m a new comer. i wrote a raw socket client > using setsockopt (sock, IPPROTO_IP. IPHDRINCL, ....)using UDP. ihave > followed MS_Press network programming . it is showing 19 bytes sent is this the best reference you found ? a better text is "Unix network programming" by Stevens. the canonical program using raw socket is ping, and you can find its source in the FreeBSD src tree Happy reading TfH