how to constrct a packet for ICMP communication in vc++.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • selvialagar
    New Member
    • Apr 2008
    • 57

    how to constrct a packet for ICMP communication in vc++.net

    thanks in advance........ .

    i'm new to vc++.net. i need ICMP communication from one host to another.I want to know how to construct a packet in vc++.net enviroment in managed c++.

    Plz give some ideas..........
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Well it will be just as tricky as it was in regular/unmanaged C++.
    Use the Socket class and set it up for that kind of transmission protocol.

    Something like this I suppose?
    [code=c#]
    System.Net.Sock ets.Socket s = new System.Net.Sock ets.Socket(Syst em.Net.Sockets. AddressFamily.I nterNetwork, System.Net.Sock ets.SocketType. Raw, System.Net.Sock ets.ProtocolTyp e.Icmp);
    [/code]

    Comment

    • selvialagar
      New Member
      • Apr 2008
      • 57

      #3
      i don't know how to use this socket...plz give me a sample program using this socket clss.....




      Originally posted by Plater
      Well it will be just as tricky as it was in regular/unmanaged C++.
      Use the Socket class and set it up for that kind of transmission protocol.

      Something like this I suppose?
      [code=c#]
      System.Net.Sock ets.Socket s = new System.Net.Sock ets.Socket(Syst em.Net.Sockets. AddressFamily.I nterNetwork, System.Net.Sock ets.SocketType. Raw, System.Net.Sock ets.ProtocolTyp e.Icmp);
      [/code]

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        "plz" look it up yourself. We are not going to do you work for you.
        Look up the documentation of ICMP calls and you should be able to figure it out.

        Comment

        Working...