home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!walter!qualcom.qualcomm.com!network.ucsd.edu!swrinde!emory!wupost!darwin.sura.net!paladin.american.edu!news.univie.ac.at!alijku11!k111114
- Organization: Johannes Kepler University Linz - Computing Center
- Date: Monday, 16 Nov 1992 02:51:09 CET
- From: <K111114@ALIJKU11.BITNET>
- Message-ID: <92321.025109K111114@ALIJKU11.BITNET>
- Newsgroups: comp.os.linux
- Subject: ICMP packages lost
- Lines: 54
-
- Hi all.
- I tried to port ping.c from a BSD-System. After doing some adaptive work,
- (#if 0'ed all fields concerning time-measurement, etc.), the program seemed
- to run, BUT ... I never get an ICMP-Echoreply for a sent ICMP-Message.
- I have looked at the hexdump of the outgoing package, and it seems perfectly
- right:
-
- 8 0 E5 C7 5C 0 1 0
- ! ! ! ! ! ! ! !
- ! ! ! ! ! ! +---+----> Sequence Number
- ! ! ! ! ! !
- ! ! ! ! +----+------------> Identifier (e.g., PID)
- ! ! ! !
- ! ! +----+----------------------> Checksum
- ! !
- ! +--------------------------------> Code (has to be 0)
- !
- +-------------------------------------> Type
-
- (of course this values change for every icmp-msg sent, and for every new
- ping process started: fields seq-number/identifier/checksum)
-
- "Type" can contain many values, for "ping" only 2 are interesting:
- a) type=0 -> Echo Reply
- b) type=8 -> Echo Request.
-
- Therefore, a machine sends out an Echo-request, and the target machine
- sends back an Echo-reply.
-
- My problem was, that this didn't happen, I got 100 % packet loss from
- both devices: a) loopback and b) eth0.
-
- Doing kernel-debugging, I noticed that allthough dev_rint (net/tcp/dev.c)
- was called, an incoming ICMP-packet NEVER was generated. (I have added some
- printk's in net/tcp/icmp.c). As far as I can say, the problem is with the
- packet-type-functions, I noticed that in dev_rint, a function called
- ptype->func(skb2, dev, ptype) is called. The only place where this pointer
- is initialized is in net/tcp/packet.c, saying "p->func = packet_rcv". This
- again is done in a routine called packet_init. Again, I have added printks to
- packet.c (to packet_sendto, rvc, close, init, etc...), and I was very
- surprised that none of this function are called... strange...
-
- On the other hand, doing a ping TO the machine from outside generated the
- right response, i.e. sending a ping to Linux from our SunSparc generated
- an echo-reply, and the SunSparc wrote "xxx is alive".
-
- When reading through the source, I couldn't find the call to packet_init.
- When is it done ? Is ICMP not yet implemented ? "getprotobyname" did give
- me something like it is not implemented ... but there are the sources in
- net/tcp .. !? Is there a pointer to a function that points to another
- devicepointerfunctionentry not set ? Why is it possible to send ICMPs TO
- but not FROM the machine ?
-
- Herp, getting confused.
-