From owner-freebsd-questions Wed Jul 3 16:58:47 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 8AEC137B41B for ; Wed, 3 Jul 2002 16:58:45 -0700 (PDT) Received: from fepG.post.tele.dk (fepG.post.tele.dk [195.41.46.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id C57D143E3B for ; Wed, 3 Jul 2002 16:57:56 -0700 (PDT) (envelope-from db@traceroute.dk) Received: from rafter ([80.197.219.206]) by fepC.post.tele.dk (InterMail vM.4.01.03.23 201-229-121-123-20010418) with SMTP id <20020703235204.WQSY9333.fepC.post.tele.dk@rafter> for ; Thu, 4 Jul 2002 01:52:04 +0200 Message-ID: <02ff01c222ec$b8753330$8400a8c0@rafter> From: "Daniel Blankensteiner" To: Subject: ICMP Date: Thu, 4 Jul 2002 01:52:41 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 Hi all The really should be a FreeBSD-Programmer@FreeBSD.org, but never mind :-) I have been playing with socket programming for some time now and have moved on to raw sockets. (I don't use libnet or libpcap, because I first want to learn it from the bottom). I know how to send ICMP packets, but how do I receive? I can "take over" the hole networkcard and read all packets, but I just want the ones for my connection. If I set up a raw socket and send an ICMP I can get the response (because the ICMP have an ID-feild?), but that if I have setup a SOCK_STREAM or SOCK_DGRAM? How can I then detect ICMP? br db To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message