Re: WinPCap packet sending
YESS!!!!
I fixed the problem!!!
I just added Ethernet header with my mac addres and type of 0x0800 and destination mac filled with -1 (broadcast?! - ff ff ff ff ff ff)!!
I was able to capture the packet using Winshark and with other packet sniffers and they detected packet is ICMP echo request!!
But this packet was not being transmitted to destination IP address in IP header. Why?
I realized destination mac in Ethernet was wrong. I sniffed this address in other ICMP request and I replaced previous address with this new one...
Packet was successfully sent to destination IP and the client responded (echo replay)!!
My question is what is this destination mac address and how to obtain it? Is it the mac address of my gateway or what?
Please help,
thanks
Re: WinPCap packet sending
I don't know a lot about networking, But don't you use a ARP request to resolve a Mac Address?
A Mac Address is the Physical Address of a Network Hardware Device I believe, You need to send a ARP Request for whom ever has the IP you are trying to reach. I'm not sure how to send or how the reply of this Request works I just know it exists lol. I am sure Wikipedia will have information on this too :)
Good luck :)
Re: WinPCap packet sending
Quote:
Originally Posted by
kenaneo
YESS!!!!
I fixed the problem!!!
I just added Ethernet header with my mac addres and type of 0x0800 and destination mac filled with -1 (broadcast?! - ff ff ff ff ff ff)!!
I was able to capture the packet using Winshark and with other packet sniffers and they detected packet is ICMP echo request!!
But this packet was not being transmitted to destination IP address in IP header. Why?
I realized destination mac in Ethernet was wrong. I sniffed this address in other ICMP request and I replaced previous address with this new one...
Packet was successfully sent to destination IP and the client responded (echo replay)!!
My question is what is this destination mac address and how to obtain it? Is it the mac address of my gateway or what?
Please help,
thanks
I use winpcap too,
but I have a problem:
Packet was successfully sent to destination IP but the client didn't respond (echo replay)!!
Can you help me?
thanks
Re: WinPCap packet sending
Quote:
Originally Posted by
kavir69
Packet was successfully sent to destination IP but the client didn't respond (echo replay)
How do you know it was sent OK and been received by the client?
Re: WinPCap packet sending
Quote:
Originally Posted by
2kaud
How do you know it was sent OK and been received by the client?
With wireshark (It is run on the client and shows packets that is received correctly.)