linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Yuxiao Xi <xiyuxiao@harbournetworks.com>
To: li <slowforce@21cn.com>
Cc: linuxppc <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: dhcp help!
Date: Wed, 5 Nov 2003 9:16:41 +0800	[thread overview]
Message-ID: <200311050117.TAA15160@lists.linuxppc.org> (raw)


li
   Yes,I think that I configure the dhcp server correctly. I let one PC
to dynamically obtain IP address from the DHCP server I configured and
it got one smoothly from the server. Then I use 'ethereal' to capture
packets,and the result showed that "dhcp discover" packets and "dhcp
offer" packets were all correct.

>did you configure the dpcpd in the host properly?
>>
>>     Can anyone tell me where the mumber in_device *ip_ptr of the
>> struct net_device is initialized?
>>     I enable the DHCP and BOOTP kernel configurations,but I can not
>> boot my kernel successfully!
>>     The target sent dhcp discover message packet to the host
>> server,and the host server replied it with a dhcp offer message
>> packet.The target's ethernet card received the dhcp offer packet
>> and sent it to the IP protocol stack correctly.But the network
>> layer dropped the packet!I traced the packet receive process
>> and found that when the function ip_rcv_finish() was called,it
>> called the function ip_route_input(),then ip_route_input() called
>> ip_route_input_slow(),then ip_route_input() called in_device *in_dev
>> = in_dev_get(dev) which returned NULL! the source code of the
>> function in_dev_get(dev) is shown below:
>>
>> static __inline__ struct in_device *
>> in_dev_get(const struct net_device *dev)
>> {
>> 	struct in_device *in_dev;
>>
>> 	read_lock(&inetdev_lock);
>> 	in_dev = dev->ip_ptr;
>> 	if (in_dev)
>> 		atomic_inc(&in_dev->refcnt);
>> 	read_unlock(&inetdev_lock);
>> 	return in_dev;
>> }
>>
>>     I checked the kernel startup code and I found that when the
>> target dynamicly went to obtain its IP address,and when function
>> in_dev_get(dev) was called,the mumber in_device *ip_ptr of the struct
>> net_device *dev had not been initialized. I am confused by this
>> trouble.Is DHCP really used as I described? Did I make any mistake?
>>
>> BTW: I use montavista linux 2.1

            Yuxiao Xi
            xiyuxiao@harbournetworks.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2003-11-05  1:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05  1:16 Yuxiao Xi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-11-04 11:28 dhcp help! ϯÓýТ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200311050117.TAA15160@lists.linuxppc.org \
    --to=xiyuxiao@harbournetworks.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=slowforce@21cn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).