Uday0119
Uday0119

Reputation: 790

How to send raw packets

I am unable to send raw packets from windows phone to remote client.

also there is no enum value in SocketType enumeration for raw packets.

But still i can see many applications in windows phone marketplace, that can send and recieve raw packet . eg. ICMP packets

Can somebody tell me how i can do this in C#, or if i need to write a c++ dll and then perform P/Invoke?

Upvotes: 1

Views: 478

Answers (1)

harper
harper

Reputation: 13690

Windows phone is based on Windows Embedded compact, formerly known as Windows CE.

While I worked with Windows CE it didn't support raw sockets. To send raw packets you need a protocol driver. If you are reluctant to write your own protocol driver, you can try NDISUIO. It's a protocol driver with an additional stream driver interface. When some ioctl calls you can instruct it to send (and receive) raw packets.

Windows phone 7 is based on Windows CE 6.0, but I think the NDISUIO could also be available here.

Upvotes: 1

Related Questions