How does a NIC driver activate with upper layer mutually?

Hi, all:

How can I know whether the packets recieved from network by my own NIC driver are transmitted to upper layer(IP layer) or not?

How can I know if the packets come from upper layer are passed to my own NIC driver and go out further?

Is there any shell command or utility show that information?

The symptom of my running driver is as if the driver is seperated from the upper layer comletely! The "ping" or "scp" command cannot go through the driver and the received packets by the driver cannot pass to upper layer!

thanks!
li, kunlun

No there's no unix command to do this as it requires you to poke inside the tcp/ip stack of the running kernel...something which no user process is allowed to do.

How is this different from a simple "not working at all"? Are there communication layers that do still work?

Dear Corona688:

No! I agree with you that there is no difference with "not working at all"! Since I remove the 8139too driver, the 8139cp driver and atl1c driver, there is no other NIC driver on the system except my rtl8139_drvier, so the communication components are not working at all.

But why these do happen? What's wrong with my driver? How can I correct it?

li, kunlun

How do you expect us to be able to help you? You need to tell us what operating system you are using first!

Assuming you are on Linux, provide the output for:

# lspci | grep -i net

Thanks!

My kernel is linux 3.0.4, and follwing is the information to you:

02:00.0 Ethernet controller: Atheros Communications AR8131 Gigabit Ethernet (rev c0)
03:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

I suspect that my driver does not "melt" or "link" into the system as a whole although inserted into kernel. So it doesn't work correctly. How should I examine this by which command?

li, kunlun

your rtl8139_driver?

What are you doing?

In any case you still haven't explained why you think anything's doing anything other than nothing...

Hi, Corona688:

I writed a rtl8139 device driver and now I am debugging it. The initiating, openning, stopping and interrupting part of this driver have already passed.

li, kunlun

That information should have been disclosed in your first post.

Well, unless you provide us the code, there is not much we can do to assist you.

Hi, all:

thanks a lot!

I have already resolved the problem! Since I stop the device queue under wrong conditions my driver cannot send the messages out! Now everything is OK.

thanks!
li, kunlun