Thanks for the reply and sorry for late reply. but I think that problem is not understood correctly.
I will try more explanation.
This is what I do. I do not interact with a an OSPF client as yet.
I am trying to develop code which could just send and receive OSPF packet.
Scenario1:
PC1
1) send any ospf packet(need not be an Hello packet) to PC2.
and wait for a OSPF packet.
PC2
2) See in Ethereal packet sniffer the packet
PC2
3) Send any OSPF packet to PC1.
PC1
4) My application is able to receive the OSPF packet. and also can see the packet in the ethereal packet sniffer
The above scenario works as expected but when
scenario2.
PC1
1) Wait for any OSPF packet(Application has not sent an OSPF packet yet)
PC2
2) Send an OSPF packet to PC1
PC1
3) Can see the packet in ethereal packet sniffer but my application times out waiting on the raw socket(Not received the data).
Why in the second scenario would my application not get the data from the kernal/os?
Well for fimblo's question
1) What happens when you send yourself a hello packet? Have you tried sending a HELLO packet from another client? (zebra, cisco, etc).
Ans. I just receive and ICMP message (Destination Unreacable | Protocol Unreachable). As I do not have a OSPF client on the other machine.
However this gives me an idea of going through zebra code. and figuring out how are they able to receive the packets.
I will also try doing as suggested in coming days. as that is my next step.
2) Are you listening on 224.0.0.5? or 224.0.0.6?
If the IP next-header field set correctly? (89)
Ans. I was just listening on the raw socket that I used to send and receive data in scenario 1.
Please Forgive me any inconsistencies I am just an amateur programmer and new to discussion forums.