From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 27 17:14:41 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 9D8BB16A419 for ; Tue, 27 Nov 2007 17:14:41 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5245C13C4D5 for ; Tue, 27 Nov 2007 17:14:41 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ix3ku-0008Dx-BT for freebsd-hackers@freebsd.org; Tue, 27 Nov 2007 16:57:52 +0000 Received: from 78-1-106-178.adsl.net.t-com.hr ([78.1.106.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Nov 2007 16:57:52 +0000 Received: from ivoras by 78-1-106-178.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 27 Nov 2007 16:57:52 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Tue, 27 Nov 2007 17:57:33 +0100 Lines: 38 Message-ID: References: <360166.14926.qm@web45613.mail.sp1.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBBDAF8DD61680DA34176191A" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 78-1-106-178.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <360166.14926.qm@web45613.mail.sp1.yahoo.com> X-Enigmail-Version: 0.95.5 Sender: news 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 17:14:41 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBBDAF8DD61680DA34176191A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable sourav das wrote: > hello all, >=20 > i m a new comer. i wrote a raw socket client=20 > using setsockopt (sock, IPPROTO_IP. IPHDRINCL, ....)using UDP. ihave fo= llowed=20 > MS_Press network programming . it is showing 19 bytes sent successfully= =2E when=20 > trying to send more than 19 bytes using sendto(sock, ...) function = , it is=20 > showing socket error on sending. i want to know how to write a raw sock= et server=20 > program so that to catch and display the data sent by the client. I don't think you can do it with the socket API, try using bpf or netgrap= h. --------------enigBBDAF8DD61680DA34176191A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHTEyDldnAQVacBcgRAkYEAJ4/KkHsf6CI70S8WfG6vpw6gDxyAQCg/Qm+ Vi81Zj1qFJxIg/Lk+jKFf/A= =BbVQ -----END PGP SIGNATURE----- --------------enigBBDAF8DD61680DA34176191A--