Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2002 02:08:38 +0200
From:      "Daniel Blankensteiner" <db@traceroute.dk>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: ICMP
Message-ID:  <031501c222ee$f25bd2a0$8400a8c0@rafter>

next in thread | raw e-mail | index | archive | help
----- Original Message -----
From: "Daniel Blankensteiner" <db@traceroute.dk>
> 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?

btw, ftp://ftp.isi.edu/in-notes/rfc792.txt, tell's about the ID-field,
but how can the kernel see that a ICMP is for a certain connection (not
another ICMP)? the ICMP have no
I-am-talking-about-the-connection-on-your-port-number-xxxx?

br
db


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?031501c222ee$f25bd2a0$8400a8c0>