               [lowlevel: WinSock Extension FAQ]

Q1: What is this??
A1: A cute little thing that will let you send RAW packets from your
    own program. wINJECT must run and have this option enabled.
    All you need is a compiler that can link with wsock32.lib
    
Q2: Ok, but how?  or what exactly do I do?
A2: It is actually quite simple, just follow this pseudo code and you
    will be able to send packets from your own program today.

-[C like Pseudo code]---------------------------------------------------
  ;You start up as usual by calling
    WSAStartup

  ;Create a socket:
    socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)

  ;Change the TTL for your socket to ZERO by calling setsockopt:
    ttl_val = 0
    setsockopt(socket, IPPROTO_IP, IP_TTL, &ttl_val, sizeof(ttl_val)

  ;Set the destination IP to 200.200.200.200
    dst.sin_addr.s_addr = inet_addr("200.200.200.200")
    dst.sin_family = AF_INET

  ;Then you allocate a buffer for the real packet.

  ;Build the real packet (fill the ip header, calculate checksums.. blah)

  sendto(socket, buffer, packetsize, 0, (struct sockaddr_in*)&dst, sizeof(dst))

  ;Packet sent!

  Dont forget to cleanup before you exit... (closesocket & WSACleanup)
  
-[C like Pseudo code]---------------------------------------------------

Or take a look at the example sources in the "contrib" directory.

Q3: Why is the destination IP 200.200.200.200???
A3  This is a way for wINJECT to identify packets that should be "fixed"
    on the way out. I chose 200.200.200.200 because it is ON the Internet
    and it was fast to write. When wINJECT sees an UDP packet with TTL = 0
    and destination IP = 200.200.200.200 then it copies the UDP data to
    the IP header start. This means that YOUR packet is sent.
    If wINJECT is not running (or Raw_Writing is disabled) then this packet
    will die when it reaches the router. It will NEVER reach
    200.200.200.200 ! (well, only if you are 200.200.200.200 ;) )

Q3: Hey!, why cant I send packets bigger than 548 bytes?? 
A3: There is a problem if you try to send a big packet and Windows wants
    to fragment it. This is not working very good. But there will be a
    fix some day.
    
Q4: Why cant I enable Raw_Reading? is my setup wrong?
A4: Nothing is wrong, it is just not finished yet.

[moofz@bonbon.net]
