开发者

How to confirm if a packet is received by application

My doubt is quite strange ..

On my Linux server a DHCP server application is waiting on th开发者_开发百科e port number 547 for dhcp client messages.

Even though I am seeing messages from dhcp client on wireshark (running on my Linux server) .. dhcp server is not replying back.

Is there anyway to confirm the packet is actually processed by dhcp server or dropped in between by Linux ip stack ?

DHCP server is proprietary code so that I cant modify it to add more logs or check at recv function.

Just consider it as a generic question based on sockets rather than DHCP specific. My intrest is how can we know from an stats or other stuff that packet has been received in appropriate socket buffers.


You can do so by building the DHCP server with debugging symbols - your distribution maybe already has a *-dbg package ready for that. By attaching a debugger like gdb to the process, you may intercept messages and debug it to see where the problem is.

However, I'd first try to work with the usual possibilities, namely log-messages. Have you tried to activate Debug logging in your DHCP daemon yet?


If you ran strace on the dhcp server and it's not getting anything back from select then it's most likely NOT receiving the frame. A couple of things to check

  • Are you sure your client is sending IPv6 DHCP requests instead of IPv4 (port 67)?
  • Make sure no other process is listening on port 547 on the server.

Recheck your strace command line options and enable debug and verbosity. One more thing to make sure of when you use strace is to follow forks... -Ff

Hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜